SL - Stop Loss

Note:### Parameter: sl

Type: decimal

Required: No

Description:

  • The stop-loss level for the order.
  • If specified, the order will be closed automatically when the price reaches the stop-loss level.
  • The value can be either a price or a percentage from the current price. The SlType in the MT5 connector determines how the stop-loss level is interpreted.

Example:

JSON

{
    "sl": 1.1200
}

Note:

  • The sl parameter is optional. If not specified, no stop-loss will be set.
  • If sl is specified, ensure that the SlType in the MT5 connector is set correctly.
  • For price-based stop-losses, the price must be below the entry price for long positions and above the entry price for short positions.
  • Incorrect or missing sl values may result in unexpected behavior.