Does anyone know at what price does market order gets filled in backtesting (using base order fn or order_target fn)? . While backtesting on NSE min level Data I saw that the the Price in Transaction logs does not match either of OHLC of the candle or next candle on which signal was generated.
The default slippage behaviour on blueshift is volume based. The execution price is off from the next close by a spread = eta*(volume_share**2), where eta is a model parameter, equals to 0.1. Volume share is the ratio of executed trade volume to the total volume traded at that bar. This slippage is added or subtracted depending on whether it is a buy or sell. You may set the slippage to zero (to match the next OHLC close) by using the set_slippage API function, see here for an example.