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

Nevertheless, dynamically add secondary input series

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

    Nevertheless, dynamically add secondary input series

    Hi.

    I've read related threads, I've seen the warnings in the docs, I know that in the current NT architecture an input series should be added hard coded and not dynamically. Still, I want to create a generic correlation indicator that is able to accept anything as a secondary input series. It should be up to the caller (chart, strategy) to decide what series to compare against the primary series (with validation in the indicator to ensure the time frames match). Is there no way to implement something like that?

    What solution would come the closest to being generic?

    Thanks.

    #2
    Hi digibob, thanks for your post.

    To dynamically create any indicator object in your script you will need to use reflection, so this is possible but it would go beyond the scope of support I could provide. An Indicator can already take any other indicator as the Input Series. Setting an Input Series will define the primary series, so you can instead load an instrument from a string variable as the Spread indicator does and have that be your secondary series. Ultimately It can not be "generic" and will need to either be an Indicator series or a price data series.

    Best regards.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Chris. It helps.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Skifree, Today, 03:41 AM
      3 responses
      12 views
      0 likes
      Last Post Skifree
      by Skifree
       
      Started by traderqz, Yesterday, 09:06 AM
      5 responses
      32 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by guillembm, Today, 11:25 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by owensd, 04-21-2024, 11:34 PM
      9 responses
      34 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by trilliantrader, 04-10-2024, 09:33 PM
      7 responses
      25 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Working...
      X