Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BID/ASK/Last seperation on bars

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BID/ASK/Last seperation on bars

    Hello,

    I hope you can help me understand why a certain behaviour in Ninjatrader 8 occurs. My first thought, of course, is that it was the commonly reported 'lag', but I do not belive this is the case, What I observe happens with the FXCM data feed (I cannot try others), and in fast moves, the BID/ASK, which drives price in this case (according to NT docs), separates from the bar high/lows. In case this is not clear. If you plot the bid/ask in real-time, it can be significantly higher than the bar high, or maybe lower than the bar low. This only happens when the price moves fast, and the bid/ask appears to lead the last reported price by the bar. Allow a very short period of slower movement, and the 2 will catch each other up. Here is a minor example. I have seen up to 50 ticks in extreme moves. The green shaded area is the bid/ask. The 2 black lines are plotting the bid/ask/close from another indicator, too. Just for testing and to be sure all indicators on the chart are getting the same bid/ask/close results (they are). Lines are plotted in OnRender. BID/ASK prices are sourced from calls to GetCurrentBid() GetCurrentAsk()

    Click image for larger version  Name:	image.png Views:	0 Size:	3.3 KB ID:	1235161

    I did not believe it was the chart 'lag' issue, as these lines are being plotted by indicators on the chart. i.e., they are not lagging. Only the price bars are lagging in their display.​ It can get far more extreme than this. In the ninjatrader documentation, it states that for this provider, "Chart data is driven from the current bid price", but as far as I can see, this is not currently the case. The reason I state this, is I have observed bid/ask shoot way ahead of price bar during volatility, etc, only for the price bar to not entirely follow to the extremes of the bid/ask, sometimes significantly. Again, bid//ask appears to 'lead' during velocity moves, sometimes by a quite considerable amount rather than simply report the last traded price, then revert to the price bar as things slow down/change direction. The price bar does not necessarily reach the extremes of where the bid was shown.

    My suspicion was the ninjatrader documentation is wrong, and the 'Close' reported to the bartype is not really the BID (or isn't anymore), or that somehow, the bars are decoupled from the data the indicators are receiving. I would appreciate it if you could offer any insight into what might be happening here. Should the data reported to a bar type in OnDataPoint() match the data provided to the Indicators in OnBarUpdate, lock-step? Can a bar type lag indicators? (I had thought they were all on the same single thread, running sequentially). Is the documentation for this provider still correct?

    Again, any additional insight into why this occurs would be appreciated.

    Many thanks.
    Last edited by pjsmith; 02-13-2023, 03:52 AM.

    #2
    Hello pjsmith,

    Thank you for writing in.

    From your description, it sounds like your NinjaTrader platform is experiencing Rendering Delays.
    • Rendering Delay occurs on your charts when they are trying to print too much information at once and cannot keep up with the current price.
    • This may become more prevalent on your charts during periods of high volatility and fast market movement.
    • You may also notice your orders filling immediately or being rejected as well as they are submitted to prices nowhere near the current market price.
    • Oftentimes, this is being caused by 3rd-party add-ons that are not efficiently rendering on your charts.
    To test for a price delay on your charts, compare the Last Price shown in your Chart to the Ask/Bid in the Chart Trader or the price of the same instrument in a SuperDOM window.
    • If the prices match, this indicates you are not getting delayed data and that your chart is successfully showing live data.
    • If the prices do not match, this indicates that your chart is experiencing rendering delay, meaning that it is printing too much information due to inefficient indicators or too many objects in your workspace.
    Please use the following steps to see what (if any) NinjaScript items may be contributing to the symptoms, please open the NinjaScript Utilization Monitor:
    • Control Center > New > NinjaScript Output
    • Right-click within the NinjaScript output window > Select 'NinjaScript Utilization Monitor...
    • This window will begin to populate with NinjaScript items in order of time spent processing
    • Let this window populate for at least a few minutes then send us a screenshot of it's contents using the steps below
    • If you are unsure of how to take a screenshot, I recommend using the Windows Snipping tool.
    • Click on the Windows Icon at the bottom of your screen and type the word "Snip" Click on the Snipping tool, click New, then click and drag around the area you want to screenshot
    • Click File > Save As > Save the screenshot where you can find it
    • Please click here for a video demonstration of Taking a Screenshot
    Finally, please follow the steps below to manually attach your log and trace files to your response so I may investigate this matter further.
    • Go to the Control Center > Help > Email Support
    • Select: Platform Technical Support
    • Enter the subject as: Clayton ATTN 03707831"
    • Use the "Attach" feature to attach the requested screenshot above.
    • Include any additional information in the Body as desired
    • Expand the "Other files" > Make sure all of the following are checked
      • Log and Trace files
      • Workspace files and UI settings
      • Templates
    • ​Send the message
    We look forward to receiving your email and resolving your inquiry.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    77 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    27 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    63 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X