An "Invalid Stop Loss/Take Profit (SL/TP)" error occurs when attempting to set up a pending order with incorrect parameters.
Common Causes and Solutions:
Placing a Pending Order in the Wrong Direction: Ensure that the correct pending order type is selected, as different order types behave differently. Incorrect usage can lead to errors.
Buy Stop – Must be set above the current ask price.
Sell Stop – Must be set below the current bid price.
Buy Limit – Must be set below the current ask price.
Sell Limit – Must be set above the current bid price.
Incorrect Stop Loss or Take Profit Placement: SL and TP prices must align with the order type and the direction of the pending order.
Buy Orders:
Stop Loss must be set below the current bid price.
Take Profit must be set above the current bid price.
Sell Orders:
Stop Loss must be set above the current ask price.
Take Profit must be set below the current ask price.
Keep in mind that SL/TP levels can be modified at any time after placing an order. However, the expected profit or loss must be based on the current market price when setting the pending order, not the opening price. In some cases, a trade may still result in a loss even if it closes with a Take Profit, especially if it was set at a worse price than the order's opening price. The opposite can also occur with Stop Loss.