Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need custom indicator constructor guide.

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

    Need custom indicator constructor guide.

    I wrote a custom indicator.

    Is it possible to adddataseries that indicator to a strategy but on a different instrument with a different time frame? In other words, there will be two different instruments on 2 different time frames. Both will need to have my custom indicator running on it.

    I know how to add another time frame series but I'm not sure how to add the custom indicator for that series.

    I hope that made sense?

    #2
    Hello Chippy,

    Thanks for your post.

    You would add your data series in State.Configure, and then you would instantiate your indicators in State.DataLoaded.

    The first parameter of an indicator's constructor is always the input series. Therefore, you can provide Closes[0] in the first parameter for the primary data series and Closes[1] for the secondary data series.

    I.E.

    MySMA1 = SMA(Closes[0], 14);
    MySMA2 = SMA(Closes[1], 14);

    Let us know if there is anything else we can do to help.

    Comment


      #3
      Oh, now I see. I tried that originally, but wasn't getting the constructor option for the iSeries (or didn't see it) for my indicator like I see with NT indicators and thought I need to add a constructor to the indicator manually to mimic that behavior. Still figuring all this out. Really appreciate you and your team!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      213 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      126 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      145 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      229 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      190 views
      0 likes
      Last Post CarlTrading  
      Working...
      X