• 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 RedDuke, Today, 06:14 PM
      0 responses
      0 views
      0 likes
      Last Post RedDuke
      by RedDuke
       
      Started by DariusDeck, Today, 04:22 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Marco  
      Started by pstrusi, Today, 05:05 PM
      1 response
      2 views
      0 likes
      Last Post pstrusi
      by pstrusi
       
      Started by saeed, Today, 10:20 AM
      4 responses
      17 views
      0 likes
      Last Post saeed
      by saeed
       
      Started by priceisking, Yesterday, 07:44 PM
      1 response
      27 views
      0 likes
      Last Post NinjaTrader_Kate  
      Working...
      X