Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trouble with Renko bars on backtest

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

    Trouble with Renko bars on backtest

    Running backtest in NT will only order on the opening bar after a condition is met, this is probably important in cases of gaps. However I run my strategy on Renko bars and this does not make sense, and it is detrimental in the case I have shown with the image. Where the order is filled on the open of the bar following where the condition is met, and both these bars are in the opposite direction. These Renko bars are 2 ticks which means that this order on the backtest, for this particular situation, is consistently 2 tick off from where forward testing is most likely to fill the order (indicated by the black arrow).

    Is there any way to set where the order is filled (on the close of the condition met bar rather than the open of the following bar) for backtest.

    If not I have an alternative in mind but require assistance it would be something like

    if(CountIf( some signal(s) x bars ago
    && some signal(s) y bars ago
    && some signal(s) z bars ago)
    {do something like return the value of the count}

    if I am so far off, I will describe what I am trying to do, create a condition which identifies these reversals at the instance where an order is filled, and count the number of these occurrences found in the backtsest. If I had a number of these occurrences I think I can manage with doing some manual calculations on how my strategy is being influenced.

    Thanks
    Attached Files

    #2
    I forgot to draw the black arrow
    Attached Files

    Comment


      #3
      Chris001, if you're looking to backtest on Renko bars I would strongly consider adding code in to execute orders actually on an added in 1 tick series to get a more realistic fill price. A reference sample showing how this technique would be worked in is found here - http://www.ninjatrader.com/support/f...ead.php?t=6652

      Depending on the length of the data set for testing desired, just using Market Replay would also be helpful, as here you would have the intrabar tick formation with the recorded Level 1 data as well.

      Comment

      Latest Posts

      Collapse

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