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 camrilla adx kpl 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 | _SECTION_BEGIN ( "Price" ); SetChartOptions (0, chartShowArrows | chartShowDates ); _N (Title = StrFormat ( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}" , O , H , L , C , SelectedValue ( ROC ( C , 1 ) ) )); Plot ( C , "Close" , ParamColor ( "Color" , colorBlack ), styleNoTitle | ParamStyle ( "Style" ) | GetPriceStyle () ); _SECTION_END (); _SECTION_BEGIN ( "camarilla levels" ); //---- pivot points DayH = TimeFrameGetPrice ( "H" , inDaily , -1); // yesterdays high DayL = TimeFrameGetPrice ( "L" , inDaily , -1); //low DayC = TimeFrameGetPrice ( "C" , inDaily , -1); //close DayO = TimeFrameGetPrice ( "O" , inDaily ); // current day open // camarilla pivots if ( True ) { R = DayH - DayL; // range PP = (DayH + DayL + DayO + DayO) / 4 ; R4 = (R * 1.1/2)+DayC; R3 = (R * 1.1/4)+DayC; S3 = DayC-(R * 1.1/4); S4 = DayC- (R * 1.1/2); } Plot (R4, "" , colorGreen , styleLine ); Plot (R3, "R3" , colorRed , styleLine ); //---- Title = Name ()+ " Camarilla" + Date ()+ EncodeColor ( colorRed )+ " R3 " + WriteVal (R3,1.2)+ EncodeColor ( colorGreen )+ " S3 " + WriteVal (S3,1.2)+ "\n" + EncodeColor ( colorGreen )+ " Long Breakout above " + WriteVal (R4,1.2)+ "\n" + EncodeColor ( colorRed )+ " Short breakout below " + WriteVal (S4,1.2) + "\n" + EncodeColor ( colorGreen )+ " If Rangebound buy close to " + WriteVal (S3,1.2)+ "\n" + EncodeColor ( colorRed )+ " If Rangebound short close to " + WriteVal (R3,1.2); Filter =1; AddColumn ( C , "cmp" ,1.2); AddColumn (R3, "R3" ,1.2); AddColumn (R4, "R4" ,1.2); AddColumn (S3, "S3" ,1.2); AddColumn (S4, "S4" ,1.2); _SECTION_END (); _SECTION_BEGIN ( "FDS SWING" ); no=37; res= HHV ( H ,no); sup= LLV ( L ,no); avd= IIf ( C > Ref (res,-1),1, IIf ( C < Ref (sup,-1),-1,0)); avn= ValueWhen (avd!=0,avd,1); supres= IIf (avn==1,sup,res); Plot (supres, "Swing SL" , colorBlue , styleStaircase ); _SECTION_END (); range = 30; //Param("Periods", 14, 2, 200, 1 ); ADXi= ADX (range); PDIi= PDI (range); MDIi= MDI (range); //Plot( ADXi=ADX(range), _DEFAULT_NAME(), ParamColor( "ADX color", colorBlue ), ParamStyle("ADX style", styleThick ) ); //Plot( PDIi=PDI(range), "", ParamColor( "+DI color", colorGreen ), ParamStyle("+DI style") ); //Plot( MDIi=MDI(range), "", ParamColor( "-DI color", colorRed ), ParamStyle("-DI style") ); uptrend=PDIi>MDIi; //+di greater than -di downtrend=MDIi>PDIi; //-di greater than +di Ribboncol= IIf (upTrend, colorGreen , IIf (downtrend, colorRed , colorBlack )); Plot (6, "" , Ribboncol, styleOwnScale | styleArea | styleNoLabel , -7.5,100); |