Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Level 2 data stream

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

    Level 2 data stream

    Where can I find more detailed info on how the level 2 data stream works?

    I am studying the OnMarketDepth() and noticed a few behaviors I cannot explain nor find more info on. If there's a white paper or something more technical on the topic that might help answer the questions below, I would be grateful. First, I'm studying by writing an indicator. It is only reading the level 2 data stream, then stream writing to a file. I'm receiving no errors. Set to Calculate.OBC, 1-minute chart. Only a single Print() in the OBU().

    1) I have noticed at times order entries in the text file can be several seconds out of chronological order. What might cause this? How often is it expected? How accurate/reliable is the data?

    2) Are there sync issues? Specifically within the stream and also syncing with other streams like combining level 2 with T&S?

    3) Times have huge gaps between entries. Does the chart running the indicator need to have focus? Just be visible?

    #2
    Hi Chippy, thanks for posting.

    The best example to study the level 2 data and how to use it is the Level 2 book example we have made:


    1. The first question depends on how you have written your test script. If you study the above script it should resolve. Writing to a .txt file can be a slow and expensive procedure, so it should not be called very frequently.
    2. The T&S window is more of a representation of the OnMarketData method. A SuperDOM window would be a representation of OnMarketDepth.
    3. Indicators have a property IsSuspendedWhileInactive. Make sure this is set to false and it will run when minimized/non-active.

    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    72 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    39 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    63 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    63 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    53 views
    0 likes
    Last Post CarlTrading  
    Working...
    X