Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

instrument expiry

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

    instrument expiry

    Need help with this ... I want to add an instrument to my indicator with the same expiry as the main instrument being processed. For instance, if I am running the indicator for NQ 03-19, I want to add "ED 03-19" with AddDataSeries. How do I go about identifying the expiry of the main instrument so I can keep the added instrument in sync? If you can point me to an example that would be greatly appreciated! thanks

    #2
    Hello pman777,
    Thanks for your post.

    It is not currently possible to dynamically load a data series this way.

    From the help guide:
    Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result in an error similar to: Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner.


    There is already an active feature request for this to be changed, so I will have a vote added on your behalf. The internal tracking number for that feature request is SFT-882. Please reference this internal tracking number if you ever have questions regarding this feature request.

    When a feature request is implemented, you'll find it in the release notes:



    Please let me know if you have any questions.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      thanks Josh

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by XXtrader, Yesterday, 11:30 PM
      2 responses
      11 views
      0 likes
      Last Post XXtrader  
      Started by Waxavi, Today, 02:10 AM
      0 responses
      6 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by TradeForge, Today, 02:09 AM
      0 responses
      11 views
      0 likes
      Last Post TradeForge  
      Started by Waxavi, Today, 02:00 AM
      0 responses
      2 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by elirion, Today, 01:36 AM
      0 responses
      7 views
      0 likes
      Last Post elirion
      by elirion
       
      Working...
      X