I am developing a complex indicator that parses Level II data.
I frequently see time lapses in my input data! I test in my code if Time[1] is more than one second behind Time[0] and my test code will frequently report gaps of 2,3,4 and even 5 seconds!
The stock under consideration is 'AMD' and the data provider Kinetick with their LevelII data stream.
This indicators has its 'Calculate' field to OnBarClose (not OnEachTick), and is the only one running and without a strategy (within the context of a normal real-time chart). On the downside it does process OnMarketUpdate() but I've already placed code in there to make it as efficient as possible (for example by returning early when the depth is too far from the strike price)
Q1: Have you seen this happening with simple indicators?
Q2: Do you think this happens because I take too long in OnMarketUpdate() (My code is based on the reference example you sent a couple months back)
Q3: If you suspect it's my code loading the system too much, what should I reduce first?
Q4: Is there some timing instrumentation I can implement in time-sensitive calls so I can self-detect if my code takes too long in time-critical areas? (e.g. taking too long in OnMarketDepth())
Thanks!
Comment