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 ....
PARAH 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 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 | // AFL code by Edward Pottasch, Jan 2013 // Bullish + Bearish Head and Shoulder pattern SetOption ( "MaxOpenPositions" ,10); PositionSize=-5; SetTradeDelays (0,0,0,0); procedure exitLoop_proc( Buy , BuyPrice ,buDeltaProfitTarget,buStopLossLevel,buNeckline, Short , ShortPrice ,beDeltaProfitTarget,beStopLossLevel,beNeckline,Maxbars) { global BuyAdjusted; global BuyPriceAdjusted; global ShortAdjusted; global ShortPriceAdjusted; global SellAdjusted; global SellPriceAdjusted; global CoverAdjusted; global CoverPriceAdjusted; global LongStopTrail; global ShortStopTrail; global LongTarget; global ShortTarget; BuyAdjusted=0; BuyPriceAdjusted=0; ShortAdjusted=0; ShortPriceAdjusted=0; SellAdjusted=0; SellPriceAdjusted=0; CoverAdjusted=0; CoverPriceAdjusted=0; LongStopTrail= Null ; ShortStopTrail= Null ; LongTarget= Null ; ShortTarget= Null ; for (i=1;i< BarCount ;i++) { if ( Buy [i]) { BuyAdjusted[i]=1; BuyPriceAdjusted[i]= BuyPrice [i]; LongStopTrail[i]=buStopLossLevel[i]; LongTarget[i]=buNeckline[i]+buDeltaProfitTarget[i]; cnt=0; for (j=i+1;j< BarCount ;j++) { LongStopTrail[j]=LongStopTrail[i]; LongTarget[j]=LongTarget[i]; if (cnt>Maxbars) { SellAdjusted[j]=1; SellPriceAdjusted[j]= C [j]; i=j; break ; } else if ( C [j]<LongStopTrail[j]) { SellAdjusted[j]=1; SellPriceAdjusted[j]= C [j]; i=j; break ; } else if ( C [j]>LongTarget[j]) { SellAdjusted[j]=1; SellPriceAdjusted[j]= C [j]; i=j; break ; } else if (j== BarCount -1) { i= BarCount ; break ; } cnt=cnt+1; } } else if ( Short [i]) { ShortAdjusted[i]=1; ShortPriceAdjusted[i]= ShortPrice [i]; ShortStopTrail[i]=beStopLossLevel[i]; ShortTarget[i]=beNeckline[i]-beDeltaProfitTarget[i]; cnt=0; for (j=i+1;j< BarCount ;j++) { ShortStopTrail[j]=ShortStopTrail[i]; ShortTarget[j]=ShortTarget[i]; if (cnt>Maxbars) { CoverAdjusted[j]=1; CoverPriceAdjusted[j]= C [j]; i=j; break ; } else if ( C [j]>ShortStopTrail[j]) { CoverAdjusted[j]=1; CoverPriceAdjusted[j]= C [j]; i=j; break ; } else if ( C [j]<ShortTarget[j]) { CoverAdjusted[j]=1; CoverPriceAdjusted[j]= C [j]; i=j; break ; } else if (j== BarCount -1) { i= BarCount ; break ; } cnt=cnt+1; } } } } xx= BarIndex ();x=xx;Lx= LastValue (x); nbar= Param ( "N Pivot Bars" ,5,2,50,1); tf= Param ( "Time Frame (min)" ,5,0.001,1440,0.001);tfrm= in1Minute *tf; atrper= Param ( "ATR Period (bars)" ,20,2,100,1); atrfac1= Param ( "ATR tolerance factor (Shoulders)" ,2.25,0,50,0.01); atrfac2= Param ( "ATR tolerance factor (Head Minimum)" ,0.4,0,50,0.01); atrfac3= Param ( "ATR tolerance factor (Head Maximum)" ,5,0,50,0.01); CleanPivots= ParamToggle ( "Use Clean Pivots" , "Off|On" ,1); PivotSymmetry= ParamToggle ( "Use Symmetric Pivots" , "Off|On" ,0); dispbeHS= ParamToggle ( "Display bearish HS" , "Off|On" ,1); dispbuHS= ParamToggle ( "Display bullish HS" , "Off|On" ,1); extendN= Param ( "Extension neckline (bars)" ,100,0,500,1); validSignalRangeCheck= ParamToggle ( "Signal Validity Range Check" , "Off|On" ,1); hssym= Param ( "Max Deviation H&S Symmetry (%)" ,80,0,500,1); includeVolumeSlope= ParamToggle ( "Volume Slope Constraint" , "Off|On" ,0); Maxbars= Param ( "Maximum bars of trade" ,50,2,200,1); TimeFrameSet (tfrm); atra= ATR (atrper); if (PivotSymmetry) { fc=1; pk= H > Ref ( HHV ( H ,nbar*fc),-1) AND Ref ( HHV ( H ,nbar),nbar)<= H ; tr= L < Ref ( LLV ( L ,nbar*fc),-1) AND Ref ( LLV ( L ,nbar),nbar)>= L ; } else { fc=2; pk= H > Ref ( HHV ( H ,nbar*fc),-1) AND Ref ( HHV ( H ,nbar),nbar)<= H ; tr= L < Ref ( LLV ( L ,nbar*fc),-1) AND Ref ( LLV ( L ,nbar),nbar)>= L ; } px0= ValueWhen (pk,x,0); tx0= ValueWhen (tr,x,0); px1= ValueWhen (pk,x,1); tx1= ValueWhen (tr,x,1); px2= ValueWhen (pk,x,2); tx2= ValueWhen (tr,x,2); px3= ValueWhen (pk,x,3); tx3= ValueWhen (tr,x,3); ph0= ValueWhen (pk, H ,0); tl0= ValueWhen (tr, L ,0); ph1= ValueWhen (pk, H ,1); tl1= ValueWhen (tr, L ,1); ph2= ValueWhen (pk, H ,2); tl2= ValueWhen (tr, L ,2); ph3= ValueWhen (pk, H ,3); tl3= ValueWhen (tr, L ,3); if (CleanPivots) { tr= IIf ((tr==1 AND pk==1) AND px2<tx2, False ,tr); pk= IIf ((tr==1 AND pk==1) AND px2>tx2, False ,pk); px0= ValueWhen (pk,x,0); tx0= ValueWhen (tr,x,0); px1= ValueWhen (pk,x,1); tx1= ValueWhen (tr,x,1); px2= ValueWhen (pk,x,2); tx2= ValueWhen (tr,x,2); px3= ValueWhen (pk,x,3); tx3= ValueWhen (tr,x,3); ph0= ValueWhen (pk, H ,0); tl0= ValueWhen (tr, L ,0); ph1= ValueWhen (pk, H ,1); tl1= ValueWhen (tr, L ,1); ph2= ValueWhen (pk, H ,2); tl2= ValueWhen (tr, L ,2); ph3= ValueWhen (pk, H ,3); tl3= ValueWhen (tr, L ,3); tr= IIf (tr AND ((tx0<px0 AND tl1>tl0) OR (tx2>px1 AND tl1>=tl2) OR (px0==px1 AND tl1>tl0)), False ,tr); pk= IIf (pk AND ((px0<tx0 AND ph1<ph0) OR (px2>tx1 AND ph1<=ph2) OR (tx0==tx1 AND ph1<ph0)), False ,pk); px0= ValueWhen (pk,x,0); tx0= ValueWhen (tr,x,0); px1= ValueWhen (pk,x,1); tx1= ValueWhen (tr,x,1); px2= ValueWhen (pk,x,2); tx2= ValueWhen (tr,x,2); px3= ValueWhen (pk,x,3); tx3= ValueWhen (tr,x,3); ph0= ValueWhen (pk, H ,0); tl0= ValueWhen (tr, L ,0); ph1= ValueWhen (pk, H ,1); tl1= ValueWhen (tr, L ,1); ph2= ValueWhen (pk, H ,2); tl2= ValueWhen (tr, L ,2); ph3= ValueWhen (pk, H ,3); tl3= ValueWhen (tr, L ,3); tr= IIf (tr AND ((tx0<px0 AND tl1>tl0) OR (tx2>px1 AND tl1>=tl2) OR (px0==px1 AND tl1>tl0)), False ,tr); pk= IIf (pk AND ((px0<tx0 AND ph1<ph0) OR (px2>tx1 AND ph1<=ph2) OR (tx0==tx1 AND ph1<ph0)), False ,pk); px0= ValueWhen (pk,x,0); tx0= ValueWhen (tr,x,0); px1= ValueWhen (pk,x,1); tx1= ValueWhen (tr,x,1); px2= ValueWhen (pk,x,2); tx2= ValueWhen (tr,x,2); px3= ValueWhen (pk,x,3); tx3= ValueWhen (tr,x,3); ph0= ValueWhen (pk, H ,0); tl0= ValueWhen (tr, L ,0); ph1= ValueWhen (pk, H ,1); tl1= ValueWhen (tr, L ,1); ph2= ValueWhen (pk, H ,2); tl2= ValueWhen (tr, L ,2); ph3= ValueWhen (pk, H ,3); tl3= ValueWhen (tr, L ,3); } pkh= IIf (pk, H , Null ); trl= IIf (tr, L , Null ); TimeFrameRestore (); fact= Nz ( Max (tfrm/60, Interval ()/60)/( Interval ()/60)); if (fact==0)fact=1; Lkbk=tfrm/ Interval (); if (Lkbk>1 AND ! IsNan (Lkbk)) { pk= TimeFrameExpand (pk,tfrm,expandFirst); pkh= TimeFrameExpand (pkh,tfrm,expandFirst); pkhs= IIf (! IsEmpty (pkh),1,0);pkhs=pkhs- Ref (pkhs,-1); pk=pk AND H ==pkh; cond1= Sum (pk, BarsSince (pkhs==1)+1)==1 AND pk; pk=pk AND cond1; tr= TimeFrameExpand (tr,tfrm,expandFirst); trl= TimeFrameExpand (trl,tfrm,expandFirst); trls= IIf (! IsEmpty (trl),1,0);trls=trls- Ref (trls,-1); tr=tr AND L ==trl; cond1= Sum (tr, BarsSince (trls==1)+1)==1 AND tr; tr=tr AND cond1; px0= ValueWhen (pk,x,0); tx0= ValueWhen (tr,x,0); px1= ValueWhen (pk,x,1); tx1= ValueWhen (tr,x,1); px2= ValueWhen (pk,x,2); tx2= ValueWhen (tr,x,2); px3= ValueWhen (pk,x,3); tx3= ValueWhen (tr,x,3); ph0= ValueWhen (pk, H ,0); tl0= ValueWhen (tr, L ,0); ph1= ValueWhen (pk, H ,1); tl1= ValueWhen (tr, L ,1); ph2= ValueWhen (pk, H ,2); tl2= ValueWhen (tr, L ,2); ph3= ValueWhen (pk, H ,3); tl3= ValueWhen (tr, L ,3); atra= TimeFrameExpand (atra,tfrm,expandFirst); } ll=tr AND tl1<tl2; hl=tr AND tl1>tl2; hh=pk AND ph1>ph2; lh=pk AND ph1<ph2; dt=pk AND ph1==ph2; db=tr AND tl1==tl2; ll_h= IIf (ll,1,0); hl_h= IIf (hl,2,0); hh_h= IIf (hh,3,0); lh_h= IIf (lh,4,0); dt_h= IIf (dt,5,0); db_h= IIf (db,6,0); combi=ll_h+hl_h+lh_h+hh_h+dt_h+db_h; t0= ValueWhen (combi,combi,0); t1= ValueWhen (combi,combi,1); t2= ValueWhen (combi,combi,2); t3= ValueWhen (combi,combi,3); t4= ValueWhen (combi,combi,4); t5= ValueWhen (combi,combi,5); // bearisch pattern beHS=pk AND t1==4 AND (t2==1 OR t2==2) AND t3==3 AND t4==2 AND (t5==3 OR t5==4) AND abs (tl1-tl2)<atra*atrfac1 AND abs (ph1-ph3)<atra*atrfac1 AND ph2>( Max (ph1,ph3)+atra*atrfac2) AND ph2<( Max (ph1,ph3)+atra*atrfac3); beAx= ValueWhen (beHS,px3);beAy= ValueWhen (beHS,ph3); beBx= ValueWhen (beHS,tx2);beBy= ValueWhen (beHS,tl2); beCx= ValueWhen (beHS,px2);beCy= ValueWhen (beHS,ph2); beDx= ValueWhen (beHS,tx1);beDy= ValueWhen (beHS,tl1); beEx= ValueWhen (beHS,px1);beEy= ValueWhen (beHS,ph1); beFx= ValueWhen (beHS,px1);aa=(beDy-beBy)/(beDx-beBx);bb=beDy;ii=px1-beDx;beFy=aa*ii+bb; beHS=beHS AND 100* abs ((beCx-beAx)-(beEx-beCx))/( Min (beCx-beAx,beEx-beCx)+1)<hssym; if (includeVolumeSlope) beHS= IIf (beHS AND LinRegSlope ( V ,beEx-beAx)<0,beHS,0); rr= BarsSince (beHS)>=0 AND BarsSince (beHS)<extendN; idx= IIf (rr,xx- ValueWhen (beHS,beDx), Null ); aa= ValueWhen (beHS,aa);bb= ValueWhen (beHS,bb); beNeckline= IIf (idx,aa*idx+bb, Null ); beValidSignalArea= Ref ( Flip ( Ref (beHS,-1),pk),1); if (validSignalRangeCheck) beNeckline= IIf (beValidSignalArea,beNeckline, Null ); beGx=beCx;beGy=beBy+(beDy-beBy)/(beDx-beBx)*(beCx-beBx); Short = Cross (beNeckline, C ) AND ! IsEmpty (beNeckline); Short = Ref ( Short ,-1); ShortPrice = O ; Short = ExRem ( Short ,beHS);beDeltaProfitTarget=beCy-beGy;beStopLossLevel=beEy; // bullish pattern buHS=tr AND t1==2 AND (t2==3 OR t2==4) AND t3==1 AND t4==4 AND (t5==1 OR t5==2) AND abs (ph1-ph2)<atra*atrfac1 AND abs (tl1-tl3)<atra*atrfac1 AND tl2<( Max (tl1,tl3)-atra*atrfac2) AND tl2>( Max (tl1,tl3)-atra*atrfac3); buAx= ValueWhen (buHS,tx3);buAy= ValueWhen (buHS,tl3); buBx= ValueWhen (buHS,px2);buBy= ValueWhen (buHS,ph2); buCx= ValueWhen (buHS,tx2);buCy= ValueWhen (buHS,tl2); buDx= ValueWhen (buHS,px1);buDy= ValueWhen (buHS,ph1); buEx= ValueWhen (buHS,tx1);buEy= ValueWhen (buHS,tl1); buFx= ValueWhen (buHS,tx1);aa=(buDy-buBy)/(buDx-buBx);bb=buDy;ii=tx1-buDx;buFy=aa*ii+bb; buHS=buHS AND 100* abs ((buCx-buAx)-(buEx-buCx))/( Min (buCx-buAx,buEx-buCx)+1)<hssym; if (includeVolumeSlope) buHS= IIf (buHS AND LinRegSlope ( V ,buEx-buAx)<0,buHS,0); rr= BarsSince (buHS)>=0 AND BarsSince (buHS)<extendN; idx= IIf (rr,xx- ValueWhen (buHS,buDx), Null ); aa= ValueWhen (buHS,aa);bb= ValueWhen (buHS,bb); buNeckline= IIf (idx,aa*idx+bb, Null ); buValidSignalArea= Ref ( Flip ( Ref (buHS,-1),tr),1); if (validSignalRangeCheck) buNeckline= IIf (buValidSignalArea,buNeckline, Null ); buGx=buCx;buGy=buBy+(buDy-buBy)/(buDx-buBx)*(buCx-buBx); Buy = Cross ( C ,buNeckline) AND ! IsEmpty (buNeckline); Buy = Ref ( Buy ,-1); BuyPrice = O ; Buy = ExRem ( Buy ,buHS);buDeltaProfitTarget=buGy-buCy;buStopLossLevel=buEy; exitLoop_proc( Buy , BuyPrice ,buDeltaProfitTarget,buStopLossLevel,buNeckline, Short , ShortPrice ,beDeltaProfitTarget,beStopLossLevel,beNeckline,Maxbars); Buy =BuyAdjusted; BuyPrice =BuyPriceAdjusted; Short =ShortAdjusted; ShortPrice =ShortPriceAdjusted; Sell =SellAdjusted; SellPrice =SellPriceAdjusted; Cover =CoverAdjusted; CoverPrice =CoverPriceAdjusted; SetChartBkColor ( ColorRGB (0,0,0)); SetChartOptions (0, chartShowDates ); SetBarFillColor ( IIf ( C > O , colorGreen , IIf ( C <= O , colorRed , colorLightGrey ))); Plot ( C , "Price" , IIf ( C > O , colorDarkGreen , IIf ( C <= O , colorDarkRed , colorLightGrey )),64,0,0,0,0); Plot (pkh, "" , colorRed , styleThick ,0,0,0,-1); Plot (trl, "" , colorBrightGreen , styleThick ,0,0,0,-1); PlotShapes ( shapeSmallCircle *tr, IIf (Lx- ValueWhen (tr,x)>nbar*fact, ColorRGB (0,100,0), colorWhite ),0, L ,-10); PlotShapes ( shapeSmallCircle *pk, IIf (Lx- ValueWhen (pk,x)>nbar*fact, ColorRGB (255,0,0), colorWhite ),0, H ,10); if (dispbuHS) { Plot (buNeckline, "" , colorGreen , styleNoLine | styleDots ,0,0,0,0,1); PlotShapes ( IIf ( Buy , shapeUpArrow , shapeNone ), colorDarkGreen ,0, L ,-15); PlotShapes ( IIf ( Buy , shapeSmallCircle , shapeNone ), colorWhite ,0, BuyPrice ,0); PlotShapes ( IIf ( Sell , shapeDownArrow , shapeNone ), colorRed ,0, H ,-15); PlotShapes ( IIf ( Sell , shapeSmallCircle , shapeNone ), colorWhite ,0, SellPrice ,0); Plot (LongStopTrail, "" , colorRed , styleLine ,0,0,0,1,1); Plot (LongTarget, "" , colorBrightGreen , styleLine ,0,0,0,1,1); } if (dispbeHS) { Plot (beNeckline, "" , colorRed , styleNoLine | styleDots ,0,0,0,0,1); PlotShapes ( IIf ( Short , shapeSmallDownTriangle , shapeNone ), colorRed ,0, H ,-15); PlotShapes ( IIf ( Short , shapeSmallCircle , shapeNone ), colorWhite ,0, ShortPrice ,0); PlotShapes ( IIf ( Cover , shapeSmallUpTriangle , shapeNone ), colorDarkGreen ,0, L ,-15); PlotShapes ( IIf ( Cover , shapeSmallCircle , shapeNone ), colorWhite ,0, CoverPrice ,0); Plot (ShortStopTrail, "" , colorRed , styleLine ,0,0,0,1,1); Plot (ShortTarget, "" , colorBrightGreen , styleLine ,0,0,0,1,1); } qq= Interval ()/60; if (qq < 60){tf= " min" ;tt=qq;} else if (qq >= 60 AND qq < 1440){tf= " hrs" ;tt=qq/60;} else if (qq >= 1440){tf= " days" ;tt=(qq/60)/24;} qq= Max (tfrm/60, Interval ()/60); if (qq < 60){tfa= " min" ;tta=qq;} else if (qq >= 60 AND qq < 1440){tfa= " hrs" ;tta=qq/60;} else if (qq >= 1440){tfa= " days" ;tta=(qq/60)/24;} Title = Name () + "\nNbar: " + nbar + "\nChart TF: " + tt + tf + "\nTrend TF: " + tta + tfa; abcdy_up=20; abcdy_dn=28; function GetVisibleBarCount() { lvb= Status ( "lastvisiblebar" ); fvb= Status ( "firstvisiblebar" ); return Min (lvb-fvb, BarCount -fvb); } function GfxConvertPixelsToBarX(Pixels) { lvb= Status ( "lastvisiblebar" ); fvb= Status ( "firstvisiblebar" ); pxchartleft= Status ( "pxchartleft" ); pxchartwidth= Status ( "pxchartwidth" ); fac=pxchartwidth/Pixels; bar=(lvb-fvb)/fac; return bar; } function GfxConvertPixelToValueY(Pixels) { local Miny,Maxy,pxchartbottom,pxchartheight; Miny= Status ( "axisminy" ); Maxy= Status ( "axismaxy" ); pxchartbottom= Status ( "pxchartbottom" ); pxchartheight= Status ( "pxchartheight" ); fac=pxchartheight/Pixels; Value=(Maxy-Miny)/fac; return Value; } AllVisibleBars=GetVisibleBarCount(); fvb= Status ( "firstvisiblebar" ); abcdy_up=GfxConvertPixelToValueY(abcdy_up); abcdy_dn=GfxConvertPixelToValueY(abcdy_dn); for (i=0;i<AllVisibleBars;i++) { if (beHS[i+fvb] AND dispbeHS) { clr= colorRed ; lvix=i+fvb; Plot ( LineArray (beAx[lvix],beAy[lvix],beBx[lvix],beBy[lvix],0, True ), "" ,clr, styleThick ); Plot ( LineArray (beBx[lvix],beBy[lvix],beCx[lvix],beCy[lvix],0, True ), "" ,clr, styleThick ); Plot ( LineArray (beCx[lvix],beCy[lvix],beDx[lvix],beDy[lvix],0, True ), "" ,clr, styleThick ); Plot ( LineArray (beDx[lvix],beDy[lvix],beEx[lvix],beEy[lvix],0, True ), "" ,clr, styleThick ); Plot ( LineArray (beDx[lvix],beDy[lvix],beFx[lvix],beFy[lvix],0, True ), "" ,clr, styleDashed ); Plot ( LineArray (beBx[lvix],beBy[lvix],beDx[lvix],beDy[lvix],0, True ), "" ,clr, styleDashed ); PlotText ( "S1" ,beAx[lvix]-0,beAy[lvix]+abcdy_up, colorRed , colorDefault ); PlotText ( "H" ,beCx[lvix]-0,beCy[lvix]+abcdy_up, colorRed , colorDefault ); PlotText ( "S2" ,beEx[lvix]-0,beEy[lvix]+abcdy_up, colorRed , colorDefault ); } if (buHS[i+fvb] AND dispbuHS) { clr= colorGreen ; lvix=i+fvb; Plot ( LineArray (buAx[lvix],buAy[lvix],buBx[lvix],buBy[lvix],0, True ), "" ,clr, styleThick ); Plot ( LineArray (buBx[lvix],buBy[lvix],buCx[lvix],buCy[lvix],0, True ), "" ,clr, styleThick ); Plot ( LineArray (buCx[lvix],buCy[lvix],buDx[lvix],buDy[lvix],0, True ), "" ,clr, styleThick ); Plot ( LineArray (buDx[lvix],buDy[lvix],buEx[lvix],buEy[lvix],0, True ), "" ,clr, styleThick ); Plot ( LineArray (buDx[lvix],buDy[lvix],buFx[lvix],buFy[lvix],0, True ), "" ,clr, styleDashed ); Plot ( LineArray (buBx[lvix],buBy[lvix],buDx[lvix],buDy[lvix],0, True ), "" ,clr, styleDashed ); PlotText ( "S1" ,buAx[lvix]-0,buAy[lvix]-abcdy_dn, colorGreen , colorDefault ); PlotText ( "H" ,buCx[lvix]-0,buCy[lvix]-abcdy_dn, colorGreen , colorDefault ); PlotText ( "S2" ,buEx[lvix]-0,buEy[lvix]-abcdy_dn, colorGreen , colorDefault ); } } |