I am encountering issues with the functionality of SetProfitTarget and SetStopLoss in a Multi-Instrument strategy while using the Strategy Analyzer. Below are the details of the issues I am facing:
- Stop Loss Triggered Incorrectly:
- As shown in the attached screenshot, the Stop Loss for AAPL was triggered at the same time as the original position entry on January 3, 2022.
- Upon reviewing the daily high and low for AAPL on that day, the price levels were well above the Stop Loss. This behavior seems incorrect, as the Stop Loss should not have been activated under these conditions. Print screen attached is daily to get an overview of the day but the strategy is run on a minute historical data (I confirm that the prices stay in the daily overview range)
- From a configuration perspective, the Stop Loss and Profit Target values appear to be set correctly for each stock orders.
- OCO ID Misalignment:
- Initially, the OCO IDs for the orders seem to be correctly aligned with the long entry ID.
- However, starting the next day, the OCO IDs no longer appear to match or behave as expected.
- I might not fully understand how OCO IDs are supposed to function in this context, but this discrepancy seems unusual.
Configuration Details:
- Both SetProfitTarget and SetStopLoss are configured once in the State.Configure state.
- No specific "entry signal" is provided to these methods, which, as per my understanding, should apply to all relevant orders.
Could you please help me understand if there is an issue with my implementation. Any guidance or clarification you can provide on the correct usage of SetProfitTarget and SetStopLoss in Multi-Instrument strategies would be greatly appreciated.
Thank you for your support, and please let me know if you need additional information or files to troubleshoot this further.
Best regards,

Comment