My custom strategy returns the following two error messages:
Could you to take a look at my code? I have attached a simplified version with comments , print statements and TraceOrders = true.
The error will occur if you run the strategy on a 5 min ES chart in a trending market with COBC = true.
- COBC = true.
- Managed approach
- Entry Orders are live until cancelled
- SetStopLoss() and SetProfitTarget() are set in the OnExecution method
- Cancelled and rejected entry orders are reset in OnOrderUpdate()
- Stop- and target prices are dynamically updated in OnBarUpdate()
- Stop- and target prices are reset in OnPositionUpdate and OnOrderUpdate() when cancelled or rejected entry orders are reset
Best regards,
Posedon_sthlm

Comment