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
|