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 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | _SECTION_BEGIN ( "camarilla levels" ); //---- pivot points DayH = TimeFrameGetPrice ( "H" , inWeekly , -1); // yesterdays high DayL = TimeFrameGetPrice ( "L" , inWeekly , -1); // low DayC = TimeFrameGetPrice ( "C" , inWeekly , -1); // close DayO = TimeFrameGetPrice ( "O" , inWeekly ,-1); // current day open // camarilla pivots if ( True ) { A = Optimize ( "X" , Param ( "A" ,0.17,0.1,1,0.01),0.1,1,0.01); R = DayH - DayL; // range PP = (DayH + DayL +DayC+DayO)/4; R1 = PP + (R * A); S1 = PP - (R * A); BT=R1+4*(R1-PP); ST=S1-4*(PP-S1); } Plot (R1, "" , colorBlue , styleStaircase ); Plot (S1, "" , colorBlue , styleStaircase ); //---- Title = Name ()+ " SIMPLE PIVOT & FIBO" + Date ()+ EncodeColor ( colorRed )+ " Long Breakout above " + WriteVal (R1,1.2)+ "\n" + EncodeColor ( colorRed )+ " Short breakout below " + WriteVal (S1,1.2) ; Filter =1; AddColumn ( C , "cmp" ,1.2); AddColumn (R1, "R4" ,1.2); AddColumn (S1, "S4" ,1.2); AddColumn (PP, "UP" ,1.2); _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 ,-1); // current day open // camarilla pivots if ( True ) { A = Optimize ( "X" , Param ( "A" ,0.17,0.1,1,0.01),0.1,1,0.01); R = DayH - DayL; // range PP = (DayH + DayL +DayC+DayO)/4; R1 = PP + (R * A); S1 = PP - (R * A); BT=R1+4*(R1-PP); ST=S1-4*(PP-S1); } Plot (R1, "" , colorWhite , styleStaircase ); Plot (S1, "" , colorWhite , styleStaircase ); //---- Title = Name ()+ " SIMPLE PIVOT & FIBO" + Date ()+ EncodeColor ( colorRed )+ " Long Breakout above " + WriteVal (R1,1.2)+ "\n" + EncodeColor ( colorRed )+ " Short breakout below " + WriteVal (S1,1.2) ; Filter =1; AddColumn ( C , "cmp" ,1.2); AddColumn (R1, "R4" ,1.2); AddColumn (S1, "S4" ,1.2); AddColumn (PP, "UP" ,1.2); _SECTION_END (); prev= AMA2 ( C ,1,0); d= IIf ( C > Ref ( Max ( Max ( H , Ref ( H ,-20)), Max ( Ref ( H ,-10), Ref ( H ,-15))),-1), Min ( Min ( L , Ref ( L ,-20)), Min ( Ref ( L ,-10), Ref ( L ,-15))), IIf ( C < Ref ( Min ( Min ( L , Ref ( L ,-20)), Min ( Ref ( L ,-10), Ref ( L ,-15))),-1), Max ( Max ( H , Ref ( H ,-20)), Max ( Ref ( H ,-10), Ref ( H ,-15))),PREV)); a= Cross ( Close ,d); b= Cross (d, Close ); state= IIf ( BarsSince (a)< BarsSince (b),1,0); s=state> Ref (state,-1); ss=state< Ref (state,-1); sss=state== Ref (state,-1); col= IIf (state == 1 ,51, IIf (state ==0,4,1)); Plot ( C , "" ,Col,128); PlotShapes ( shapeUpArrow * s ,6,0, L ); PlotShapes ( shapeDownArrow *ss ,4,0, H ); Filter = s OR sss OR sss ; AddColumn ( C , "close" ,1.2); AddColumn ( IIf ( s, 66,1 ), "buy" , formatChar, 1, bkcolor = IIf (s, colorYellow , colorPink )); AddColumn ( IIf ( Ss, 83,1 ), "sell" , formatChar, 1, bkcolor = IIf (Ss, colorPink , colorYellow )); AddColumn ( IIf ( sss, 87,1 ), "wait" , formatChar, 1, bkcolor = IIf (sss, colorYellow , colorRed )); _SECTION_BEGIN ( "" ); _N (Title = "{{NAME}} - {{INTERVAL}} {{DATE}}: " + _DEFAULT_NAME ()+ " : {{OHLCX}} {{VALUES}}" + "\n" + EncodeColor ( colorYellow )+ WriteIf (s, "EXIT all Short positions\nif trading long positions, enter long Now-\nOR at the market price on tomorrow's Open with stop=" + EncodeColor (4)+ WriteVal ( L +.75* ATR (5),1.4)+ "," , "" )+ WriteIf (ss, "exit all long positions today with a Market On Close (MOC) order\nOR at the market price on tomorrow's Open with stop=" + EncodeColor (4)+ WriteVal ( Ref ( H +.75* ATR (5), -1),1.4)+ "," , "" )+ WriteIf ( sss , "No trading signals today." , "" ) ); _SECTION_BEGIN ( "FDS SWING" ); no=15; 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" , colorTan , styleStaircase ); _SECTION_END ();prev= AMA2 ( C ,1,0); d= IIf ( C > Ref ( Max ( Max ( H , Ref ( H ,-20)), Max ( Ref ( H ,-10), Ref ( H ,-15))),-1), Min ( Min ( L , Ref ( L ,-20)), Min ( Ref ( L ,-10), Ref ( L ,-15))), IIf ( C < Ref ( Min ( Min ( L , Ref ( L ,-20)), Min ( Ref ( L ,-10), Ref ( L ,-15))),-1), Max ( Max ( H , Ref ( H ,-20)), Max ( Ref ( H ,-10), Ref ( H ,-15))),PREV)); a= Cross ( Close ,d); b= Cross (d, Close ); state= IIf ( BarsSince (a)< BarsSince (b),1,0); s=state> Ref (state,-1); ss=state< Ref (state,-1); sss=state== Ref (state,-1); col= IIf (state == 1 ,51, IIf (state ==0,4,1)); Plot ( C , "" ,Col,128); PlotShapes ( shapeUpArrow * s ,6,0, L ); PlotShapes ( shapeDownArrow *ss ,4,0, H ); Filter = s OR sss OR sss ; AddColumn ( C , "close" ,1.2); AddColumn ( IIf ( s, 66,1 ), "buy" , formatChar, 1, bkcolor = IIf (s, colorYellow , colorPink )); AddColumn ( IIf ( Ss, 83,1 ), "sell" , formatChar, 1, bkcolor = IIf (Ss, colorPink , colorYellow )); AddColumn ( IIf ( sss, 87,1 ), "wait" , formatChar, 1, bkcolor = IIf (sss, colorYellow , colorRed )); _SECTION_BEGIN ( "" ); _N (Title = "{{NAME}} - {{INTERVAL}} {{DATE}}: " + _DEFAULT_NAME ()+ " : {{OHLCX}} {{VALUES}}" + "\n" + EncodeColor ( colorYellow )+ WriteIf (s, "EXIT all Short positions\nif trading long positions, enter long Now-\nOR at the market price on tomorrow's Open with stop=" + EncodeColor (4)+ WriteVal ( L +.75* ATR (5),1.4)+ "," , "" )+ WriteIf (ss, "exit all long positions today with a Market On Close (MOC) order\nOR at the market price on tomorrow's Open with stop=" + EncodeColor (4)+ WriteVal ( Ref ( H +.75* ATR (5), -1),1.4)+ "," , "" )+ WriteIf ( sss , "No trading signals today." , "" ) ); _SECTION_BEGIN ( "FDS SWING" ); no=15; 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" , colorTan , styleStaircase ); _SECTION_END (); |