This issue is likely caused by setting stop-loss or take-profit levels too close to the current price, with a typical minimum distance of 30 points (3 pips).
Alternatively, it might be because these levels are positioned on the incorrect side of the current market price.
You can check this for any product by reviewing the contract specifications under the Stops Level section.