To detect a new bar (BARSTATE_NEWBAR) in a different series (to the chart), ie "xSeries=sym("symbol,interval")", the proper siolution would seem to be use getBarStateSymbol("symbol,interval");, not getBarStateSymbol(xSeries); note, and test against BARSTATE_NEWBAR.
But a quick timing check seems to indicate that testing "rawtime(0,xSeries) != mtLastRT" performs almost three times as fast and on my machine saves almost .1ms per iteration.
As far as I can tell this will do the same job. Anyone got better info or see a flaw?
But a quick timing check seems to indicate that testing "rawtime(0,xSeries) != mtLastRT" performs almost three times as fast and on my machine saves almost .1ms per iteration.
As far as I can tell this will do the same job. Anyone got better info or see a flaw?
Comment