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 ....
Sup_Res 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 | // Compilated from any GfxSetBkMode (0); _SECTION_BEGIN ( "Price" ); ChartStyle = ParamToggle ( "ChartStyle" , "Candles|Bars" , 0); if ( ChartStyle == 0 ) { BodyColor = IIf ( C == O , colorBlue , IIf ( C < O , colorRed , colorLime )); SetBarFillColor (BodyColor); ChStyle = styleCandle ; } else if ( ChartStyle == 1 ) { BodyColor = colorDarkGrey ; ChStyle = styleBar | styleThick ; } Plot ( C , "Selected Bar Close" , colorBlack , ChStyle| styleNoLabel ); PR = LastValue ( Close ); PRCol = LastValue (BodyColor); Plot (PR, "" , PRCol, styleLine , Null , Null , 10); // Time to Go function GetSecondNum() { Time = Now (4); Seconds = int (Time % 100); Minutes = int (Time / 100 % 100); Hours = int (Time / 10000 % 100); SecondNum = int (Hours * 60 * 60 + Minutes * 60 + Seconds); return SecondNum; } TimeFrame = Interval (); SecNumber = GetSecondNum(); Newperiod = SecNumber % TimeFrame == 0; SecsLeft = SecNumber - int (SecNumber / TimeFrame) * TimeFrame; SecsToGo = TimeFrame - SecsLeft; GfxSetTextColor ( colorBlack ); GfxSelectPen ( colorBlack , 1); GfxSelectSolidBrush ( colorLightYellow ); GfxRoundRect (12,24,230,50,6,6); GfxDrawText ( "Time to Go " +SecsToGo+ " sec" ,12,24,230,50, 1|4|16|32); // DAILY HI LO DH = TimeFrameGetPrice ( "H" , inDaily ); DL = TimeFrameGetPrice ( "L" , inDaily ); HL = DH-DL; CloudColor = colorDarkGrey ; if ( ParamToggle ( "Daily High Low" , "Hide|Show" ,0) ) { Plot (DH, "" , colorOrange , styleStaircase | styleNoRescale , Null , Null , 0, 0, width = -80); Plot (DL, "" , colorGreen , styleStaircase | styleNoRescale , Null , Null , 0, 0, width = -80); } GfxSetTextColor ( colorBlack ); GfxSelectPen ( colorBlack , 1); GfxSelectSolidBrush ( colorLightYellow ); GfxRoundRect (12,54,230,80,6,6); GfxDrawText ( "Daily Range = " + WriteVal (HL,1),12,54,230,80, 1|4|16|32); _SECTION_END (); _SECTION_BEGIN ( "Sup_Res" ); SRShow = ParamToggle ( "Sup_Res" , "Hide|Show" , 1); SRBack = Param ( "Levels Num" , 3, 1, 20, 1); SRPer = Param ( "Accuracy" , 0.5, 0.1, 5, 0.1); SupColor = colorPink ; ResColor = colorPaleGreen ; function GetXSupport(Lo, Percentage, Back) { return (( BarCount - 1) - LastValue ( TroughBars (Lo, Percentage,Back))); } function GetYSupport(Lo, Percentage, Back) { return ( LastValue ( Trough (Lo, Percentage, back))); } function GetXResistance(Hi, Percentage, Back) { return (( BarCount - 1) - LastValue ( PeakBars (Hi, Percentage, Back))); } function GetYResistance(Hi, Percentage, Back) { return ( LastValue ( Peak (Hi, Percentage, Back))); } if (SRShow) { for (i=1; i<=SRBack; i++) { x0 = GetXSupport( L , SRPer, i); x1 = BarCount -1; y0 = GetYSupport( L , SRPer, i); x = LineArray (x0, y0, x1, y0, 0); Plot (x, "" , ResColor, styleNoRescale , Null , Null , 0, 0, width = -60); x0 = GetXResistance( H , SRPer, i); y0 = GetYResistance( H , SRPer, i); x = LineArray (x0, y0, x1, y0, 0); Plot (x, "" , SupColor, styleNoRescale , Null , Null , 0, 0, width = -60); } } else { } _SECTION_END (); _SECTION_BEGIN ( "Moving Averages" ); Fast = Param ( "Period Fast" , 8, 8, 50,1); Slow = Param ( "Period Slow" , 30,13,300,1); ShowMA = ParamToggle ( "Moving Averages" , "Hide|Show" , 0); if ( ShowMA == 1 ) { Plot ( EMA ( C , Fast), "" , colorRed , styleNoRescale , Null , Null , 0, 0, -30); Plot ( EMA ( C , Slow), "" , colorBlue , styleNoRescale , Null , Null , 0, 0, -30); } _SECTION_END (); |