Support Resistance Buy Sell System - Amibroker AFL Code

Click Image To Enlarge. Please Rate And Comment.

Support Resistance Buy Sell System

_SECTION_BEGIN("Support Resistance Buy Sell System");

BarsSince(Cross(C,Upper)), colorBrightGreen,colorRed); 
Plot(Upper,"upper band",colorGreen); 
Plot(Lower,"lower band",colorDarkRed); 
Title=Name()+" "+Date()+" "+EncodeColor(colorBlack)+" SDA2 Channel System "+EncodeColor(colorRed)+" Vol="+NumToStr(Volume,1.0)+" "+" O="+Open+" H="+HHV(H,1)+" L="+LLV(L,1)+
"Close="+ Close+""+"("+NumToStr((Close-Ref(C,-1))/Ref(C,-1)*100,1.2)+" %)";

/* Buy or Sell Condition */
Buy = Cross(Close,Upper);
Sell = Cross(Lower,Close);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

Filter = Buy OR Sell;
/* Exploration Parameters */
AddTextColumn( FullName(), "Company Name" );
AddColumn( Buy, "Buy", 1 );
AddColumn( Sell, "Sell", 1 );
AddColumn( C, "Close", 1.3 );
AddColumn( H, "High", 1.3 );
AddColumn( Lower, "Lower Band", 1.3 );
AddColumn( Upper, "Upper Band", 1.3 );

PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);                      
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45); 
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);                      
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);

Previous Post Next Post