Closed isslerman closed 1 month ago
When there is no best bid or best ask, it sets INVALID_MIN
or INVALID_MAX
, respectively. Refer to this.
If the initial snapshot is not provided at the beginning of the backtest or if the depth is cleared and has not yet been recovered by the snapshot or natural refresh, this situation can occur. If the data is valid, Elapsing until the best bid and ask have valid values resolves the issue.
I am loading some data into the simulator and printing some debug data and found some negative values or non-initialized values for best_bid_tick and best_bid. Ask is fine but bid is wrong. Not sure yet if is some data wrong.
I am using python here.
Here is the code:
And here is the result: