Hi,
I have a multi-timeframe strategy using AddDataSeries for a secondary timeframe. I’m trying to combine:
ExitLongStopMarket/ExitLongLimitfor SL/TP (submitted fromOnExecutionUpdatewith real fill price)ExitLong/ExitShortfor signal-based exits (cancelling SL/TP orders first)
Problems:
ExitLongStopMarket/ExitLongLimitfromOnExecutionUpdateappear silently ignored in backtest — no errors, positions just don’t close by SL/TP- If I use
SetStopLoss/SetProfitTargetinstead, the signal-basedExitLongcalls are then ignored (Internal Order Handling Rules)
Questions:
- Can
ExitLongStopMarket/ExitLongLimitbe used in backtest withCalculate.OnBarClose? - What is the correct approach to have both SL/TP orders AND signal-based exits working simultaneously in backtest with
AddDataSeries?
Thank you.