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 TraderBCL, Today, 04:38 AM
      2 responses
      16 views
      0 likes
      Last Post TraderBCL  
      Started by martin70, 03-24-2023, 04:58 AM
      14 responses
      106 views
      0 likes
      Last Post martin70  
      Started by Radano, 06-10-2021, 01:40 AM
      19 responses
      609 views
      0 likes
      Last Post Radano
      by Radano
       
      Started by KenneGaray, Today, 03:48 AM
      0 responses
      5 views
      0 likes
      Last Post KenneGaray  
      Started by thanajo, 05-04-2021, 02:11 AM
      4 responses
      471 views
      0 likes
      Last Post tradingnasdaqprueba  
      Working...
      X