Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

intrabar backtesting

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

    intrabar backtesting

    I am using daily bars as primary for conditions checking and 1 minute bar to execute entries as soon as conditions are filled.however i am always getting delay of 1 day in order entering .also if i set exit on close to true ,i get exit order first and entry order the following day.If someone could go through my code,it will be of great help
    Attached Files

    #2
    easyfying, CalculateOnBarClose will always be 'true' in backtesting, eventhough it's set to false programmatically in your code's Initialize(). The backtest still simulates intrabar backtesting, as you submit to the next 1 min bar open available after you've got your signal from the daily series.

    What sessions are you using?

    Comment


      #3
      one day delay in intrabar fill

      thnks 4 ur response.i really appriciate that you looked at my problem.i am using eurex fixed income session 8am to 22 pm.i have 5 conditions and once they r filled ,i expect an immidiate fill for long position.however in backtesting i see that entry comes not today but a day after,which kills the whole logic.i need help ,so that the order entry is immidiately accepted ,which i expect at 8:01 am (in case the 5 conditions r true.) and then the strategy should go long.I am pasting a picture of the chart i get after testing and what actually i am looking for.
      thank you .
      Attached Files

      Comment


        #4
        The entry point you see is the first possible trade location in backtesting after the daily bar closed and your entry conditions triggered - you would need to reformulate your entry logic to use for example 5 min bars to be able to trigger an order then prior to the last 5 min bar of the day for example.

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          The entry point you see is the first possible trade location in backtesting after the daily bar closed and your entry conditions triggered - you would need to reformulate your entry logic to use for example 5 min bars to be able to trigger an order then prior to the last 5 min bar of the day for example.
          thanks 4 the support.I now got it working

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by cmoran13, Yesterday, 01:02 PM
          0 responses
          27 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          18 views
          0 likes
          Last Post PaulMohn  
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          160 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          95 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          148 views
          2 likes
          Last Post CaptainJack  
          Working...
          X