Below is a more efficient way of writing the DrawObject code:
if(!priorBull)
index = CurrentBar;
if (Opacity !=0)
DrawRegion("triggerBands" + index, CurrentBar - index + 1, 0, Trigger, TriggerAverage, colorTransparent, upColor, SmallTriggerOpacity);
bullish = true;
Thus using "triggerBands" + index is more CPU efficient than "triggerBands" + CurrentBar since the later is called on each bar.
Does anyone know if this is the same for all DrawObjects or is it unique to DrawRegion?
regards,
taddypole...
Comment