TP - Take profit
Parameter: tp
Type: decimals
Required: No
Description:
- The take-profit level for the order.
- If specified, the order will be closed automatically when the price reaches the take-profit level.
- The value can be either a price or a percentage from the current price. The
TpType
in the MT5 connector determines how the take-profit level is interpreted.
Example:
JSON
{
"tp": 1.1250
}
Note:
- The
take_profit
parameter is optional. If not specified, no take-profit will be set. - If
take_profit
is specified, ensure that theTpType
in the MT5 connector is set correctly. - For price-based take-profits, the price must be above the entry price for long positions and below the entry price for short positions.
- Incorrect or missing
take_profit
values may result in unexpected behavior.