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.
    JesseNinjaTrader Customer Service

    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.
        JesseNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cupir2, Yesterday, 06:49 PM
        0 responses
        11 views
        0 likes
        Last Post cupir2
        by cupir2
         
        Started by cupir2, Yesterday, 06:45 PM
        0 responses
        7 views
        0 likes
        Last Post cupir2
        by cupir2
         
        Started by mathfrick2023, 05-08-2025, 12:51 PM
        7 responses
        47 views
        0 likes
        Last Post mathfrick2023  
        Started by 1001111, Yesterday, 07:12 AM
        1 response
        15 views
        0 likes
        Last Post 1001111
        by 1001111
         
        Started by Pope_Finance_II, Yesterday, 02:19 PM
        0 responses
        10 views
        0 likes
        Last Post Pope_Finance_II  
        Working...
        X