Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Moving from backtesting to real life with renko charts

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

    Moving from backtesting to real life with renko charts

    Hi All. I coded a very simple Open Range Strategy using Renko charts. It works as intended in backtesting but when I move to real life using my Sim account it fails to achieve the same results. As in Renko the current bar moves a bit wider than the actual renko range, it ends up wrongly triggering the stop loss, or entering a trade that just touched but never actually printed a full Renko bar into it.

    Are there best practices for working with Renko in strategies? May I have missed to tell the strategy I am actually using Renko like what I do with banktesting?

    Thanks!.

    #2
    Typical Renko bars are not designed for accurate back-testing. You should consider using a Renko bar that shows the actual high and low that price traveled during that time period. It won't be as clean looking on the chart, but your backtests will be more accurate. There are lots of Renko variants out there - a quick search will probably find many that are superior to regular Renkos for this purpose.
    Bruce DeVault
    QuantKey Trading Vendor Services
    NinjaTrader Ecosystem Vendor - QuantKey

    Comment


      #3
      Hello tradebot,

      Thank you for your post.

      With standard Renko bars, a backtest is very challenging because the bars have a function that removes the last bar and replaces it with a new Open price. This is difficult to simulate historically vs. how it occurs in real time.

      You may get more realistic backtest results by using High Order Fill Resolution or by coding your strategy to submit orders on a single tick data series by adding intrabar granularity.

      Order Fill Resolution - https://ninjatrader.com/support/help...FillResolution

      Example script - Adding intrabar granularity - https://ninjatrader.com/support/help...ipt_strate.htm

      Another option would be to backtest your strategy using the Playback Connection so that the bars may be built more realistically as if they were in real time.

      Playback - https://ninjatrader.com/support/help...connection.ht

      There is a section on the "Discrepancies: Real-Time vs Backtest" page in our help guide about backtesting Renko bars here:

      https://ninjatrader.com/support/help...ime_vs_bac.htm

      You can also read through this forum post that discusses issues with Renko backtesting in detail:

      Hello. Renko Backtest is not accurate in strategy analizer, i think because takes only close price of the brick. My entry signal is the close of a renko brick. I need to have that entry signal but i need to run the backtest in strategy analizer using tick movement updates. Is that possible? Thank you and sorry about my english


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

      Comment


        #4
        Many thanks for the replies. It helped me with the backtesting.

        My strategy performs really well in Renko and HeilenAshi but not in regular bars. Igues this is because HA is just a visualization for the chart but in reality the strategy keeps using regular bars in the calculation of entries and exits. Now, if I use AddHeikenAshi() and add this to my code, would it change the behaviour and all being calculated on HA? am I using the right logic here? Thanks

        Comment


          #5
          Hello,

          If you want to place all your trades or do all your calculations on Heiken Ashi bars, yes you could use AddHeikenAshi() to add a Heiken Ashi bars object to your script, and then place all your orders to that bars object using a BarsInProgress check.

          AddHeikenAshi() - https://ninjatrader.com/support/help...heikenashi.htm

          BarsInProgress() - https://ninjatrader.com/support/help...inprogress.htm

          Please let me know if you have any other questions.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NullPointStrategies, Yesterday, 05:17 AM
          0 responses
          63 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