Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

volume question

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

    volume question

    Could someone please explain the difference between var1[0] and var2[0]? Will the values be the same?

    Thank you.

    var1[0] = Volume[0];

    var2[0] = GetCurrentAskVolume() + GetCurrentBidVolume();

    #2
    Hello imalil,

    Thanks for writing in to our Support team.

    These values will not be the same - Volume[0] retrieves the volume of the current bar which is equal to the number of shares traded during the interval defined for that bar. For instance, the Volume[0] value of a 60 minute bar would be much greater than the Volume[0] value of a 1 minute bar.

    GetCurrentAskVolume() and GetCurrentBidVolume() retrieve the volume of contracts being traded at the ask/bid price, and this is independent of the interval you are viewing the data series on.

    You can view more information in our help guide here:

    Volume[0] - http://ninjatrader.com/support/helpG...ies_volume.htm
    VOL() - http://ninjatrader.com/support/helpG...-us/volume.htm
    GetCurrentAskVolume() - http://ninjatrader.com/support/helpG...taskvolume.htm
    GetCurrentBidVolume() - http://ninjatrader.com/support/helpG...tbidvolume.htm

    Please let me know if I may be of any further assistance.
    Alan S.NinjaTrader Customer Service

    Comment


      #3
      One more point of clarification:

      If I'm using calcOnBarClose, is the GetCurrentAskVolume() that I see only the ask vol during the last tick of the most recent bar? So if I want to see all the ask vols from the beginning of the bar in order to add them up I have to run a script for that?

      Thank you.

      Comment


        #4
        Hello imalil,

        Thanks for your reply.

        The volume retrieved when calling GetCurrentAskVolume() and setting CalculateOnBarClose to true will be whatever the ask volume is at the close of the bar - or whatever the ask volume was for the last recorded tick of the bar. If you would want to add each ask volume value you would have to save those values to a variable and update the value on each tick - alternatively you could look at the Volume[0] which will report the total volume of contracts traded.

        Please let me know if I may be of any further assistance.
        Alan S.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 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
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X