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

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.
      Gaby V.NinjaTrader Customer Service

      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.
          Gaby V.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by TAJTrades, Today, 09:46 AM
          0 responses
          3 views
          0 likes
          Last Post TAJTrades  
          Started by rhyminkevin, Yesterday, 04:58 PM
          5 responses
          62 views
          0 likes
          Last Post dp8282
          by dp8282
           
          Started by realblubb, Today, 09:28 AM
          0 responses
          6 views
          0 likes
          Last Post realblubb  
          Started by AaronKoRn, Yesterday, 09:49 PM
          1 response
          19 views
          0 likes
          Last Post Rikazkhan007  
          Started by ageeholdings, Today, 07:43 AM
          0 responses
          12 views
          0 likes
          Last Post ageeholdings  
          Working...
          X