Backtesting a strategy based on daily bars and once filled I set a stop and take profit with the api. What I see on the report however, is that my position is closed at the same time each day regardless of if it is the take profit or stop. Here's a section example:
009-06-04 00:00:00 Order submitted Order [euus2, EUR/USD, BUY, 100000.0 at 0.0] submitted by the strategy 2009-06-04 00:00:00 Order filled Order [euus2, EUR/USD, BUY, 100000.0 at 1.4144] filled 2009-06-04 09:00:00 Order closed Order [euus2, EUR/USD, BUY, 100000.0 at 1.4144] closed by stop loss event, amount 100000.0 at 1.407 2009-06-04 21:00:00 Commissions Commissions [5.08] 2009-06-05 00:00:00 Order submitted Order [euus3, EUR/USD, BUY, 100000.0 at 0.0] submitted by the strategy 2009-06-05 00:00:00 Order filled Order [euus3, EUR/USD, BUY, 100000.0 at 1.41695] filled 2009-06-05 09:00:00 Order closed Order [euus3, EUR/USD, BUY, 100000.0 at 1.41695] closed by take profit event, amount 100000.0 at 1.42675 2009-06-05 21:00:00 Commissions Commissions [5.12]
As the backtester is simulating the effect of a real-time execution, I imagine something is at play here, but I would have hoped that the report time represented the actual time of the historic tick-price that closed the position.
Also, there doesn't seem to be much relationship between the closed price and the open when considering my stop/takeprofit value considering these will be activated by tick-data on the server?
Could you please clarify the situation please.
|