Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multitime frame incomplete Bar during backtesting

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

    Multitime frame incomplete Bar during backtesting

    I want to automate a strategy which uses a 15 min primary dataseries and a daily dataseries (higher timeframe) as secondary dataseries.
    My strategy should check, on 15 mins close, if both the following is true to enter long.

    1) 15 mins close > 15 mins sma(50)
    2) current day low > 1 day sma(50)

    During live, lows[1][0] will give me the day's low at that point in time. But, during backtesting, lows[1][0] will have a different low as it has data until end of day.
    Is there anyway to simulate the higher timeframe LOW to have data only up until that point in time ?


    #2
    As far as your Lows[1][0] issues,
    would using CurrentDayOHL/PriorDayOHLC help solve anything?

    Also, if you are using an 1-Day SMA(50) in your code, make sure
    you load at least 50 days when backtesting in Strategy Analyzer.

    Comment


      #3
      Hello amrajeshv,

      Welcome to the NinjaTrader forums!

      You are wanting the updated low of the secondary series before the bar closes, (while the bar is forming)?

      Enable TickReplay (and ensure you have historical tick data for the range) and this will allow you to use the Calculate.OnPriceChange selection .
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      90 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      137 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      120 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      72 views
      0 likes
      Last Post PaulMohn  
      Working...
      X