Same Open and Close values on Backtesting
Same Open and Close values on Backtesting
26 Nov 2012, 00:38
Hi,
I'm getting the same values for Open and Close prices on backtesting. This is a bug right?
This is the drop of all prices for the EUS/USD on 1M bar
10/25/2012 12:01:00 AM, 001.297390, 001.297390, 001.297390, 001.297390, 001.297390, 001.297390, 001.297390
10/25/2012 12:02:00 AM, 001.297330, 001.297330, 001.297330, 001.297330, 001.297330, 001.297330, 001.297330
10/25/2012 12:03:00 AM, 001.297120, 001.297120, 001.297120, 001.297120, 001.297120, 001.297120, 001.297120
Thanks in advanced
Replies
magico
28 Nov 2012, 14:17
RE:
I think you may be using something like MarketSeries.Open.LastValue, which gives the value of the current bar.Hi,
I'm getting the same values for Open and Close prices on backtesting. This is a bug right?
This is the drop of all prices for the EUS/USD on 1M bar
10/25/2012 12:01:00 AM, 001.297390, 001.297390, 001.297390, 001.297390, 001.297390, 001.297390, 001.297390
10/25/2012 12:02:00 AM, 001.297330, 001.297330, 001.297330, 001.297330, 001.297330, 001.297330, 001.297330
10/25/2012 12:03:00 AM, 001.297120, 001.297120, 001.297120, 001.297120, 001.297120, 001.297120, 001.297120
Thanks in advanced
Try MarketSeries.Open [MarketSeries.Open.Count-2], and see the values of the previous bar you're viewing.
@magico
admin
26 Nov 2012, 12:25
Could you please post the code you are using to generate these results?
The OnBar event will generate the same values which are equal to the open price. You may use the previous to the last trendbar if this is the case.
@admin