Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator on Multi-Instrument Indicator

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

    Indicator on Multi-Instrument Indicator

    I can't seem to apply an indicator to another multi-instrument indicator.

    If I Add() another instrument's bar series in Initialize(), that indicator will work, but I can't apply an indicator to it.

    And I can't Add() another instrument's bar series in OnBarUpdate().

    As far as I can tell, you can make a multi-instrument indicator, or you can apply indicators to indicators, but you can't do both. Is my understanding correct, and if so do you have any plans to fix it?

    Thanks.

    #2
    Let me try and understand.

    Indicator A --> Has the primary series (lets say 1 minute chart) and an additional 5 min series

    You try to apply an SMA on Indicator A --> This does not work?
    RayNinjaTrader Customer Service

    Comment


      #3
      Upon further investigation, it seems that the reason it wasn't working was that I conditioned the Add() upon Instrument not being null, which I thought was reasonable because the Instrument I'm Adding needs to have the same BarsPeriod.ID and BarsPeriod.Value as the primary instrument. But this keeps it from working when another indicator is used on it.

      // Can't use an indicator on an indicator that uses the following:
      if (Instrument != null)
      Add("SYMBOL", BarsPeriod.Id, BarsPeriod.Value);

      // You can use an indicator on an indicator that uses the following:
      Add("SYMBOL", BarsPeriod.Id, BarsPeriod.Value);

      I would have thought that it would be wrong to refer to BarsPeriod.Id and BarsPeriod.Value if Instrument is null, but that's what seems to work.

      -Kevin

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      81 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      68 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      55 views
      0 likes
      Last Post CarlTrading  
      Working...
      X