Yahoo Charts - MACD & stochastic -- Need help

#1
Hi All,

Can anyone help me with the formula used in Yahoo Charts for MACD & stochastic.

I tried various combinations in amibroker, but no success.

Any help will really be greatful.

Thanks & have great times.
 
Last edited:

KelvinHand

Well-Known Member
#2
Hi All,

Can anyone help me with the formula used in Yahoo Charts for MACD & stochastic.

I tried various combinations in amibroker, but no success.

Any help will really be greatful.

Thanks & have great times.
Simple. MT4 Styles


Stochastic
Code:
K_Period = Param( "%K Periods", 14, 1, 200, 1 );
K_Smooth = Param( "Slowing", 3, 1, 200, 1 );
D_Period = Param( "%D Period", 3, 1, 200, 1 );

Plot( StochK( K_Period, K_Smooth), "Stoch %K",  ParamColor( "%K Color", colorAqua ), ParamStyle("%K Style") );
Plot( StochD( K_Period, K_Smooth, D_Period), "Stoch %D", ParamColor( "%D Color", colorRed ), ParamStyle("%D Style") );

MACD
Code:
r1 = Param("Fast EMA",12); 
r2 = Param("Slow EMA",26); 
r3 = Param("MACD SMA",9); 


cMACD = ParamColor("MACD Color",  colorBlue);
sMACD = ParamStyle("MACD style", styleHistogram|styleNoLabel|styleThick);

cSig=ParamColor("Signal color", colorRed );
sSig=ParamStyle("Signal style", styleNoLabel|styleThick);


iMACD = EMA(C, r1) - EMA(C, r2);
iSignal = MA(iMACD,r3);

Plot(iMACD,"MACD",cMACD, sMACD);
Plot(iSignal,"Signal",sSig,sSig);
 
Last edited:

Similar threads