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 ....
abc 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 | _SECTION_BEGIN ( "XY-Rotation Chart" ); _N ( base = ParamStr ( "Base" , "IHSG" ) ); _N ( list = ParamStr ( "Symbols" , "IDXBASIC,IDXCYCLIC,IDXENERGY,IDXFINANCE,IDXHEALTH,IDXINDUST,IDXINFRA,IDXNONCYC,IDXPROPERT,IDXTECHNO,IDXTRANS" ) ); tbar = Param ( "Trailing Bar" , 12, 1, 100, 1 ); EnableTextOutput ( False ); GfxSetOverlayMode ( 2 ); pxl = Status ( "pxchartleft" ); pxr = Status ( "pxchartright" ); pxt = Status ( "pxcharttop" ); pxb = Status ( "pxchartbottom" ); pxw = ( pxr - pxl ) / 2; pxh = ( pxb - pxt ) / 2; xm = pxl + pxw; ym = pxt + pxh; GfxMoveTo ( pxl, ym ); GfxLineTo ( pxr, ym ); GfxMoveTo ( xm, pxt ); GfxLineTo ( xm, pxb ); function getrs ( sc, t ) { bc = Foreign ( base, "C" ); sbr = sc / bc; rs1 = MA ( sbr, 12 ); rs2 = MA ( sbr, 26 ); rs = 100 * ( ( rs1 - rs2 ) / rs2 + 1 ); rm1 = MA ( rs, 1 ); rm2 = MA ( rs, 9 ); rm = 100 * ( ( rm1 - rm2 ) / rm2 + 1 ); return IIf ( t, rs , rm ) - 100; } function drawpos ( x, y, sym, text ) { rsl = VarGet ( "rsl" ); rsh = VarGet ( "rsh" ); rml = VarGet ( "rml" ); rmh = VarGet ( "rmh" ); xx = pxl + pxw + x * ( pxw / ( Max ( rsh, -rsl ) * 1.10 ) ); yy = pxb - pxh - y * ( pxh / ( Max ( rmh, -rml ) * 1.10 ) ); xp = Nz ( VarGet ( "xp" + sym ), xx ); yp = Nz ( VarGet ( "yp" + sym ), yy ); VarSet ( "xp" + sym, xx ); VarSet ( "yp" + sym, yy ); GfxMoveTo ( xp, yp ); GfxLineTo ( xx, yy ); GfxCircle ( xx, yy, IIf ( text == "" , 2, 4 ) ); if ( text != "" ) GfxTextOut ( sym, xx + 6 , yy - 3 ); } for ( i = 0; ( sym = StrExtract ( list, i ) ) != "" ; i++ ) { SetForeign ( sym ); rs = getrs( C , 1 ); rm = getrs( C , 0 ); for ( ii = BarCount - tbar; ii < BarCount ; ii++ ) { rs_ = rs[ ii ]; rm_ = rm[ ii ]; rsh = Nz ( VarGet ( "rsh" ), rs_ ); if ( rs_ >= rsh ) VarSet ( "rsh" , rs_ ); rsl = Nz ( VarGet ( "rsl" ), rs_ ); if ( rs_ <= rsl ) VarSet ( "rsl" , rs_ ); rmh = Nz ( VarGet ( "rmh" ), rm_ ); if ( rm_ >= rmh ) VarSet ( "rmh" , rm_ ); rml = Nz ( VarGet ( "rml" ), rm_ ); if ( rm_ <= rml ) VarSet ( "rml" , rm_ ); } RestorePriceArrays ( True ); } for ( i = 0; ( sym = StrExtract ( list, i ) ) != "" ; i++ ) { SetForeign ( sym ); rs = getrs( C , 1 ); rm = getrs( C , 0 ); for ( ii = BarCount - tbar; ii < BarCount ; ii++ ) { drawpos( rs[ ii ], rm[ ii ], sym, WriteIf ( ii == BarCount - 1, sym, "" ) ); } RestorePriceArrays ( True ); } _SECTION_END (); |