Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it Bid or is it Ask?

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

    Is it Bid or is it Ask?

    Hello,

    when calculating the delta in NT8 it is usually checked whether the price is equal or bigger then the ask, then volume is counted as Ask volume. Or if the price is equal or smaller then the bid, then volume is counted as Bid Volume.

    I have exported the historical data for a month and checked the first tick of each session.
    It seems that the first tick of a session always has price = ask = bid.

    Using this code in e.g. OnDataPoint is not correct as it would always count the first tick as bid volume:
    Code:
    if (close <= bid)
        barDelta -= volume;
    else if (close >= ask)
        barDelta += volume;​

    How can I find out whether the volume of the first tick of a session can be counted as bid volume or as ask volume?

    Thank you!
    Armin

    #2
    Hello Armin,

    I don't believe that would be possible, in general the volume you are accessing would be for the specific series being used. For example if you are using last data we would only know that the volume was last and not if it came from bid or ask. You would additionally need to have access to the ask and bid series to see which had a first tick with volume.

    Comment


      #3
      Hello Jesse,

      thank you for the response.

      I'm not sure if I understood you correctly.
      Does this mean, in NinjaTrader it is not possible to calculate a correct volume delta?
      And consequently it is also not possible to create a correct delta barstype?

      Best regards,
      Armin

      Comment


        #4
        Hello Armin,

        OnDataPoint is part of the bars type framework, bars types work with a singular type of data at once. The data points being used in that override are only going to be last data points if you are using last data so you wouldn't be able to tell from that scope any kind of ask/bid volume information. In an indicator you could do that type of task by adding secondary ask and bid series to do calculations.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        330 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X