3.3.2.3Stop-loss on orders and trades

The sl on a pending order or trade can be specified using any of the following:

sl:

Description

number

Fixed price such as 1.23456 (zero or omitted for no stop-loss)

{price: x}

Same as a simple number: fixed price such as 1.23456

{offset: x}

Offset from the current market price, such as 0.0020. The value is directional depending on the tradingAction: subtracted from the current price for buy orders, added for sells.

{pips: x}

Offset from the current market price in pips, such as 20. Converted by the framework using the market's pipSize. The value is directional depending on the tradingAction.

{bar: barDef}

See the description of candle-based prices below

{cashRisk: x}

Calculates the stop-loss so that, based on the volume, it equates to a cash value no more than x (in the account's deposit currency). Must be used with a fixed volume; cannot be used with a volume which is also variable/derived such as volume:{cashRisk:x}

{equityPercent:x}

Calculates the stop-loss so that, based on the volume, it equates to no more than x% of the current account equity. Must be used with a fixed volume; cannot be used with a volume which is also variable/derived such as volume:{cashRisk:x}

{balancePercent: x}

Calculates the stop-loss so that, based on the volume, it equates to no more than x% of the current account balance. Must be used with a fixed volume; cannot be used with a volume which is also variable/derived such as volume:{cashRisk:x}