PureBytes Links
Trading Reference Links
|
I wrote too quickly:
> Also, to improve speed, you should restrict the code so it
> only draws the trendline once a day instead of redrawing it on every
> bar.
Actually it's more important than that. If you try to redraw the line on
every bar, close and close[36] will will be calculated from the current
bar, not the 0700 bar, so you'll get a bunch of incorrect lines. Only
drawing the line once when time = 0700 fixes that.
--
Dennis
|