Hello TJ friend's with the help of subroto ji (Sr114),we have created a afl on amibroker default adx with buy and sell arrows and little modification ..so test this live and please give us feed backs and suggestion's .........
_SECTION_BEGIN("Background_Setting");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
ParamColor("BgBottom", colorDarkGrey),ParamColor("TitleBack",colorGrey40) );
SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
SetChartOptions(0,chartShowArrows|chartShowDates);
SetBarFillColor(IIf(C>O,ParamColor("Candle UP Color", colorGreen),IIf(C<=O,ParamColor("Candle Down Color", colorRed),colorLightGrey)));
Plot(C,"Price",IIf(C>O,ParamColor("Wick UP Color", colorDarkGreen),IIf(C<=O,ParamColor("Wick Down Color", colorDarkRed),colorLightGrey)),64,0,0,0,0);
grid_day = IIf(Day()!=Ref(Day(),-1),1,0);
Plot(grid_day,"",31,styleHistogram|styleDots|styleNoLabel|styleOwnScale);
_SECTION_END();
_SECTION_BEGIN("Custom ADX settings");
range = Param("ADX Range", 14, 2, 200, 1 );
pd=PDI(range);
md=MDI(range);
a=Cross(pd,md);
b=Cross(md,pd);
a=ExRem(a,b);
b=ExRem(b,a);
col=IIf(a,ColorRGB(0,100,0),ColorRGB(100,0,0));
Plot(a,"",col,styleHistogram|styleDashed|styleOwnScale|styleNoLabel,0,1,0,0);
Plot(b,"",col,styleHistogram|styleDashed|styleOwnScale|styleNoLabel,0,1,0,0);
Buy =Short= a AND (H>O );//AND O!=H);
Sell=Cover= b AND (L<O); //AND O!=L);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
Buy=Ref(Buy,-1);
Sell=Ref(Sell,-1);
PlotShapes( IIf( Buy, shapeUpArrow, shapeNone ), 51, layer = 0,yposition = Low, offset = -20);
PlotShapes( IIf( Sell, shapeDownArrow, shapeNone ), 42, layer = 0, yposition = High, offset = -20); //shapeSmallCircle
GraphXSpace=10;
_SECTION_END();
_SECTION_BEGIN("Title");
Title =
EncodeColor(colorWhite)+ Title = Name () + " | "
+EncodeColor(33) + Date() +" | " + "\n "
+EncodeColor(colorBrightGreen)+ "Op : "+ EncodeColor(colorWhite)+ O + " | "
+EncodeColor(colorBrightGreen)+ "Hi : "+ EncodeColor(colorWhite)+ H + " | "
+EncodeColor(colorBrightGreen)+ "Lo : "+ EncodeColor(colorWhite)+ L + " | "
+EncodeColor(colorBrightGreen)+ "Cls : "+ WriteIf(C> Ref(C, -1),EncodeColor(colorBrightGreen),EncodeColor(colorRed))+ C + " | "
+EncodeColor(colorBrightGreen)+ "Change : ("+ WriteIf(C> Ref(C, -1),EncodeColor(colorBrightGreen),EncodeColor(colorRed)) + WriteVal(C-Ref(C,-1))+" Rs."
+EncodeColor(colorBrightGreen)+ " /"+ WriteIf(C> Ref(C, -1),EncodeColor(colorBrightGreen),EncodeColor(colorRed))+ WriteVal( ROC( C, 1 ))+""+ " % "
+EncodeColor(colorBrightGreen)+ ") | \nVolume : " + WriteIf(V> Ref(V, -1),EncodeColor(colorBrightGreen),EncodeColor(colorRed))+ WriteVal(V,1.0)+ "\n";
_SECTION_END();
_SECTION_BEGIN("Background_Setting");
SetChartBkGradientFill( ParamColor("BgTop", colorBlack),
ParamColor("BgBottom", colorDarkGrey),ParamColor("TitleBack",colorGrey40) );
SetChartBkColor(ParamColor("Outer Panel",colorPaleBlue));
SetChartOptions(0,chartShowArrows|chartShowDates);
SetBarFillColor(IIf(C>O,ParamColor("Candle UP Color", colorGreen),IIf(C<=O,ParamColor("Candle Down Color", colorRed),colorLightGrey)));
Plot(C,"Price",IIf(C>O,ParamColor("Wick UP Color", colorDarkGreen),IIf(C<=O,ParamColor("Wick Down Color", colorDarkRed),colorLightGrey)),64,0,0,0,0);
grid_day = IIf(Day()!=Ref(Day(),-1),1,0);
Plot(grid_day,"",31,styleHistogram|styleDots|styleNoLabel|styleOwnScale);
_SECTION_END();
_SECTION_BEGIN("Custom ADX settings");
range = Param("ADX Range", 14, 2, 200, 1 );
pd=PDI(range);
md=MDI(range);
a=Cross(pd,md);
b=Cross(md,pd);
a=ExRem(a,b);
b=ExRem(b,a);
col=IIf(a,ColorRGB(0,100,0),ColorRGB(100,0,0));
Plot(a,"",col,styleHistogram|styleDashed|styleOwnScale|styleNoLabel,0,1,0,0);
Plot(b,"",col,styleHistogram|styleDashed|styleOwnScale|styleNoLabel,0,1,0,0);
Buy =Short= a AND (H>O );//AND O!=H);
Sell=Cover= b AND (L<O); //AND O!=L);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
Buy=Ref(Buy,-1);
Sell=Ref(Sell,-1);
PlotShapes( IIf( Buy, shapeUpArrow, shapeNone ), 51, layer = 0,yposition = Low, offset = -20);
PlotShapes( IIf( Sell, shapeDownArrow, shapeNone ), 42, layer = 0, yposition = High, offset = -20); //shapeSmallCircle
GraphXSpace=10;
_SECTION_END();
_SECTION_BEGIN("Title");
Title =
EncodeColor(colorWhite)+ Title = Name () + " | "
+EncodeColor(33) + Date() +" | " + "\n "
+EncodeColor(colorBrightGreen)+ "Op : "+ EncodeColor(colorWhite)+ O + " | "
+EncodeColor(colorBrightGreen)+ "Hi : "+ EncodeColor(colorWhite)+ H + " | "
+EncodeColor(colorBrightGreen)+ "Lo : "+ EncodeColor(colorWhite)+ L + " | "
+EncodeColor(colorBrightGreen)+ "Cls : "+ WriteIf(C> Ref(C, -1),EncodeColor(colorBrightGreen),EncodeColor(colorRed))+ C + " | "
+EncodeColor(colorBrightGreen)+ "Change : ("+ WriteIf(C> Ref(C, -1),EncodeColor(colorBrightGreen),EncodeColor(colorRed)) + WriteVal(C-Ref(C,-1))+" Rs."
+EncodeColor(colorBrightGreen)+ " /"+ WriteIf(C> Ref(C, -1),EncodeColor(colorBrightGreen),EncodeColor(colorRed))+ WriteVal( ROC( C, 1 ))+""+ " % "
+EncodeColor(colorBrightGreen)+ ") | \nVolume : " + WriteIf(V> Ref(V, -1),EncodeColor(colorBrightGreen),EncodeColor(colorRed))+ WriteVal(V,1.0)+ "\n";
_SECTION_END();