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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    63 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    90 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    47 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    105 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    63 views
    0 likes
    Last Post PaulMohn  
    Working...
    X