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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      64 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      66 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X