• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Renko backtesting strategy errors

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

    Renko backtesting strategy errors

    Hello,

    I'm actually backtesting a strategy on GBPUSD using a Renko based charts.
    Unfortunately I'm having some issue concerning exact opening/closing price position.

    For exemple my long strategy is simply based on a direction change between two following

    Renko bars, here's my script :
    if (Open[0] < Close[0])
    && (Open[1] > Close[1])
    {
    EnterLong(Convert.ToInt32(DefaultQuantity), @"Long");
    }

    Here's a snapshot for illustration in attachment.


    On renko #1 we notice a open > close, and on renko #2 a open < close, so my entry

    condition is triggered as soon as renko #2 is closed.
    The issue remain here : opening position price is the open of renko #3 (red triangle)

    instead of closing of renko #2 (green triangle).
    Hence my strategy tester remain on false price entry.

    NB : obviously this issue ain't encountered on candlestick chart, as close from previous

    bar equals open of following. But renko chart are constructed totally different.

    How NinjaTrader could to manage this error ? Is there some code to implement in the

    strategy script to solve it ?

    Thanks for your help
    Attached Files

    #2
    Hello Zananas,

    Thank you for your note.

    Some bar types are not an accurate representation of price action, the candles are modified like you've mentioned.

    You should add a secondary tick series to your script and submit orders to that series. This will give you more accurate backtest results. You could see the following example,
    https://ninjatrader.com/support/foru...ead.php?t=6652

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by Zananas View Post
      Hello,

      Renko bars, here's my script :
      if (Open[0] < Close[0])
      && (Open[1] > Close[1])
      {
      EnterLong(Convert.ToInt32(DefaultQuantity), @"Long");
      }



      Thanks for your help
      Did you activate in the Strategy Optimizer/Tester "Per tick"?
      Attached Files
      Last edited by SBMT17; 09-10-2018, 02:32 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by dyanemorye, Today, 01:45 AM
      0 responses
      2 views
      0 likes
      Last Post dyanemorye  
      Started by Bouzayen, Yesterday, 08:31 PM
      0 responses
      16 views
      0 likes
      Last Post Bouzayen  
      Started by IanC28, 03-27-2020, 10:20 AM
      6 responses
      32 views
      0 likes
      Last Post jim1234
      by jim1234
       
      Started by aramtrader, 04-01-2020, 03:05 PM
      7 responses
      44 views
      0 likes
      Last Post woodie1
      by woodie1
       
      Started by renehtx, Yesterday, 03:51 PM
      2 responses
      20 views
      0 likes
      Last Post renehtx
      by renehtx
       
      Working...
      X