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 The_Sec, Yesterday, 03:37 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by vecnopus, Today, 06:15 AM
        0 responses
        1 view
        0 likes
        Last Post vecnopus  
        Started by Aviram Y, Today, 05:29 AM
        0 responses
        5 views
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        27 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        36 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X