Can’t combine 2 different stoploss error message with IG

FAQs - Category: Automated trading

If you receive the “Can’t combine 2 different stoploss” error message when trying to launch your strategy in ProOrder with an IG trading account, it is due to a restriction on stop-loss types in live trading.

Solution

1. Understand the Issue

  • In ProBacktest, you may be able to use both SET STOP pLOSS and SET STOP pTRAILING in the same strategy.

  • However, IG does not allow combining two different stop types in a live ProOrder strategy.

  • The following examples will trigger the error:

    Incorrect Code (Not Allowed in Live Trading)

    SET STOP pLOSS 50
    SET STOP pTRAILING 20

    or

    SET STOP pLOSS pTrailing

2. Only One Stop Type Can Be Used

To make your strategy compatible with live trading on IG, choose only one type of stop:

Use a Fixed Stop-Loss Only:

SET STOP pLOSS 50

Use a Trailing Stop-Loss Only:

SET STOP pTRAILING 20

3. Alternative: Manually Code a Trailing Stop

If you want both a fixed stop-loss and a trailing mechanism, you can manually program a trailing stop instead of using SET STOP pTRAILING

The coded approach mimics a trailing stop while complying with IG’s restriction.

4. Backtest vs. Live Trading Differences

  • ProBacktest allows both stop types, so the error won’t appear during backtesting.
  • ProOrder (Live Trading) restricts this, and trying to launch the strategy with both will cause an error.

By ensuring your strategy includes only one stop type, you can successfully execute it on an IG live trading account without errors.

Back to FAQs
Logo Logo
Loading...