The STOP (pending) instruction in ProBuilder language is used to place a stop order at a specified price level. This type of order is crucial in trading strategies for managing risk by specifying a price at which a position should be automatically closed to prevent further losses. The ‘pending’ aspect of this instruction indicates that the order remains inactive until the price reaches the stop level, and it must be re-placed at the beginning of each new bar if not triggered.
BUY AT x STOP
myMACD = MACD[12,26,9](close)
long = myMACD crosses over 0
IF long THEN
BUY 1 LOT AT close+10 STOP
ENDIF
In this example, a Moving Average Convergence Divergence (MACD) indicator is used to determine the trading signal. The MACD is a trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The trade is initiated with a stop order to buy 1 lot if the MACD crosses above the zero line, indicating a potential upward trend. The stop order is placed 10 points above the closing price.
This documentation should help beginners understand how to use the STOP (pending) instruction in ProBuilder to manage risk effectively in their trading strategies.