+91-0000000000

}

Monday – Friday : 9:00 AM – 6:30 PM

Double smoothed stochastic(DEMA)

DEMA is a smoother version of the Stochastic indicator. Writing an AFL code for Amibroker about Double Smoothed Stochastic (DEMA) involves using a method that provides smoother readings for the Stochastic indicator, aiding in clearer trend analysis.

/_SECTION_BEGIN("DSS");
q = Param( "Periods", 10, 1, 100, 1 );
r = Param( "First Smoothing Periods", 3, 1, 100, 1 );
s = Param( "Second Smoothing Periods", 3, 1, 100, 1 );


a = DEMA(DEMA(C - LLV(L,q),r),s);
b = DEMA(DEMA(HHV(H,q) - LLV(L,q),r),s);

DSS = (a/b)*100;

Plot( DSS, "DSS [DEMA] ("+q+","+r+","+s+")", ParamColor( "Color", colorRed ), ParamStyle("Style") );

PlotGrid(10, colorLightGrey);
PlotGrid(90, colorLightGrey);
_SECTION_END();

Open chat
1
Hi, how can I help you?