Announcement

Collapse
No announcement yet.

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.

    Comment


      #3
      Thanks, Chris. It helps.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      44 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      56 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      35 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      95 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      57 views
      0 likes
      Last Post PaulMohn  
      Working...
      X