Stock Portfolio Organizer
The ultimate porfolio management solution.
Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
adx trend for Amibroker (AFL)
Copy & Paste Friendly
Back
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 | _SECTION_BEGIN ( "ADX" ); SetChartOptions (0,0,0,1,1); range = Param ( "Periods" , 14, 2, 200, 1 ); ad = ADX (range); pd = PDI (range); md = MDI (range); falling = ROC ( ad, 2 ) < 0; // 0 - week, 1 - medium, 2 - strong strength = IIf ( ad < 15 OR ( ad < 25 AND falling ), 0, IIf ( ad < 25 OR ( ad < 35 AND falling ), 1, 2 ) ); pTrendBullStrong = ParamColor ( "Bullish Strong" , colorDarkGreen ); pTrendBearStrong = ParamColor ( "Bearish Strong" , colorDarkRed ); pTrendBullMedium = ParamColor ( "Bullish Medium" , colorGreen ); pTrendBearMedium = ParamColor ( "Bearish Medium " , colorRed ); pNoTrend = ParamColor ( "NoTrend" , colorLavender ); color = IIf ( strength > 0 , IIf ( pd >= md AND strength == 1,pTrendBullMedium, IIf (pd >= md AND strength == 2, pTrendBullStrong, IIf (pd < md AND strength == 1,pTrendBearMedium,pTrendBearStrong ) ) ), pNoTrend ); Plot ( ad, _DEFAULT_NAME (), color, ParamStyle ( "ADX style" , styleThick )); _SECTION_END (); |