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 1mins-5mins-15mins for Amibroker (AFL)
Rating:
5 / 5 (Votes 1)
Tags:
amibroker, oscillator, intraday
Stochastic 1mins-5mins-15mins
Indicator / Formula
Copy & Paste Friendly
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 | SetChartBkColor ( ParamColor ( "Panel Color" , colorBlack )); SetChartBkGradientFill ( ParamColor ( "Upper Chart" , colorBlack ), ParamColor ( "Lower Chart" , colorBlack )); _SECTION_BEGIN ( "Stochastic %D" ); periods = Param ( "Periods" , 8, 1, 200, 1 ); Ksmooth = Param ( "%K avg" , 3, 1, 200, 1 ); Dsmooth = Param ( "%D avg" , 4, 1, 200, 1 ); Plot ( StochD ( periods , Ksmooth, DSmooth ), "Stoch Line D5" , colorRed , styleLine , styleThick ); Plot ( StochK ( periods , Ksmooth), "Stoch Line K5" , colorBrightGreen , styleLine , styleThick ); k = StochK ( periods , Ksmooth); d = StochD ( periods , Ksmooth, DSmooth ); Buy5P= Cross (K, D ) ; Sell5P= Cross (D, K ) ; PlotShapes (0.4* shapeUpTriangle *Buy5P, colorGreen , 0, k, -15 ); PlotShapes (0.4* shapeDownTriangle *sell5P, colorYellow , 0, d,-15); TH5=k-d; Hi = IIf (k > d, k, d); Lo = IIf (k < d, k, d); COLOR = IIf ( Ref (d,1) > Ref (k,1), 15, 14); //COLOR = IIf(K > D AND (K > 80 OR D > 80) OR D > K AND (K < 20 OR D <20), colorLightGrey, COLOR); PlotOHLC (Lo,Hi,Lo,Hi, "" ,COLOR, styleNoLabel | styleCloud ); _SECTION_END (); _SECTION_BEGIN ( "Stochastic_15_MINS" ); periods = Param ( "Periods" , 8, 1, 200, 1 ); Ksmooth = Param ( "%K avg" , 3, 1, 200, 1 ); Dsmooth = Param ( "%D avg" , 4, 1, 200, 1 ); TimeFrameSet ( in1Minute * 15); k15 = StochK ( periods , Ksmooth); d15 = StochD ( periods , Ksmooth, DSmooth ); //TH15=k15-d15; TimeFrameRestore (); K = TimeFrameExpand (k15, in1Minute * 15); D = TimeFrameExpand (d15, in1Minute * 15); TH15=k-d; Hi = IIf (k > d, k, d); Lo = IIf (k < d, k, d); COLOR = IIf ( Ref (d,1) > Ref (k,1), colorRed , colorGreen ); //COLOR = IIf(K > D AND (K > 80 OR D > 80) OR D > K AND (K < 20 OR D <20), colorLightGrey, COLOR); PlotOHLC (Lo,Hi,Lo,Hi, "" ,COLOR, styleNoLabel | styleCloud ); Plot (D, "Stoch Orange-Light Blue D15" , colorBlack , styleThick ); Plot (K, "Stoch K15" , colorBlack , styleThick ); _SECTION_END (); _SECTION_BEGIN ( "Stochastic_30_MINS" ); periods = Param ( "Periods" , 8, 1, 200, 1 ); Ksmooth = Param ( "%K avg" , 3, 1, 200, 1 ); Dsmooth = Param ( "%D avg" , 4, 1, 200, 1 ); TimeFrameSet ( in1Minute * 30); k30 = StochK ( periods , Ksmooth); d30 = StochD ( periods , Ksmooth, DSmooth ); TimeFrameRestore (); K = TimeFrameExpand (k30, in1Minute * 30); D = TimeFrameExpand (d30, in1Minute * 30); //myStochK=StochK( periods , Ksmooth); //myStochD=StochD( periods , Ksmooth, DSmooth ); TH30=k-d; // >0 up; < down Buy30P= Cross (K, D ) ; Sell30P= Cross (D, K ) ; PlotShapes ( 1* shapeUpArrow *Buy30P, colorBlue , 0, 0, 0 ); PlotShapes (1* shapeDownArrow *sell30P, colorRed , 0, 92,0); AlertIf ( Buy30P, "SOUND C:\\A_better_day.WAV" , "Audio alert" ,1); AlertIf ( Sell30P, "SOUND C:\\A_better_day.WAV" , "Audio alert" , 2); Plot (D, "Stoch Red-Blue D30" , colorRed , styleThick ); Plot (K, "Stoch K30" , colorGreen , styleThick ); Hi = IIf (k > d, k, d); Lo = IIf (k < d, k, d); COLOR = IIf ( Ref (d,1) > Ref (k,1), colorOrange , colorLightBlue ); //COLOR = IIf(K > D AND (K > 80 OR D > 80) OR D > K AND (K < 20 OR D <20), colorLightGrey, COLOR); PlotOHLC (Lo,Hi,Lo,Hi, "" ,COLOR, styleNoLabel | styleCloud ); _SECTION_END (); |
0 comments
Leave Comment
Please login here to leave a comment.
Back