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 ....
RSI Divergence + ADX + MACD bear&bull 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 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 85 86 87 88 89 90 91 | _SECTION_BEGIN ( "ADX" ); range = Param ( "Periods" , 14, 2, 200, 1 ); Plot ( ADX (range), _DEFAULT_NAME (), ParamColor ( "ADX color" , colorBlue ), ParamStyle ( "ADX style" , styleThick ) ); Plot ( PDI (range), "+DI" , ParamColor ( "+DI color" , colorGreen ), ParamStyle ( "+DI style" ) ); Plot ( MDI (range), "-DI" , ParamColor ( "-DI color" , colorRed ), ParamStyle ( "-DI style" ) ); _SECTION_END (); _SECTION_BEGIN ( "MACD" ); r1 = Param ( "Fast avg" , 10, 2, 200, 1 ); r2 = Param ( "Slow avg" , 15, 2, 200, 1 ); r3 = Param ( "Signal avg" , 1, 1, 200, 1 ); Plot ( ml = MACD (r1, r2), StrFormat ( _SECTION_NAME ()+ "(%g,%g)" , r1, r2), ParamColor ( "MACD color" , colorRed ), ParamStyle ( "MACD style" ) ); Plot ( sl = Signal (r1,r2,r3), "Signal" + _PARAM_VALUES (), ParamColor ( "Signal color" , colorBlue ), ParamStyle ( "Signal style" ) ); Plot ( ml-sl, "MACD Histogram" , ParamColor ( "Histogram color" , colorDefault ), styleNoTitle | ParamStyle ( "Histogram style" , styleHistogram | styleNoLabel , maskHistogram ) ); Plot (0, "" , colorBlue , 1); Plot (0.25, "" , colorLightGrey , styleLine | styleNoLabel ); Plot (-0.25, "" , colorLightGrey , styleLine | styleNoLabel ); SetGradientFill( colorGreen , colorRed , 0, GetChartBkColor () ); Plot (ml, "Sterngth" + _PARAM_VALUES (), colorDefault , styleLine | styleGradient ); _SECTION_END (); _SECTION_BEGIN ( "RSI Divergence" ); //------------------------------------------------------------------------------ // // Formula Name: RSI Divergence // Level: medium // Flags: indicator // Formula URL: // Details URL: // //------------------------------------------------------------------------------ // // + scanner // //------------------------------------------------------------------------------ /*--------------------------------------------------- RSI Divergence --------------------------------------------------------*/ GraphXSpace =7; n= Param ( "% Reverse " ,20,0,100,1); Buy = Sell =0; Var = Zig ( RSI (), n); t= Trough ( RSI (), n, 1); p= Peak ( RSI (), n, 1); x[0] =Var[0]; price[0] = C [0]; j=0; // bearish divergence for ( i=0; i< BarCount ; i++) { if (Var[i] == p[i]) { j++; x[j] =Var[i]; price[j] = C [i]; if (x[j] <x[j-1] && price[j-1]< price[j]) Sell [i] =1; } } // bullish divergence for ( i=0; i< BarCount ; i++) { if (Var[i] == t[i]) { j++; x[j] =Var[i]; price[j] = C [i]; if (x[j] >x[j-1] && price[j]<price[j-1]) Buy [i] =1; } } Plot (Var, "" , 29); PlotShapes ( IIf ( Sell , shapeSmallCircle , shapeNone ), colorRed , 0 , Var,0); PlotShapes ( IIf ( Buy , shapeSmallCircle , shapeNone ), colorBrightGreen , 0, Var,0); Title = "RSI Divergence" ; _SECTION_END (); _SECTION_BEGIN ( "RSIa" ); P = ParamField ( "Price field" ); periods = Param ( "Periods" , 14, 1, 200, 1 ); Plot ( RSIa ( P, periods), _DEFAULT_NAME (), ParamColor ( "Color" , colorCycle ), ParamStyle ( "Style" ) ); _SECTION_END (); |