Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting Renko by forcing entry on bar close instead of open

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

    Backtesting Renko by forcing entry on bar close instead of open

    Hi there,

    I'm trying to backtest a renko strategy, however my strategy is triggering on the following bar open, rather than the close of the bar that should trigger the entry.

    Is there any way around this with renko?

    In my attached image, I would want this long entry to happen on the top of the 3rd green bar, rather than showing at the open of the following red bar (which even then is still not the correct price).

    Thanks!

    #2
    Hello quicksandatl,

    Thank you for your post.

    We have a page in the help guide that covers discrepancies between real-time and backtest:


    The final section of that page describes how backtesting Renko bars and Heiken Ashi bars is challenging. Renko bars have a functionality that removes the last bar and replaces it with a new Open price. This may not be simulated historically. For that reason, we suggest running tests on the Playback Connection rather than the Strategy Analyzer when dealing with Renko bars.

    Some custom Renko bars try to work around the limitation, and in order to get more accurate fill prices with these types of bars you should use High order fill resolution or submit orders to a single tick data series for intrabar granularity.

    Please let us know if we may be of further assistance.

    Comment


      #3
      Thank you NinjaTrader_Emily! I have read that post before, and unless I am understanding it incorrectly, I don't care about the open of the bar, only the close. So in this case I don't care about the "skipped" bar on reversals.

      In my example, I just want the entry to happen on the close of that 3rd green bar, which should technically be the true price since that bar was only painted after that top price level was ticked. After that bar is painted, it takes 2 bars to paint the 1st red bar, but I don't care about the red bar, only the green bar.

      Let me know if I am misunderstanding.

      Comment


        #4
        Hello quicksandatl,

        Thank you for your reply.

        Since you are working with close prices, the backtests may still suit your needs. You will still need to consider using either High order fill resolution or submitting orders to a single tick data series for intrabar order fills and more accurate order fill prices; the standard order fill resolution only fills orders based on OHLC data and will be the same as processing the script On Bar Update which is likely why you are seeing orders one bar later than you are expecting to see them.

        For more details on historical fill processing:


        If your strategy is a multi-series script, you will instead need to add a 1-tick data series and submit orders to that series:


        Thank you for your time and patience.

        Comment


          #5
          I think this is getting me what I need. Thank you Emily!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          64 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          139 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          75 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          45 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          50 views
          0 likes
          Last Post TheRealMorford  
          Working...
          X