Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Renko Chart - bug report

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

    Renko Chart - bug report

    Hello,

    first of all I find it great that NT has Renko Charts in version 7 ( I use beta21). But I guess I´ve seen 2 bugs which result in false backtest results when using NinjaScripts on them:

    1. Chart from 06/04/2010:
    When there is a change in direction of the Renko Chart (f.e. down brick to up brick) then the OpenPrice of the new brick is wrong in my opinion. It should be equal to the ClosePrice of the previous brick. Of course this would generate a brick with 2x bricksize but at the moment NinjaScript uses a wrong EntryPrice for a new position at this brick.

    In the chart: In my opinion the OpenPrice of the 14:59-brick should be 1,5146. The Sell-Signal is generated at the end of the last downbrick (14:46 @ 1,5146) when SMA-Cross has happenend but the fill is at 1,5151.

    2. Chart from 29/03/2010:
    For past dates NT generates a "closing brick" (without body) at the end of a session. This does not happen on the current date (in real trading). On the current day the open of the closing tick is equal to the close of the previous brick (which should be right) and the close is the last price before SessionEnd. This results in a closing brick which is smaller than the regular bricksize. In my opinion this behaviour is right and should be applied also for past dates.

    In the chart: The open of the "closing brick" (and the fill of the Buy Signal) should be at the same price level than the close of the previous brick (~ 4 pips higher). The signal is generated at the close of the green brick before and should be filled imediately at the same price.


    To change Renko BarType in this may should solve 2 problems:
    - Differences between backtesting and realtime behaviour (at session end) &
    - wrong results for backtesting (at direction changes & session end)

    Thanks a lot.

    Joerg
    Attached Files
    Last edited by Joerg; 09-17-2010, 07:50 AM.

    #2
    Hello,

    Thank you for your forum post.

    Someone will follow up in a little bit.

    Thank you for your patience.
    BrettNinjaTrader Product Management

    Comment


      #3
      1. If that were the case, the renko charts would look like the attached screenshot. From all the reference material we used this is not how renko charts look like or are constructed. Please see the screenshots here: http://www.investopedia.com/terms/r/renkochart.asp


      The open price at the reversal is not the close price of the previous bar.

      2. This is by design. Renko charts are "restarted" at the beginning of each and every session. Reason this is done is because if we did not reset it it would mean your renko chart for today would look very different if you reviewed it again tomorrow. It would be fully dependent on the number of historical days you load because everything is built in relation to the first bar on the chart. When you use a chart with "Days to load" that means you have a rolling start date which basically means your renko charts would look different every single day and be inconsistent. The way around this is to reset renkos on every single session. For more information on this see here: http://www.ninjatrader.com/support/h.../bar_types.htm
      Attached Files
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        1.) Your chart is exactely what I think would be correct. I know that most providers use the concept you currently implemented but these charts are not tradable.

        If you follow a Renko Chart in realtime in NT it always Opens at the close of the previous brick (if there is not session break). In the moment a reversal is completed it changes the Open from the close of the previous brick to the open of the previous brick. Or in other words: It changes the past in this moment (an already printed part of the chart). And therefore the Backtest-Fills at these points are not realistic.

        The problem also would be solved when NinjaSkript would use the close of a brick for its Mar****rder-Fills. I know this would start new problems at market closings.
        But is it possible to change the Fill-behaviour from OpenNextBar to CloseThisBar (thats the syntax used in TradeStation)? Do you see my point?


        2.) To start a new brick-counting at each SessionStart I also find intelligent. Thats not my point. I just mean the last brick of a session. Just this 1 brick should have an open at the level of the previous bricks close. If the last day of a chart is today this happens correctely (also when the chart is opened after SessionEnd) but for previous dates it is always just a small horizontal line like in my second chart. And this results in the equal problem than my first point: Unrealistic backtest-fills.

        Thanks a lot.

        Comment


          #5
          1. Let us take a step back and consider how Renko bars are actually built. There is no "changing" of historical bars. What you are considering as a historical bar is not a historical bar, but rather the currently building current bar. Due to the nature of the Renko bar, at any given point in time the bar could be looking like its a reversal bar, but ultimately build out to be a continuation trend bar. It just depends on which price hits first, brick size up or brick size down.

          For backtesting, the concept of backtesting on Renko bars is already a little iffy by definition. Since real-time Renko bars build up/down, but only what ultimately happens at the end of the bar is shown, there are many situations where you may have a stop loss somewhere which would have filled in real-life which would not in a backtest because the "final" built renko bar never went there, but in real-time it did.

          Considering these fundamental flaws of backtesting this special bar type if you still wanted to change the fill price I would recommend looking into programming your own fill algorithm which can achieve the price you want.

          2. Going back again to the concept of "building bar". The last bar on the current real-time session is a "building bar" and it will show what it has built so far. The last bar on a historical session is a crippled bar. All it does is show you the ending price of the session. Basically, the bottom line I'm trying to get at is simply that backtesting a Renko bars is a concept that is relatively "invalid" to begin with because of how what happens in a building bar is not captured while viewing a historical Renko chart. That information that is omitted impacts heavily on fills and trading in real-life which is info that is not available in a historical chart sense thus not available for backtesting. This all boils down to meaning that the backtest results you end up with need to be taken with more caution than say a 1min chart backtest.

          Hopefully that makes sense.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            All you say makes sense to me. Of course the highs and lows of a brick are not shown and therefore it makes no sense to use stop or limit orders. But on the other hand I know one bar can be just one brick. So its no problem to only use market orders in a strategy. I won´t lose much more than one brick up to the next bar-end-calculation of the strategy.

            Yes, changing of the open just occurs a the currently bulding chart. But in the moment it happens it changes the past (which can be some minutes ago or also some hours). I understand that you won´t build other RenkoCharts than the most providers but maybe it coul be an parameter which every user can choose? Equal BrickSizes: Yes or No?

            Is there any reason for using crippled bars for historical sessions instead of building bars? To use building bars for the whole history would make this more consistent.

            Thanks a lot.

            Comment


              #7
              Thanks for the suggestion. I have added it to our feedback list.

              The reason crippled bars are used is because if you use building bars it is actually more inconsistent. Using building bars means your chart would look different every single day because your starting date on the chart is different. Unless you actually incremented your starting date on the chart every single day, the starting point is different thus leading to a different looking chart. NT chose to go with crippled bars to ensure that each session looks exactly the same yesterday as it does today.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                I mean the last brick of every day could be a building-brick with smaller brick size like on the actual day.
                The first brick of a day of course should be a new one starting at the open of that day. So every day would look equal if the starting point of a chart changes.

                Comment


                  #9
                  Joerg,

                  We did it this way to ensure there was no illusion that this was a completed brick. When you leave it as a building brick it could give the impression that the brick was complete if it ended perfectly on a completed brick size, but in reality the brick is not done because it has not passed that level.

                  Thank you for the suggestion though. I have added it onto our feedback list as well.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  599 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  344 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  103 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  558 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  557 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X