Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access other instruments' contract volume from one indicator

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

    Access other instruments' contract volume from one indicator

    Hey!
    I'm trying to access the real time daily volume of other contracts and instruments from one indicator. For example, I want to have the indicator on the current CL contract and pull the real time daily volume for other instruments and contracts, such as the next month or two for the current instrument or whatever else. I see that I can easily get the current instrument's daily volume by the following:

    Code:
    Instrument.MarketData.DailyVolume.Volume
    However, I don't see how to do this for other instruments.
    Thank you!
    Paul

    #2
    Hello Paul,

    Thank you for your note.

    This is fundamental data that is provided from OnFundamentalData().


    Each instrument added with AddDataSeries() will trigger OnFundamentalData().
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hey Chelsea,

      Thank you for your response. It looks like I would have to add the data series manually though? It says not to dynamically add dataseries objects. This would seem to eliminate the possibility of finding the daily volume of the following month's contract of the main instrument, correct? So if I was trading CL 03-19 I couldn't easily monitor the daily volume of CL 04-19 and without changing any code, if I loaded a chart of CL 04-19 it would monitor the daily volume of CL 05-19?

      Thank you!
      Paul

      Comment


        #4
        Hello Paul,

        You are correct, you cannot dynamically add series. This would need to be hard coded in the script.

        You could instead use the Addon approach with a BarsRequest and assign a handler method to the fundamentalData.Update event.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you Chelsea! When I get to that point, I'll try this approach to see if it works.

          Comment

          Latest Posts

          Collapse

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