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 ....
stochastic trendline 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 36 37 38 39 40 41 42 43 | _SECTION_BEGIN ( "Stochastics Trendlines" ); /*Slow Stochastic and Trendlines for Indicator Builder, by Dimitris Tsokakis*/ D1=14; MaxGraph=8; ST3= StochK (D1); ST33= StochD (D1); Graph0=ST3; Graph1=ST33; Title= Name ()+ " - %K=" + WriteVal (st3,FORMAT=1.2)+ ", %D=" + WriteVal (ST33,FORMAT=1.2)+ WriteIf ( Cross (st3,st33), " POSITIVE CROSS" , " " )+ WriteIf ( Cross (ST33,ST3), " NEGATIVE CROSS" , "" ); x = Cum (1); per = 0.1; s1=st33; s11=st33; pS = TroughBars ( s1, per, 1 ) == 0; endt= LastValue ( ValueWhen ( pS, x, 1 )); startt= LastValue ( ValueWhen ( pS, x, 2 )); dtS =endt-startt; endS = LastValue ( ValueWhen ( pS, s1, 1 ) ); startS = LastValue ( ValueWhen ( pS, s1, 2 )); aS = (endS-startS)/dtS; bS = endS; trendlineS = aS * ( x -endt ) + bS; Graph6 = IIf (x>startt-1 AND TRENDLINES>0 AND TRENDLINES<100,trendlineS,-1e10); Graph6Style = 1; Graph6Color = 1; pR = PeakBars ( s11, per, 1 ) == 0; endt1= LastValue ( ValueWhen ( pR, x, 1 )); startt1= LastValue ( ValueWhen ( pR, x, 2 )); dtR =endt1-startt1; endR = LastValue ( ValueWhen ( pR, s11, 1 ) ); startR = LastValue ( ValueWhen ( pR, s11, 2 )); aR = (endR-startR)/dtR; bR = endR; trendlineR = aR * ( x -endt1 ) + bR; Graph7 = IIf (x>startT1-1 AND TRENDLINER>0 AND TRENDLINER<100,trendlineR,-1e10); Graph7Style = 1; Graph7Color = 1; _SECTION_END (); |