• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddDataSeries string

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

    AddDataSeries string

    Hi, is it possible to call AddDataSeries using either a string variable holding a valid instrument name, or an expression that evaluates to a string that is a valid instrument name? Thanks...

    #2
    Hello stephensams,

    Thank you for your post.

    It is possible to pass a string into the AddDataSeries() method. For information on AddDataSeries please visit the following link: http://ninjatrader.com/support/helpG...dataseries.htm
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Great, thanks. I realized I have a different issue...

      I have a Market Analyzer row in the instrument column populated with ES ##-##. The second column finds the highest volume among the continuous contract Instrument.MasterInstrument.RolloverCollection elements (e.g. ES 03-16, since it's heaviest traded at the moment).

      I don't think I can AddDataSeries in State.Configure using Instrument.MasterInstrument since ES ##-## hasn't loaded yet. If this is true, can I AddDataSeries in a later State, or elsewhere, like OnMarketData?

      If I can't, can you think of another way to access volume data (Series, VolumeSeries) in OnMarketData?

      Thanks so much...
      Last edited by stephensams; 01-12-2016, 03:01 PM.

      Comment


        #4
        Hello stephensams,

        This will need to be done by doing a BarsRequest for data and subscribing to an event handler for the BarsRequest.Update.

        Attached is an example.
        Attached Files
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NinjaCustomer, Today, 12:57 AM
        1 response
        3 views
        0 likes
        Last Post NinjaCustomer  
        Started by lancasterstephen, Today, 12:09 AM
        1 response
        3 views
        0 likes
        Last Post lancasterstephen  
        Started by liltr3d, Yesterday, 10:52 PM
        0 responses
        3 views
        0 likes
        Last Post liltr3d
        by liltr3d
         
        Started by Longhornmark, Yesterday, 08:25 AM
        3 responses
        13 views
        0 likes
        Last Post bltdavid  
        Started by mohdhm, Yesterday, 04:09 PM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Working...
        X