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 NullPointStrategies, Today, 05:17 AM
      0 responses
      50 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      69 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X