I'm in touch with Ninja support since a few days about this issue.
Basically I noticed that Ask and Bid does not always update correctly from OnMarketData
Here you will find a screenshot and the matching indicator.
You can check the script is straight to basic and contains only one line of code : If(e.MarketDataType==e.MarketDataType.Ask) Values.Set(e.Price);
I noticed that bid/ ask was updating correctly only 70% of the time but from time to time would not update accordingly.
Anyone aware of this or can check my indi on his platform ?
I run :
- NT7 R7
- CQG demo (AMP futures)
- whatever instrument (FDAX, ES, 6E)
- timeframe : I guess whatever but I'm sure about 5 minute or 10 minute
- chart properties : display interval set to minimum aka 0,1
- very fast high end computer (Alienware)
Last edited by baberg; August 30th, 2011 at 08:42 AM.
Try going to Properties | Display Update Intervel and the set the value to smallest number possible. I think it would be 0.10 but not sure. NT controls the chart draw/update so that many computers will not get overloaded. OnMarketData updates with every incoming tick.
- The chart canvas updates on the timer
- The market data values on the Chart Trader Panel updated immediately on arriving market data events
- Thus the two will not be in sync and is expected by design
Actually on the chart, ask/bid will only update if it occurs at the same time than a last price level change. If ask or bid refreshes while last price stays the same, then it won't update.
It is more of a problem when market lacks ask/bid events, that is to say less liquid instruments or at ETH/globex/night hours.
Too bad, because my use of OnMarketData then becomes kind of pointless.
To me, it sounds like a truncated design and should be corrected/updated on user's choice at least. Please suggest it to your development team.
If you scan this forum, there likely is a thread on how you can control this at your command however, this is not an officially supported approach nor do we suggest it. If you want to trigger a repaint of the chart on every change in bid/ask data, you are asking for performance issues and in fact, I would guarantee that you will lock up NinjaTrader since the sheer amound of bid/ask changes is orders of magnitude higher than last trade events.
Maybe it would not freeze running Ninja on very high-end "war" computers. Some only display one chart at a time also requiring less performance. That is why I suggested to let it user-controlled for a future release.
Anyway I'll use override plot like you suggested. Thanks again.
Last edited by baberg; August 30th, 2011 at 11:45 AM.
Override plot reacts to specific events like last price refresh, scroll movement, mouse click etc.
However, the refresh rate is not enough for me. I'd really wish to achieve a charting plot update each time bid or ask changes without waiting for the last price to update (and no other specific user-action neither)
Do you have a solution ? Simulate a fonction ? Simulate left click or scroll movement is not practical.
Any tips ???
Thanks a lot
The following user says Thank You to baberg for this post: