Today I had multiple charts open including range charts, and tick charts for CL. CL had a big burst around 12:47PM, a nice breakout worth 100+ ticks in a few minutes. The price moved 25 ticks in a single second 12:47:48PM resulting in almost 50-60 new single range bars in a second.
I noticed that during the spike up, the charts on NT could not keep up with the speed at which the price was changing. At times the delay was up to a few seconds! The range charts were creating multiple new bars and the PC could not keep up.
The problem this creates is that if you write a custom trading strategy, you will get screwed since your limit orders to enter will be well away from the market, and your stop-limit orders to enter will be rejected for the same reason.
A part of the problem is the DTN feed which sends every tick and hence triggers the OnBarUpdate methods. I have tried to use a combination of CalculateOnBarClose = false and IsFirstTickOfBar to limit computation but am still fine tuning how it works. Even that would not helped with the range bars.
I was wondering if NT can assign different priorities to different charts, based on whether they are running a live strategy or not or some user defined input. Internally it will mean that you maintain a high priority queue and a low priority queue of data-consumers and do not make calls to the On[Functions] for the lower priority strategies/indicators if the higher priority indicator/strategy is still processing data.
Alternatively, NT can defer the chart updates (plotting) while continuing to pump data into the indicators and strategies so that the strategy calculations and order processing continue while plotting is deferred.
I am using NT6.5 for this. Perhaps NT7 will be faster, but even there I doubt it can process so much information and do so much drawing at the same time.
Comment