Stock Portfolio Organizer
The ultimate porfolio management solution.
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Trend Intensity Index (TII) for Amibroker (AFL)
Trend Intensity Index (TII) was developed by M.H. Pee and it is used to measure the strength of a trend of a sock, ETF, index or any other tradable security.
TII oscillates around 50% line in the range from 0 to 100%. The TII readings above 80% are considered as an indication of a strong bullish trend and TII readings below 20% are considered as an indication of a strong bearish rend. The movement of Trend Intensity Index toward 50% line (center line) would suggest weakening of the current trend.
Screenshots
Indicator / Formula
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 | sel_field = ParamField ( "Field" , field = 3 ); period = Param ( "Period" , 14 ); EMA_period = Param ( "EMA Period" , 9 ); function TrendIntensityIndex( period, sel_field ) { deviation_period = 0; if ( period % 2 == 0 ) { deviation_period = period / 2; } else { deviation_period = ( period + 1 ) / 2; } deviation = sel_field - MA ( sel_field, period ); TII = Null ; for ( i = period * 2; i < BarCount ; i++ ) { SDpos = 0; SDneg = 0; for ( j = 0; j < deviation_period; j++ ) { if ( deviation[i - j] > 0 ) { SDpos = SDpos + deviation[i - j]; } else { SDneg = SDneg + deviation[i - j]; } } TII[i] = ( ( SDpos ) / ( SDpos + abs ( SDneg ) ) ) * 100; } return TII; } TII = TrendIntensityIndex( period, sel_field ); signalLine = EMA ( TII, EMA_period ); SetChartOptions ( 0, 0, ChartGrid20 | ChartGrid80 ); Plot ( TII, "Trend Intensity Index" , colorBlack ); //PlotOHLC(TII,TII,50,"", IIf(signalLine > 50,colorLightBlue,colorLightOrange),styleCloud | styleClipMinMax, 20, 80 ); Plot ( signalLine, "Signal" , colorRed , styleThick ); PlotGrid ( 80, colorLightBlue , 9, 2 ); PlotGrid ( 20, colorAqua , 9, 2 ); |
1 comments
Leave Comment
Please login here to leave a comment.
Back
ERROR
PlotGrid( 80, colorLightBlue, 9, 2 );
TO MANY ARGUMENT