Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 wzgy0920, Yesterday, 09:53 PM
      2 responses
      49 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      191 views
      0 likes
      Last Post Hasadafa  
      Started by GussJ, 03-04-2020, 03:11 PM
      11 responses
      3,230 views
      0 likes
      Last Post xiinteractive  
      Started by andrewtrades, Today, 04:57 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by chbruno, Today, 04:10 PM
      0 responses
      7 views
      0 likes
      Last Post chbruno
      by chbruno
       
      Working...
      X