Login Page - Create Account

Support Board


Date/Time: Tue, 30 Apr 2024 03:41:48 +0000



Post From: How are entry/exit Price calculated for MKT orders on Historical BackTest?

[2014-04-30 08:03:16]
Israel Gottlieb - Posts: 14
I'm referring to Replay/Backtesting. To be concrete, I have ready screenshots of the chart showing the results of the autotrader + the TradeActivity log . . . however, the file upload (Edit Attached Files) doesn't seem to work. [Provide address where I can send the files . . . ?]

In a specific example (chart: CLX13) the Autotrader is exiting on a very simple signal of 2 consecutive increases of MACD Histogram -- which occurs for the first time on 2013-08-01, as correctly indicated by the Autotrader where it draws an aqua color arrow for the exit fill. However, the TradeActivity Log shows the fill as executed 1 day earlier, on 2013-07-31. Further, the exit price is logged as 102.94, which is the CLOSE price of the earlier bar, i.e. on 2013-07-31. However, the signal was not realized until the CLOSE of the following bar. The OPEN on 2013-08-01 is 1 pt away from this price, however, the autotrader restricts all trades to sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED, hence should be ignoring the OPEN and using the CLOSE price only. NOTE that all orders are MKT for this autotrader.

On other occasions -- with the same autotrader, the fill price is not the same, or even very close to any of the OHLC prices.

Would appreciate any clarification or pointer to documentation re exactly what happens here . . .
IG