Read First

Credit goes to the creator of the AFL Code. No changes have been made by the Blog owner to the AFL code. The code has been obtained through online resource and is presented on as it is basis.here afl are from collection of all over website (www).thanks for the wonderful creating and sharing ideas.

Saturday, January 11, 2014

Amibroker AFL for stop and reversal Crossover Signal [SAR]




Code here AFL
_SECTION_BEGIN("Parabolic SAR Crossover"); Plot(C,"Close",colorBlack,64); uptrend=PDI()>MDI()AND Signal()PDI()AND Signal()>MACD(); Plot( 2, /* defines the height of the Market Trend in percent of pane width */"TREND", IIf( uptrend, colorGreen, IIf( downtrend, colorRed, 6 )), /* choose color */ styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); SetChartBkColor( ParamColor( "Outer panel",colorBlack) ); SetChartOptions(0,chartShowArrows|chartShowDates); NewDay = Day()!= Ref(Day(), -1); DH = HHV( H, NewDay); DL = LLV(L, NewDay); Plot(DH,"DAY HIGH",colorPaleGreen,ParamStyle("Style"),0,0,0); Plot(DL,"DAY LOW",colorPink,ParamStyle("Style"),0,0,0); R1=((DH-DL)*0.33)+DL; R2=((DH-DL)*0.66)+DL; Plot(R1,"BEARISH BELOW",colorYellow,styleDashed,0,0,0); Plot(R2,"BULLISH ABOVE",colorBrightGreen,styleDashed,0,0,0); accel = Param("Acceleration", 0.02, 0, 1, 0.001); mx = Param("Max. acceleration", 0.2, 0, 1, 0.001); F_SAR = SAR(accel,mx); colordots = IIf(F_SAR < L,colorGreen,IIf(F_SAR> H,colorRed,colorWhite)); Buy = Cross(C,F_SAR); Buy = Ref(Buy,-1); BuyPrice = O; Sell = Cross(F_SAR,C); Sell = Ref(Sell,-1); SellPrice = O; SetBarsRequired(-2,-2); SetChartOptions(0, chartShowDates); Plot(F_SAR,"\nF_SAR",colordots,styleDots|styleNoLine); PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorBrightGreen,0,L,-15); PlotShapes(IIf(Buy,shapeHollowUpArrow,shapeNone),colorBrightGreen,0,L,-15); PlotShapes(IIf(Buy,shapeHollowCircle,shapeNone),colorBlue,0,BuyPrice,0); PlotShapes(IIf(Sell,shapeDownArrow,shapeNone),colorRed,0,H,-15); PlotShapes(IIf(Sell,shapeHollowDownArrow,shapeNone),colorRed,0,H,-15); PlotShapes(IIf(Sell,shapeHollowCircle,shapeNone),colorOrange,0,SellPrice,0);


There is a substantial risk of loss associated with trading in Stock Markets. Losses can and  will occur. No responsibility for loss occurred to any person acting or refraining to act as a result of using the AFL written by their respective creators and published in this Blog for sharing of knowledge can be accepted by the Blog owner.EDUCATIONAL PURPOSE ONLY. IF u have a problem then u create anything we will follow you before complaint anything entire blog contents.

2 comments:

  1. I like your site and very nic Post.....!!!!
    buy sell indicators

    ReplyDelete
  2. Thanks for sharing nice Information for Commodity trading . There is a lot of important information on your site

    real time stock BUY SELL

    ReplyDelete

Related Posts Plugin for WordPress, Blogger...