Login Page - Create Account

Support Board


Date/Time: Fri, 19 Apr 2024 13:37:58 +0000



[User Discussion] - Major Issue: Incorrect Trade Execution Time between Live and Backtest after version 2192

View Count: 366

[2020-11-24 12:23:22]
rahul - Posts: 160
Hello SC Engineers,

My code executes a market order when bar is closed. Before version 2192, the execution times were nearly the same but after version 2192 they are off by an entire second or more.
For example when I am using 1 minute chart timeframe, the order executed at 10:00:01 (which is similar to the backtest)...but now the order executes at 09:59:59 instead.
This is causing a big variance between backtest and live trading, which was not the case earlier.

bool Bar_Has_Closed = ((sc.GetBarHasClosedStatus(sc.Index) == BHCS_BAR_HAS_CLOSED) || (sc.GetBarHasClosedStatus(sc.Index) == BHCS_SET_DEFAULTS)) ? TRUE : FALSE;

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account