The $LOSS instruction in ProBuilder language is used to set a stop loss level in terms of a fixed monetary amount. This feature is crucial for managing risk by specifying the maximum amount of money a trader is willing to lose on a single trade. When the loss on a position reaches the specified amount, the position is automatically closed, thus preventing further losses.
SET STOP $LOSS x
Here, x represents the monetary amount (in the currency of the traded instrument) that the trader is willing to lose.
myMACD = MACD[12,26,9](close)
long = myMACD crosses over 0
IF NOT LongOnMarket AND long THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
// Set stop loss at $200 loss
SET STOP $LOSS 200
In this example, a trading strategy is implemented where a buy order is placed if the MACD indicator crosses over zero and there is no existing long position. Immediately after entering the position, a stop loss is set to limit the potential loss to $200.
This instruction is particularly useful for traders who want to ensure strict risk management in their automated trading strategies, helping to preserve capital by avoiding large losses.