Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is adding a secondary timeseries as meta criteria possible?

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

    Is adding a secondary timeseries as meta criteria possible?

    My idea is to produce a set of criterias where the general market conditions (say criteria of S&P) would used as a meta criteria and checked first and if that is passed then calculate the results of the actually analyzed instrument (like AAPL).

    A rough example of my thinking

    if
    50 day SMA of S&P is rising
    calculate 10 day SMA AAPL + ATR
    else if
    50 day SMA of S&P is sinking
    calculate 10 day SMA AAPL - ATR
    else
    calculate 10 day SMA AAPL

    My main question is: If possible how should I formulate the parts:
    50 day SMA of S&P is rising
    and
    50 day SMA of S&P is sinking

    should I perhaps use the DataSeries Class?

    A practical code snippet would be much appreciated!

    #2
    Hi Mickey, you would use the Add() method to add the needed instruments / series to your scripts in the Initialize() section. A practical working code example showing this is preinstalled with NinjaTrader and it's called 'SampleMultiInstrument'. To review the MultiSeries framework documentation with further examples please check into this link here from our helpguide - http://www.ninjatrader.com/support/h...nstruments.htm

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    579 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X