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 LawrenHom, Today, 10:45 PM
        0 responses
        3 views
        0 likes
        Last Post LawrenHom  
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        7 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        44 views
        0 likes
        Last Post bill2023  
        Working...
        X