RSI TRENDING AFL Makes Sense Perfect
RSI TRENDING AFL FOR AMIBROKER
RSI Trending AFL determine the price action trending movement. This Afl updated on the base of RSI Formula concept. This is actually draw a trend line into RSI Line. In trading world every trader use RSI Formula as a level of volatility. But normal RSI not show the trend movement where it is down or up. Because Normal RSI not to draw line. So its need to a draw a line with price movement. RSI Tending AFL fulfill this need.
In figure there is a draw a tending line over the RSI Line. With price movement RSI Trending Line also move its own way. As it is draw a line over the RSI Line so it is very easy to determine the price.
Image of AFL [amibroker formula language].
In image there is two color of trending line. One is green and one is blue color Line. Green color refer rsi below level movement and other refers upper level movement. Line are move with the movement of price action. Also there is use green arrow to determine retrace level of a trend.
RSI Trending for Amibroker AFL CODE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | //-------------------------------------------- // Formula Name : RSI Tranding for Amibroker AFL by pipschart // Author : KrT group // Uploader : www.pipschart.com // E-mail : info@pipschart.com // Amibroker Blog : www.pipschart.com/amibroker // Origin : Modified & Collected from different sources. //------------------------------------------- _SECTION_BEGIN("KrT group"); GfxSetBkMode(1); X=750; Y=1; Font=10; GfxSelectFont("Impact",Font*2.2, 550);GfxSetTextColor(colorRed);GfxTextOut("KrT group",x,y); GfxSelectFont("Impact",Font*2.2, 550);GfxSetTextColor(colorGreen);GfxTextOut("RESEARCH",x+120,Y); _SECTION_END(); //--------------------------------------------- SetBarsRequired(sbrAll, sbrAll); TP = Param("Trend Per", 300,2,1000); per_RSI= Param("RSI Per", 9, 7, 35,1); IND = RSI(per_RSI); Center = 50 ; Plot( RSI(per_RSI), "", 4, 4); Plot(50,"",1,1) ; // CALCULATE UPTREND startvalue = LastValue( LLV( IND, TP ) ); startbar = LastValue( ValueWhen( IND == startvalue, BarIndex(), 1) ); BP = BarCount - Startbar; secondvalue = LastValue( LLV( IND, BP - 5 ) ); secondbar = LastValue( ValueWhen( IND == secondvalue, BarIndex(), 1) ); BP2 = BarCount - secondbar; thirdvalue = LastValue( LLV( IND, BP2 - 5 ) ); thirdbar = LastValue( ValueWhen( IND == thirdvalue, BarIndex(), 1) ); BP3 = BarCount - thirdbar; fourthvalue = LastValue( LLV( IND, BP3 - 5 ) ); fourthbar = LastValue( ValueWhen( IND ==fourthvalue, BarIndex(), 1) ); BP4 = BarCount - fourthbar; fifthvalue = LastValue( LLV( IND, BP4 - 5 ) ); fifthbar = LastValue( ValueWhen( IND ==fifthvalue, BarIndex(), 1) ); BP5 = BarCount - fifthbar; sixthvalue = LastValue( LLV( IND, BP5 - 5 ) ); sixthbar = LastValue( ValueWhen( IND ==sixthvalue, BarIndex(), 1) ); Low_1= IIf( BarIndex() == startbar, 80, Null); Low_2= IIf( BarIndex() == secondbar, 80, Null); Low_3= IIf( BarIndex() == thirdbar, 80, Null); Low_4= IIf( BarIndex() == fourthbar, 80, Null); Low_5= IIf( BarIndex() == fifthbar, 80, Null); Low_6= IIf( BarIndex() == sixthbar, 80, Null); b = startvalue ; FirstSlope = (secondvalue - b) / (secondbar - startbar) ; FirstTrendline = FirstSlope * ( BarIndex() - startbar ) + b; // Plot( IIf( BarIndex() >= startbar AND FirstTrendline <= 90 , FirstTrendline, Null ) , "FirstTrendline", colorGreen, styleThick +2048 ); SecondSlope = (thirdvalue - b) / (thirdbar - startbar) ; SecondTrendline = SecondSlope * ( BarIndex() - startbar ) + b; ThirdSlope = (fourthvalue - b) / (fourthbar - startbar) ; ThirdTrendline = ThirdSlope * ( BarIndex() - startbar ) + b; FourthSlope = (fifthvalue - b) / (fifthbar - startbar) ; FourthTrendline = FourthSlope * ( BarIndex() - startbar ) + b; FifthSlope = (sixthvalue - b) / (sixthbar - startbar) ; FifthTrendline = FifthSlope * ( BarIndex() - startbar ) + b; MainSlope = IIf( FirstSlope > SecondSlope, IIf( SecondSlope > ThirdSlope, IIf( ThirdSlope > FourthSlope, IIf( FourthSlope > FifthSlope, FifthSlope, FourthSlope),ThirdSlope), SecondSlope), FirstSlope) ; MainLine = MainSlope * ( BarIndex() - startbar ) + b; Plot( IIf( BarIndex() >= startbar, MainLine, Null ) , "MainLine", colorDarkGreen, styleThick ) ; IND_Diff = IIf( BarIndex() >= startbar, abs( IND - MainLine), Null) ; MainTrendLine_Diff = Param("Difference IND from MainTrendLine", 2.5, 0.5,5, 0.5); Cond_Buy = IIf( BarIndex() >= Thirdbar AND IND_Diff <= MainTrendLine_Diff, IND, 0) AND MainLine < 55 ; PlotShapes( IIf( Cond_Buy, shapeUpArrow , shapeNone ), colorGreen ); ///////////////////////////////////////////// // CALCULATE DOWNTREND starthigh = LastValue( HHV( IND, TP ) ); starthighbar = LastValue( ValueWhen( IND == starthigh, BarIndex(), 1) ); HBP = BarCount - starthighbar; secondhigh = LastValue( HHV( IND, HBP - 5 ) ); secondhighbar = LastValue( ValueWhen( IND == secondhigh, BarIndex(), 1) ); HBP2 = BarCount - secondhighbar; thirdhigh = LastValue( HHV( IND, HBP2 - 5 ) ); thirdhighbar = LastValue( ValueWhen( IND == thirdhigh, BarIndex(), 1) ); HBP3 = BarCount - thirdhighbar; fourthhigh = LastValue( HHV( IND, HBP3 - 5 ) ); fourthhighbar = LastValue( ValueWhen( IND ==fourthhigh, BarIndex(), 1) ); HBP4 = BarCount - fourthhighbar; fifthhigh = LastValue( HHV( IND, HBP4 - 5 ) ); fifthhighbar = LastValue( ValueWhen( IND ==fifthhigh, BarIndex(), 1) ); HBP5 = BarCount - fifthhighbar; sixthhigh = LastValue( HHV( IND, HBP5 - 5 ) ); sixthhighbar = LastValue( ValueWhen( IND ==sixthhigh, BarIndex(), 1) ); High_1= IIf( BarIndex() == starthighbar, 90, Null); High_2= IIf( BarIndex() == secondhighbar, 90, Null); High_3= IIf( BarIndex() == thirdhighbar, 90, Null); High_4= IIf( BarIndex() == fourthhighbar, 90, Null); High_5= IIf( BarIndex() == fifthhighbar, 90, Null); High_6= IIf( BarIndex() == sixthhighbar, 90, Null); MainTrendLine_Diff = Param("Difference IND from MainTrendLine", 2.5, 0.5,7, 0.5); d = starthigh ; FirstDownSlope = (secondhigh - d) / (secondhighbar - starthighbar) ; FirstDownTrendline = FirstDownSlope * ( BarIndex() - starthighbar ) + d; SecondDownSlope = (thirdhigh - d) / (thirdhighbar - starthighbar) ; SecondDownTrendline = SecondDownSlope * ( BarIndex() - starthighbar ) + d; ThirdDownSlope = (fourthhigh - d) / (fourthhighbar - starthighbar) ; ThirdDownTrendline = ThirdDownSlope * ( BarIndex() - starthighbar ) + d; FourthDownSlope = (fifthhigh - d) / (fifthhighbar - starthighbar) ; FourthDownTrendline = FourthDownSlope * ( BarIndex() - starthighbar ) + d; FifthDownSlope = (sixthhigh - d) / (sixthhighbar - starthighbar) ; FifthDownTrendline = FifthDownSlope * ( BarIndex() - starthighbar ) + d; MainDownSlope = IIf( FirstDownSlope < SecondDownSlope, IIf( SecondDownSlope < ThirdDownSlope, IIf( ThirdDownSlope < FourthDownSlope, IIf( FourthDownSlope < FifthDownSlope, FifthDownSlope, FourthDownSlope),ThirdDownSlope), SecondDownSlope), FirstDownSlope) ; MainDownLine = IIf( MainDownSlope == 0, Null, MainDownSlope * ( BarIndex() - starthighbar ) + d ) ; Plot( IIf( BarIndex() >= starthighbar, MainDownLine, Null ) , "Main_DOWN_Line", colorViolet, styleThick ) ; IND_Diff = IIf( BarIndex() >= starthighbar, abs( IND - MainDownLine), Null) ; Cond_Sell = IIf( BarIndex() >= Thirdbar AND IND_Diff <= MainTrendLine_Diff, IND, 0) AND MainDownLine > 45 ; PlotShapes( IIf( Cond_Sell, shapeDownArrow , shapeNone ), colorRed ); Title = Name() + "\\c17" + " " +"\\c12" + "RSI" + " " + per_RSI ; |
How to Use AFL for Amibroker
- Download Amibroker AFL File.
- Now copy the afl file and paste it to \Program Files\AmiBroker\Formulas\Custom. [For 32 bit]
- Have you 64 bit operating system? Than paste it to : \Program Files(x86)\AmiBroker\Formulas\Custom.
- Go to formula section of Amibroker and you will get the afl in Custom folder.
Watch Our Video Tutorial | How To Set Amibroker?
Tags amibroker afl
0 thoughts on “RSI TRENDING AFL Makes Sense Perfect”