Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Understanding volume value

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

    Understanding volume value

    hi everyone
    I'm new here so i am sorry if this message is not by specific format or something, please corrent me if needed.

    I'm pulling HistoricalData from IB API and i get volume value (as int) that do not match the volume i see on chart.

    Someone knows why? How can i calculate the real volume?

    thanks alot,

    #2
    Hello algotzvi,

    Thank you for your inquiry and welcome to the NinjaTrader Support Forum!

    Can you please provide the code you are using to obtain the volume from historical bars?

    What values are you getting? What values are expected?
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      explenation

      code for requesting hitstorical quotes:

      self.conn.reqHistoricalData(6,
      contract,
      datetime.now(),
      period,
      '1 min',
      'TRADES',
      True, # rth - regular trading hours
      1) # date style - 1 or 2

      sample for quote received :

      historicalData, <historicalData reqId=6, date=20151218 22:59:00, open=36.36, high=36.38, low=36.33, close=36.34, volume=2730, count=756, WAP=36.359, hasGaps=False>

      What is the number under volume? why does it different from the number I see on IB ?

      Comment


        #4
        Hello algotzvi,

        I am not clear of what you are using to obtain historical data with the code snippet you have provided me.

        Are you coding this through NinjaScript?

        To access the volume of a bar in a NinjaScript script, you would utilize the Volume collection: https://ninjatrader.com/support/help...7/?volume2.htm
        Zachary G.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        148 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X