The %LOSS instruction in ProBuilder language is used to set a stop loss at a specified percentage below the average position price. This feature is crucial for managing risk by limiting potential losses on a trade. The stop loss is dynamically calculated based on the average price of the position and adjusts the exit point accordingly.
SET STOP %LOSS x
Where x represents the percentage loss at which the stop loss should be set.
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 2% from the average position price
SET STOP %LOSS 2
In this example, a trading strategy is implemented using the MACD indicator, where a buy order is placed if the MACD line crosses over the zero line and there is no existing long position. Following the buy order, a stop loss is set to trigger at 2% below the average price at which the position was entered.
This instruction is applicable for individual orders with IG or PRT-CFD trading platforms, ensuring that each order adheres to the specified risk parameters independently.