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 ....
bharathy trend 40 for Amibroker (AFL)
Copy & Paste Friendly
Back
_SECTION_BEGIN("TI"); SetChartBkColor(ParamColor("Panel Color",colorLightGrey)); SetChartBkGradientFill(ParamColor("Upper Chart",colorLightGrey),ParamColor("Lower Chart",colorLightGrey)); parmTILStyle = ParamStyle("TI Line Style", styleLine|styleThick); parmTILUpColor = ParamColor("TI Line UpColor", colorGreen); parmTILDwnColor = ParamColor("TI Line DownColor", colorRed); parmHistUpColor = ParamColor("TI Histogram UpColor", colorLime); parmHistDwnColor = ParamColor("TI Histogram DownColor", colorOrange); r1=Param("PDI Period",14,1,100,1); r2=Param("MDI Period",14,1,100,1); r3=PDI(r1); r4=MDI(r2); r5=Param("WMA Period",20,1,100,1); TI = WMA( 2*WMA((r3-r4),int(r5/2))- WMA((r3-r4),r5),int(sqrt(r5))); for( i = 1 ; i < BarCount-2; i++ ) { if (TI[i] <TI[i-1] &&TI[i] <TI[i+1]) Lpml[i]=1; else Lpml[i] =0; if (TI[i] >TI[i-1] &&TI[i] >TI[i+1]) Lpmh[i]=1; else Lpmh[i] =0; } GR =ExRem(LpmH,Lpmh); RD =ExRem(Lpml,Lpml); //Green TI Line=Rising; Red TI Line=Falling col = IIf( TI > Ref( TI, -1 ), parmTILUpColor, parmTILDwnColor); //Green TIHistogram=Rising; Red TIHistogram=Falling HistColM= IIf( TI > Ref(TI,-1),parmHistUpColor,parmHistDwnColor); mode = ParamList("Display", "TI Line|TI Line and Momentum Histogram"); switch( mode ) { case "TI Line": Plot(TI,"Trend Indicator",col,parmTILStyle); Plot(0,"",ParamColor( "Color ZeroLine",colorBlueGrey),styleLine); break; case "TI Line and Momentum Histogram": Plot(TI,"Trend Indicator",col,parmTILStyle); Plot(TI,"",HistColM,ParamStyle("Histogram Mstyle",styleHistogram|styleThick,maskHistogram)); Plot(0,"",ParamColor( "Color ZeroLine",colorBlueGrey),styleLine); break; }