Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get higher timeframe data to make entry decision at lower timeframe?

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

    How to get higher timeframe data to make entry decision at lower timeframe?

    I'm working on a strategy with two timeframes and I'd like to use the results of the 60m timeframe to decide on an entry on say 15m timeframe. I have 15m as my primary bar and 60m as my secondary bar. The problem I see is that my primary bar will complete first and then the secondary bar. So we see:

    19:00 15m
    19:00 60m
    19:15 15m
    19:30 15m
    19:45 15m
    20:00 15m
    20:00 60m
    20:15 15m

    So let's say my 60m bar at 20:00 gives me a setup and now I want to check the 15m bar. The problem is I must wait until 20:15 to be able to check the 15m bar and enter.

    So I was thinking about using CalculateOnBarClose = false but then it'd process the tick data and I only want to use the data from the 60m close.

    The only solution I can see is to filter out the tick data until say 1 minute before the 60m will close and then when the 15m bar closes I'll have the results of the 60m (1 minute early) and then I can process my 15m and enter if I want.

    Does this sound like the right way to accomplish this? Do I just do something like this:

    Code:
    if(BarsInProgress == 1) {
      if(Time[0].Minute==59) {
        // make my decision on 60m bar
      } else {
        // skip this tick data
        return;
      }
    }
    The only problem I see is how to backtest this. I'm not sure it's possible. The other possibility which I just thought of and just tested is to run my strategy on 15m bar and in initialize I add 60m bar and another 15m bar and ignore the first 15m.

    Add(PeriodType.Minute, 60);
    Add(PeriodType.Minute, 15);

    This seems like it will work. Any disadvantages to this approach?

    Thanks

    #2
    Hi cunparis, please check this reference sample for backtesting - http://www.ninjatrader-support2.com/...ead.php?t=6652

    Only you want to do in reverse, meaning the 60 min is your primary one for making the decisions and the you can submit the order to the 15 min chart to test an intrabar fill.

    Comment

    Latest Posts

    Collapse

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