You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When listening to engine events during backtesting, I've encountered an issue where the PositionNew event correctly reports the entry time. However, for the PositionExit event, the exit_time field is always set to the current time instead of the actual exit time from the past.
Expected Behavior:
The exit_time in the PositionExit event should reflect the exact time when the position was exited, as recorded in the backtest, rather than the current time.
The text was updated successfully, but these errors were encountered:
Hey @ahmedxfn, thanks for opening this. It's a valid point.
I've re-written the whole of barter now so there is a new trait EngineClock that begins to handle this "backtest time" problem via it's HistoricalClock implementation.
When listening to engine events during backtesting, I've encountered an issue where the
PositionNew
event correctly reports the entry time. However, for thePositionExit
event, theexit_time
field is always set to the current time instead of the actual exit time from the past.Expected Behavior:
The
exit_time
in thePositionExit
event should reflect the exact time when the position was exited, as recorded in the backtest, rather than the current time.The text was updated successfully, but these errors were encountered: