+91-0000000000

}

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

Crossover Analytic

This refers to when two lines on a chart cross each other. The best AFL code for Amibroker involving Crossover Analytics helps identify these crossing points, which can signal potential changes in market trends or momentum.

/_SECTION_BEGIN("Price");
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 | ParamStyle("Style") | GetPriceStyle() ); 
_SECTION_END();

_SECTION_BEGIN("ema");

fast = Param("fast ema", 2,2,15,1);
med = Param("med ema", 19,5,35,1);
Long = Param("long ema", 26,15,89,1);

Plot( MA( Close, fast ),"fast ema", colorYellow, styleThick ); 
Plot( EMA( Close, med ),"med ema", colorRed, styleThick ); 
Plot( EMA( Close, Long ),"long ema", colorBlue, styleThick ); 

Buy = Cross (MA( Close, fast ), EMA( Close, Long )) OR Cross (MA( Close, fast ), EMA( Close, med )) ;
Short=Cross (EMA( Close, Long ), MA( Close, fast )) OR Cross (EMA( Close, med ), MA( Close, fast ));
Sell = Cross (MA( Close, med ), EMA( Close, fast ));
Cover = Cross (MA( Close, fast ), EMA( Close, med )); 
  
PlotShapes (Buy*shapeUpTriangle,colorGreen);
PlotShapes (Short*shapeDownTriangle,colorRed); 

Open chat
1
Hi, how can I help you?