Need Help for Composite MACD

#23
Hitesh,

How is this Composite MACD system different from the standard MACD system? On a glance of the chart it appears both give the buy/sell signals at the same time..

Do you find superiority of the Composite MACD system over the standard MACD system signals?

Is there anyway we can test this?

John
 
#24
Hitesh thanks a lot for yr promt reply.. just some clairifications there are two lines
one is green/red the otehr is blue/black.... which ones is teh signal n which one is the macd and how to trade on tht biasis

Also i had read much abt n was keen on using MACD divergence so if u can tell em which is more strong MACD divergence or the HISTOGRAM of d macd divergence

Also the MACD indicatr of the amibroker is very very lame as the histograms are hardly visible .. can u plz gimme teh link or d afl of a nice afl for d same

plz see d pic iam attachin its of d sytem of Eagle eye trade.. dnt want theri system but the afl for the macd they using.. hope u getting my
 

Attachments

#25
Hello,

I've been looking at this trading system, and as far as I can see, it can't be used. A trading system should exit a long either before or simultaneously while entering a short trade. With this system, it is possible to be both long and short at the same time. Unless I've done something silly, or have misunderstood.

Refer to the attached image file (colours modified), and my version of the AFL (attached as a txt file).
Many thanks,
Paul
 

Attachments

KelvinHand

Well-Known Member
#26
Hi,
Sorry for 1 year++ late to join this group, here is the translate of the metastock code::p

//-- Begin of Script -----

/*
====================
MACD - composite EMA
====================
-----------------------------------------------

{ MACD OR Histogram based on multiple EMA's }
{ Incorporating automatic overbought/oversold
levels }
{ Copyright 2005 Jose Silva }
{ http://www.metastocktools.com }
*/

function IsDefined(arry)
{
return NOT IsEmpty(arry);
}

//{ User inputs }
plot1=ParamToggle("Choose MACD OR Histogram", "MACD|Histogram");
plot2=ParamToggle("Choose MACD/Hist OR Normalized","MACD/Hist|Normalized");
pds=Param("Signal/Histogram EMA periods",21, 2, 260);

//{ Composite-EMA MACD/Histogram }
ema1= EMA(C,3)+ EMA(C,5)+EMA(C,8)+EMA(C,11)+EMA(C,14)+EMA(C,17);
ema2= EMA(C,30)+EMA(C,35)+EMA(C,40)+EMA(C,45)+EMA(C,50)+EMA(C,56);
emaComp=ema1-ema2;
sig=EMA(emaComp,pds);
hist=emaComp-sig;

//{ Choose MACD OR Histogram }
MacdH=IIf(plot1==0,emaComp,hist);

//{ Normalized MACD/Histogram }
normMod=Highest(MacdH)-Lowest(MacdH);
normMod=IIf(normMod==0, 0.000001,normMod);
MacdHnorm=
((MacdH-Lowest(MacdH))/normMod-.5)*200;

//{ Choose standard/normalized }
MacdComp=IIf(plot2==0,MacdH,MacdHnorm);
sig=EMA(MacdComp,pds);

//{ MACD/Hist average }
Avgs=Cum(MacdComp)/Cum(IsDefined(MacdComp));

//{ MACD/Hist auto boundaries }
pk=Ref(MacdComp,-1)>MacdComp
AND Ref(MacdComp,-1)>Ref(MacdComp,-2)
AND Ref(MacdComp,-1)>Avgs;
pkVal=ValueWhen(pk,Ref(MacdComp,-1));
tr=Ref(MacdComp,-1)<MacdComp
AND Ref(MacdComp,-1)<Ref(MacdComp,-2)
AND Ref(MacdComp,-1)<Avgs;
trVal=ValueWhen(tr,Ref(MacdComp,-1));
Obought=Cum(pkVal)/Cum(IsDefined(pkVal));
Osold=Cum(trVal)/Cum(IsDefined(trVal));

//{ Plot in own window }
Plot(Obought, "OB", colorRed); //{ Red }
Plot(Avgs, "Avg", colorDarkGrey); //{ Grey }
Plot(Osold, "OS", colorBlue); //{ Blue }
Plot( IIf(plot1==0,Sig,Avgs), "Plot1", colorGreen); //{ Green }
Plot(MacdComp, "MACDComp", colorBlack);// { Black }

//-- End of Script -------

Hope it meet your need.:rolleyes:
 

Similar threads