SOLVED, I had to:
- Use PositionAccount Instead of Position:
PositionAccount reflects the actual account position, including manual trades. If your strategy needs to interact with manual trades, check PositionAccount.MarketPosition to reflect the current state. - Disable Strategy Position Tracking:
When setting up a strategy, uncheck the "Start behavior" for Sync Account Position if you're trying to manage positions manually outside the strategy. - Use Events Like OnPositionUpdate():
Use the OnPositionUpdate() method to track any manual changes to positions. This will let you handle any updates that occur manually outside your strategy.

Comment