Tripple Moving Average Crossover System

Tripple Moving Average Crossover System
Tripple Moving Average Crossover System

//www.aflcode.com
_SECTION_BEGIN("DMA3x3");
Periods = 3;
Displace = 3;
Plot( MA( C, Periods), _DEFAULT_NAME(), ParamColor( "Color", colorRed ),
ParamStyle("Style", styleLine, maskDefault|styleDots), Null, Null, Displace ); 
_SECTION_END();

_SECTION_BEGIN("DMA7x5");
P = C;
Periods = 7;
Displace = 5;
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorBlue ),
ParamStyle("Style", styleDashed, maskDefault|styleDots), Null, Null, Displace );

_SECTION_END();

_SECTION_BEGIN("DMA25x5");
P = C;
Periods = 25;
Displace = 5;
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorGreen ),
ParamStyle("Style", styleDashed, maskDefault|styleDots), Null, Null, Displace );


_SECTION_END();

//*** Remove below portion, so that you can attach to any price chart ***  

_N(Title = StrFormat("{{NAME}}- {{INTERVAL}} {{DATE}} Op= %g, Hi= %g, Lo= %g, Cl=%g (%.1f%%) V= " +WriteVal( V, 1.0 ) +"\n{{VALUES}}", O, H, L, C, SelectedValue(
ROC( C, 1 )) ));
PriceStyle = GetPriceStyle();
PriceStyleOpt = ParamStyle("Style") | PriceStyle;

if (PriceStyle==styleCandle)
   Plot( C, "", colorBlack,  PriceStyleOpt); 
else
   Plot( C, "", IIf( Close >= Ref(C, -1), colorBlue, colorRed ),
PriceStyleOpt);
Previous
Next Post »