Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multitime frame indicator in strategy?

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

    Multitime frame indicator in strategy?

    Is there a way to add an indicator that references a dataseries other than the primary within a strategy?


    Pseudo


    Initialize()
    Add PeriodType.Minute,15);


    Such as : Add(EMA(Closes[1][0]));

    Which would call the secondary data series, barsarray=1, instead of the chart which would be 1 min (primary data series)

    Thanks,

    #2
    neb1998, it isn't possible to add an indicator that references one timeframe specifically, but it is possible to use that indicator on only one of the timeframes of your strategy.

    For example, lets say you're running a 5 minute chart and add a 1 minute series as the secondary series. There are two ways to do a SMA of the 1 minute series:

    1) For the DataSeries parameter of the SMA, specify the secondary series (closes, highs, lows, etc):
    currentSecondarySMA = SMA(Closes[1], 15)[0];

    2) Call it in the specific second BarsInProgress context, where everything has to do with the secondary series:
    Code:
    OnBarUpdate()
    {
       if (BarsInProgress == 1)
       {
          // this is the secondary series
          currentSecondarySMA = SMA(10)[0];
       }
    }
    Please let us know if you have any other questions.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Thanks yeah i understand that. I will have to build separate indicators to check strategy execution is correct.

      I am having issues with determining if its possible to have a 15 min chart as my primary yet allow intrabar orders to execute. Such as if an entry condition is true between the 1000 and 1015 min primary bars on the 1011, 1012,1013,1014 secondary bars (1 min bar) -- is it possible to have the entrance fire on the 1015 primary bar???

      In real time and backtesting?

      Comment


        #4
        Neb, I just answered your question on the other thread dealing with this subject.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X