NexusFi: Find Your Edge


Home Menu

 





Renko backtesting open/close errors


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Quick Summary with 1 posts (0 thanks)
    2. looks_two Zananas with 1 posts (0 thanks)
    3. looks_3 RJay with 1 posts (0 thanks)
    4. looks_4 ShatteredX with 1 posts (0 thanks)
    1. trending_up 1,593 views
    2. thumb_up 0 thanks given
    3. group 3 followers
    1. forum 3 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
Zananas
Paris France
 
Posts: 7 since Sep 2018
Thanks Given: 4
Thanks Received: 1

Hi everyone !

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 Thumbnails
Click image for larger version

Name:	GBPUSD (140 Renko)_cropped.png
Views:	169
Size:	2.8 KB
ID:	255112  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
tick data interval discrepancy
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
What You Know vs How much you know about it
Traders Hideout
Help re translation of ninjascript to EL
NinjaTrader
MC Advanced Simulated Trading.
MultiCharts
 
  #3 (permalink)
 ShatteredX 
Houston, TX
 
Experience: Intermediate
Platform: Python
Trading: NQ
Posts: 97 since Apr 2016
Thanks Given: 133
Thanks Received: 96


Hi @Zananas

My personal opinion: Switch to BetterRenko bars. They backtest accurately (Open[0] equals Close[1]).

Reply With Quote
  #4 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 683 since Jun 2009
Thanks Given: 759
Thanks Received: 787

Read my post here.


Reply With Quote




Last Updated on September 17, 2018


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts