Hi Seniors and all AFL coders ..
Need help on the below AFL . This is a simple AFL 14 days EMA crossover by 206 days ema . Got this AFL frm a well know site of Rajendra .
Buy and Sell arrows are visible .. But i need values to attached for those signals...Like Buy at xyz price .. and sell at xyz price .
Also need a Message box below displaying the buy and Sell price generated above .
i am a beginner and have no idea abt AFL coding.. so plz help me .
Thanks,
Kumar
the code is as follows :
_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");
Range1=Optimize("range1",14,1,20,1);
Range2=Optimize("range2",206,1,125,1);
Buy = Cross((EMA(Close,range1)),(EMA(Close,range2)));
Sell = Cross(EMA(Close,range2),(EMA(Close,range1)));
Short = Sell;
Cover = Buy;
// plot expanded average
Plot(EMA( Close,range1), "70min-ema", colorRed );
Plot(EMA( Close,range2), "1030min-ema", colorGreen );
// plot arrows
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
_SECTION_END();
Need help on the below AFL . This is a simple AFL 14 days EMA crossover by 206 days ema . Got this AFL frm a well know site of Rajendra .
Buy and Sell arrows are visible .. But i need values to attached for those signals...Like Buy at xyz price .. and sell at xyz price .
Also need a Message box below displaying the buy and Sell price generated above .
i am a beginner and have no idea abt AFL coding.. so plz help me .
Thanks,
Kumar
the code is as follows :
_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");
Range1=Optimize("range1",14,1,20,1);
Range2=Optimize("range2",206,1,125,1);
Buy = Cross((EMA(Close,range1)),(EMA(Close,range2)));
Sell = Cross(EMA(Close,range2),(EMA(Close,range1)));
Short = Sell;
Cover = Buy;
// plot expanded average
Plot(EMA( Close,range1), "70min-ema", colorRed );
Plot(EMA( Close,range2), "1030min-ema", colorGreen );
// plot arrows
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
_SECTION_END();
Last edited: