Support-Resistance-Buy-Sell-System |
//www.aflcode.com _SECTION_BEGIN("Support Resistance Buy Sell System"); Derived=WMA(((H+L)/2)+(O-C),3); i=WMA(Derived,3); Upper=(Derived+StDev(Derived,7))+ATR(2)/1.5; Lower=(Derived-StDev(Derived,7))-ATR(2)/1; color=IIf(BarsSince(Cross(Lower,C))> BarsSince(Cross(C,Upper)), colorBrightGreen,colorRed); Plot(C,"",Color,64); 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); _SECTION_END();
Sign up here with your email
ConversionConversion EmoticonEmoticon