Almost Accurate Magic Crossover Trading System |
//www.aflcode.com ""; _SECTION_BEGIN("Trend Lines"); p1 = Param("TL 1 Periods", 20, 5, 50, 1); p2 = Param("TL 2 Periods", 5, 3, 25, 1); TL1 = LinearReg(C, p1); TL2 = EMA(TL1, p2); Col1 = IIf(TL1 > TL2, ParamColor("TL Up Colour", colorGreen), ParamColor("TL Dn Colour", colorRed)); Plot(TL1, "TriggerLine 1", Col1, styleLine|styleThick|styleNoLabel); Plot(TL2, "TriggerLine 2", Col1, styleLine|styleThick|styleNoLabel); _SECTION_END(); _SECTION_BEGIN("Close Line"); Col2 = IIf((C > TL1), ParamColor("CL Up Colour", colorBlue), ParamColor("CL Dn Colour", colorRed)); PlotShapes(shapeSmallCircle, Col2, 0, C, 0); SetChartOptions(0,chartShowArrows|chartShowDates); _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | styleBar); _SECTION_END();
Sign up here with your email
ConversionConversion EmoticonEmoticon