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 ....
ST for eSignal (EFS)
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 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 | * Fibonacci Internal & External Retracements */ // This is a Modified Version that shows Fibonacci 00% & 100% instead of WRONG Sup & Res _SECTION_BEGIN( "Background" ); SetChartOptions(0,chartShowArrows|chartShowDates); SetChartBkColor(ParamColor( "Outer panel" ,colorTan)); // color of outer border SetChartBkGradientFill( ParamColor( "Inner panel upper" ,colorBlack),ParamColor( "Inner panel lower" ,colorBlack)); tchoice=Param( "Title Selection " ,2,1,2,1); Plot(C, "" , IIf(O>=C, colorRed, colorGreen), ParamStyle( "Price Style" ,styleCandle,maskPrice)); ////////////////////////////////////////////////////////////////// _SECTION_BEGIN( "Fib Retracements" ); fibs = ParamToggle( "Plot Fibs" , "Off|On" ,1); pctH = Param ( "Pivot Hi %" , 0.325,0.001,2.0,0.002); HiLB = Param ( "Hi LookBack" ,1,1,BarCount-1,1); pctL = Param ( "Pivot Lo %" , 0.325,0.001,2.0,0.002); LoLB = Param ( "Lo LookBack" ,1,1,BarCount-1,1); Back = Param ( "Extend Left = 2" ,1,1,500,1); Fwd = Param( "Plot Forward" , 0, 0, 500, 1); text = ParamToggle( "Plot Text" , "Off|On" ,1); hts = Param ( "Text Shift" , -33.5,-50,50,0.10); style =ParamStyle( "Line Style" ,styleLine,styleNoLabel); x = BarIndex(); pRp = PeakBars( H, pctH, 1) == 0; yRp0 = SelectedValue(ValueWhen( pRp, H, HiLB)); xRp0 = SelectedValue(ValueWhen( pRp, x, HiLB)); pSp = TroughBars( L, pctL, 1) == 0; ySp0 = SelectedValue(ValueWhen( pSp, L, LoLB)); xSp0 = SelectedValue(ValueWhen( pSp, x, LoLB)); Delta = yRp0 - ySp0; function fib(ret) { retval = (Delta * ret); Fibval = IIf(ret < 1.0 AND xSp0 < xRp0, yRp0 - retval, IIf(ret < 1.0 AND xSp0 > xRp0, ySp0 + retval,IIf(ret > 1.0 AND xSp0 < xRp0, yRp0 - retval, IIf(ret > 1.0 AND xSp0 > xRp0, ySp0 + retval, Null)))); return FibVal; } x0 = Min(xSp0,xRp0)-Back; x1 = (BarCount -1); ////////////////////////////////////////////////////////////////// r236 = fib(0.236); r236I = LastValue (r236,1); r382 = fib(0.382); r382I = LastValue (r382,1); r050 = fib(0.50); r050I = LastValue (r050,1); r618 = fib(0.618); r618I = LastValue (r618,1); r786 = fib(0.786); r786I = LastValue (r786,1); e127 = fib(1.27); e127I = LastValue (e127,1); e162 = fib(1.62); e162I = LastValue (e162,1); e200 = fib(2.00); e200I = LastValue (e200,1); e262 = fib(2.62); e262I = LastValue (e262,1); e424 = fib(4.24); e424I = LastValue (e424,1); ////////////////////////////////////////////////////////////////// p00 = IIf(xSp0 > xRp0,ySp0,yRp0); p00I = LastValue (p00,1); p100 = IIf(xSp0 < xRp0,ySp0,yRp0); p100I = LastValue (p100,1); color00 =IIf(xSp0 > xRp0,colorLime,colorRed); color100 =IIf(xSp0 < xRp0,colorLime,colorRed); ////////////////////////////////////////////////////////////////// numbars = LastValue(Cum(Status( "barvisible" ))); fraction= IIf(StrRight(Name(),3) == "" , 3.2, 3.2); ////////////////////////////////////////////////////////////////// if (fibs==1) { Plot(LineArray(xRp0-Fwd,yRp0,x1,yRp0,Back), "PR" ,32,8|styleNoRescale,Null, Null,Fwd); Plot(LineArray(xSp0-Fwd,ySp0,x1,ySp0,Back), "PS" ,27,8|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r236,x1,r236,Back), "" ,45,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r382,x1,r382,Back), "" ,44,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r050,x1,r050,Back), "" ,41,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r618,x1,r618,Back), "" ,43,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,r786,x1,r786,Back), "" ,42,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e127,x1,e127,Back), "e127" ,47,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e162,x1,e162,Back), "e162" ,47,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e200,x1,e200,Back), "p200" ,47,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e262,x1,e262,Back), "p262" ,47,style|styleNoRescale,Null, Null,Fwd); Plot(LineArray(x0-Fwd,e424,x1,e424,Back), "p424" ,25,style|styleNoRescale,Null, Null,Fwd); } ////////////////////////////////////////////////////////////////// if (text==1) { PlotText( " 0% = " + WriteVal(p00,fraction), LastValue(BarIndex())-(numbars/hts), p00I + 0.05, color00); PlotText( "23% = " + WriteVal(r236,fraction), LastValue(BarIndex())-(numbars/hts), r236I + 0.05, 45); PlotText( "38% = " + WriteVal(r382,fraction), LastValue(BarIndex())-(numbars/hts), r382I + 0.05, 44); PlotText( "50% = " + WriteVal(r050,fraction), LastValue(BarIndex())-(numbars/hts), r050I + 0.05, 41); PlotText( "62% = " + WriteVal(r618,fraction), LastValue(BarIndex())-(numbars/hts), r618I + 0.05, 43); PlotText( "78% = " + WriteVal(r786,fraction), LastValue(BarIndex())-(numbars/hts), r786I + 0.05, 42); PlotText( "100% = " + WriteVal(p100,fraction), LastValue(BarIndex())-(numbars/hts),p100I + 0.05, color100); PlotText( "127% = " + WriteVal(e127,fraction), LastValue(BarIndex())-(numbars/hts),e127I + 0.05, 47); PlotText( "162% = " + WriteVal(e162,fraction), LastValue(BarIndex())-(numbars/hts),e162I + 0.05, 47); PlotText( "200% = " + WriteVal(e200,fraction), LastValue(BarIndex())-(numbars/hts),e200I + 0.05, 47); PlotText( "262% = " + WriteVal(e262,fraction), LastValue(BarIndex())-(numbars/hts),e262I + 0.05, 47); PlotText( "424% = " + WriteVal(e424,fraction), LastValue(BarIndex())-(numbars/hts),e424I + 0.05, 25); } _SECTION_END(); ////////////////////////////////////////////////////////////////// if (tchoice==1 ) { _N(Title = EncodeColor(colorWhite)+StrFormat( " {{NAME}} - {{INTERVAL}} {{Date}} Open: %g, High: %g, Low: %g, Close: %g {{VALUES}}" ,O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); } ////////////////////////////////////////////////////////////////// if (tchoice==2 ) { Title = EncodeColor(colorYellow) + "Fibonacci Internal & External Retracements " + EncodeColor(colorWhite) + Name() + " " + EncodeColor(colorWhite)+ Date() + " Tick = " + EncodeColor(5) + Interval()+ EncodeColor(colorWhite) + " Open = " + EncodeColor(colorWhite) + O + EncodeColor(colorWhite) + " High = " + EncodeColor(5) + H + EncodeColor(colorWhite) + " Low = " + EncodeColor(colorRed) + L + EncodeColor(colorWhite) + " Close = " + EncodeColor(colorWhite) + C + "\n" + EncodeColor( colorWhite) + "_______________" + "\n" + EncodeColor( colorWhite) + "424% = " + EncodeColor(25)+ e424 + " " + "\n" + EncodeColor( colorWhite) + "262% = " + EncodeColor(47)+ e262 + " " + "\n" + EncodeColor( colorWhite) + "200% = " + EncodeColor(47)+ e200 + " " + "\n" + EncodeColor( colorWhite) + "162% = " + EncodeColor(47)+ e162 + " " + "\n" + EncodeColor( colorWhite) + "127% = " + EncodeColor(47)+ e127 + " " + "\n" + EncodeColor( Color100) + "100% = " + EncodeColor(Color100) + p100 + " " + "\n" + EncodeColor( colorWhite) + "78.6% = " + EncodeColor(42)+ r786 + " " + "\n" + EncodeColor( colorWhite) + "61.8% = " + EncodeColor(43)+ r618 + " " + "\n" + EncodeColor( colorWhite) + "50% = " + EncodeColor(41)+ r050 + " " + "\n" + EncodeColor( colorWhite) + "38.2% = " + EncodeColor(44)+ r382 + " " + "\n" + EncodeColor( colorWhite) + "23.6% = " + EncodeColor(45)+ r236+ " " + "\n" + EncodeColor( Color00) + "00% = " + EncodeColor(Color00) + p00 + " " ; } GraphXSpace=5; //////////////////////////////////////////////////////////////////////////////////// _SECTION_BEGIN( "MOB simulation shiree" ); 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", colorPink ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); PlotOHLC(O,H,L,C, "Price" ,IIf(C>O,colorGreen,colorRed),styleCandle); //Date: 12-January 2002 by Thomas Zmuck //thomas.zm@ aon.at Offset = 5; //use two sheets: one with 5 and another with 7, or maybe other offset value Avgmov = Offset*MA(abs( ROC(C,1)) ,20); per = LastValue(Avgmov) ; x=Cum(1); Range = 0.01; PS = TroughBars(L, per,1) == 0; xa = LastValue(ValueWhen (PS,x,1)) ; //x from last trough Ya = LastValue(ValueWhen (PS,L,1)) ; //y (Low) last trough PR = PeakBars(H,per, 1) == 0; xb = LastValue(ValueWhen (PR,x,1)) ; //x from last peak Yb = LastValue(ValueWhen (PR,H,1)) ; //y (High) last peak Trough_ReTest = abs((L/ya)-1) <Range; Peak_ReTest = abs((H/yb)-1) <Range; Trough_Cross = Cross(ya,C); Peak_Cross = Cross(C,yb); //UP = upSwing DN = downSwing UP = xb>xa; //upSwing DN = xa>xb; //DownSwing RT23_6 = IIf(UP,yb-(yb- ya)*0.236, IIf(DN,ya+ (yb-ya)*0.236,-1e10) ); RT38_2 = IIf(UP,yb-(yb- ya)*0.382, IIf(DN,ya+ (yb-ya)*0.382,-1e10) ); RT50_0 = IIf(UP,yb-(yb- ya)*0.500, IIf(DN,ya+ (yb-ya)*0.500,-1e10) ); RT61_8 = IIf(UP,yb-(yb- ya)*0.618, IIf(DN,ya+ (yb-ya)*0.618,-1e10) ); RT78_6 = IIf(UP,yb-(yb- ya)*0.786, IIf(DN,ya+ (yb-ya)*0.786,-1e10) ); RT12_7 = IIf(UP,yb-(yb- ya)*1.27, IIf(DN,ya+ (yb-ya)*1.27,-1e10) ); RT16_1 = IIf(UP,yb-(yb- ya)*1.61, IIf(DN,ya+ (yb-ya)*1.61,-1e10) ); RT= IIf(UP,-100* (yb-L)/(yb- ya), 100*(H-ya)/( yb-ya)); //Retracement_ Value InZone = C<yb & C>ya; //use it for filter to receive only signals that are in in the Retracement zone. Buy = Trough_ReTest OR peak_Cross; Sell = Peak_ReTest OR trough_Cross; Filter = 1; AddColumn(RT, "RT%" ); AddColumn(Trough_ReTest, "TR- Test" ,1.0) ; AddColumn(Peak_ReTest, "PK-Test" ,1.0) ; AddColumn(Trough_Cross, "TR-Cross" ,1.0); AddColumn(Peak_Cross, "PK-Cross" ,1.0); //AddColumn(CdDoji( )OR CHammer(),"Candle" ,1.0); Plot(C, "C" ,1, 64); Plot(IIf(x>xa, ya,-1e10) , "Bottom" ,colorBrown, 1+8); Plot(IIf(x>xb, yb,-1e10) , "Top" ,colorBrown,1+8); xab = IIf(xb>xa,xb, xa); //Retracements Plot(IIf(x>= xab+1,RT23_6,-1e10), "23,6% Retr." ,5,1); Plot(IIf(x>= xab+1,RT38_2,-1e10), "38,2% Retr." ,5,1); Plot(IIf(x>= xab+1,RT50_0,-1e10), "50,0% Retr." ,colorBlue, 1); Plot(IIf(x>= xab+1,RT61_8,-1e10), "61,8% Retr." ,colorYellow, 1); Plot(IIf(x>= xab+1,RT78_6,-1e10), "78,6% Retr." ,colorYellow, 1); Plot(IIf(x>= xab+1,RT12_7,-1e10), "127% ext." ,colorBrightGreen, styleDots); Plot(IIf(x>= xab+1,RT16_1,-1e10), "161% ext." ,colorBrightGreen, styleDots); CondA=IIf(x>= xab+1,RT12_7,-1e10); CondB=IIf(x>= xab+1,RT16_1,-1e10); PlotOHLC(Condb,Condb,Conda,Conda, "" ,ColorRGB(30,130,30),styleCloud,styleNoLabel); GraphXSpace = 0.5; //Plot(Gauss2ord(C,5),"M5",4,1); //GraphXSpace = 1.5; //Title = Name()+" per = "+WriteVal(per, 1.0) +" Close = "+WriteVal(C, 1.2)+ " ("+WriteVal( ROC(C,1), 1.2)+"%)" +" Current Correction = "+WriteVal(RT, 1.0)+"%"; //Plot( Volume,"V", ParamColor("Color", colorBlueGrey ), ParamStyle( "Style", stylehidden| styleOwnScale | styleThick, maskHistogram ), 2 ); _SECTION_END( ); //---- Ramesh.S.R HaClose = (O+H+L+C)/4; HaOpen = AMA( Ref( HaClose, -1 ), .40); HaHigh = Max( H, Max( HaClose, HaOpen ) ); HaLow = Min( L, Min( HaClose, HaOpen ) ); xDiff = (HaHigh - Halow) * IIf(StrFind(Name(), "JPY" ),100,10000); barcolor = IIf(HaClose >= HaOpen,colorGreen,colorRed); // ****PlotOHLC( HaOpen, HaHigh, HaLow, HaClose, "", barcolor, styleCandle ); // Plot(EMA(HaClose,9),"",colorWhite, styleLine); // Plot(EMA(HaClose,18),"",colorBlack, styleLine); _SECTION_BEGIN( "Ramesh Swing1" ); no=Param( "Swing" , 10, 1, 55 ); tsl_col=ParamColor( "Color" , colorDarkRed ); 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); tsl=IIf(avn==1,sup,res); // line code Plot(tsl, _DEFAULT_NAME(), colorDarkRed, styleStaircase); // ribbon code // Plot( 2, "Ribbon",IIf(C>tsl,colorBlue,colorRed),styleOwnScale|styleArea|styleNoLabel, -0.5, 100 ); // arrows code Buy=Cross(C,Ref(res,-1)); Sell=Cross(Ref(sup,-1),C); shape=Buy*shapeUpArrow + Sell*shapeDownArrow; PlotShapes(shape,colorBlack,0,IIf(Buy,Low,High)); // scanner code Buy=Cross(C,tsl); Sell=Cross(tsl,C); _SECTION_END(); _SECTION_BEGIN( "Ramesh Swing2" ); no=Param( "Swing" , 20, 1, 55 ); tsl_col=ParamColor( "Color" , colorBlue ); 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); tsl=IIf(avn==1,sup,res); Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase); // or styleaArea Buy=Cross(C,tsl); Sell=Cross(tsl,C); shape=Buy*shapeUpArrow + Sell*shapeDownArrow; PlotShapes(shape,IIf(Buy,tsl_col,tsl_col),0,IIf(Buy,Low,High)); _SECTION_END(); _SECTION_BEGIN( "Ramesh Swing3" ); no=Param( "Swing" , 30, 1, 55 ); tsl_col=ParamColor( "Color" , colorGreen ); 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); tsl=IIf(avn==1,sup,res); Plot(tsl, _DEFAULT_NAME(), tsl_col, styleStaircase); // or styleaArea Buy=Cross(C,tsl); Sell=Cross(tsl,C); shape=Buy*shapeUpArrow + Sell*shapeDownArrow; PlotShapes(shape,IIf(Buy,tsl_col,tsl_col),0,IIf(Buy,Low,High)); _SECTION_END(); _SECTION_BEGIN( "Time Left" ); 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; } RequestTimedRefresh( 1 ); TimeFrame = Interval(); SecNumber = GetSecondNum(); Newperiod = SecNumber % TimeFrame == 0; SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame; SecsToGo = TimeFrame - SecsLeft; x=Param( "xposn" ,300,0,1000,1); y=Param( "yposn" ,50,0,1000,1); GfxSelectSolidBrush( ColorRGB( 230, 230, 230 ) ); GfxSelectPen( ColorRGB( 230, 230, 230 ), 2 ); if ( NewPeriod ) { GfxSelectSolidBrush( colorYellow ); GfxSelectPen( colorYellow, 2 ); Say( "New period" ); } GfxRoundRect( x+45, y+17, x-3, y-2, 0, 0 ); GfxSetBkMode(1); GfxSelectFont( "Arial" , 12, 700, False ); GfxSetTextColor( colorBlack ); GfxTextOut( "" +SecsToGo+ " / " +NumToStr( TimeFrame, 1.0 ), x, y ); _SECTION_END(); _SECTION_BEGIN( "Price2" ); 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( "Pop-Up" ); // 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; } function PopupWindowEx( popupID, bodytext, captiontext, timeout, left, top ) { displayText = bodytext + captiontext; if ( ( StaticVarGetText( "prevPopup" + popupID ) != displayText) OR ( StaticVarGet( "prevPopupTime" + popupID ) < GetSecondNum() ) ) { StaticVarSetText( "prevPopup" + popupID, displayText); StaticVarSet( "prevPopupTime" + popupID, GetSecondNum() + timeout ); PopupWindow( bodytext, Captiontext + popupID, timeout, Left, top ); } } //PopupWindowEx( "ID:1", "BUY", "test alert ", 5, -1, -1 ); //PopupWindowEx( "ID:2", "testing", "test alert ", 5, 0, 0 ); _SECTION_END(); |