The SET TARGET PROFIT instruction in ProBuilder language is used to define a specific profit target in trading strategies. This command sets a goal for the trading system to close a position once a specified profit level is reached, measured in the price units of the traded instrument.
SET TARGET PROFIT x
Here, x represents the number of price units (equal to the POINTSIZE of the instrument) that you aim to gain as profit.
myMACD = MACD[12,26,9](close)
long = myMACD crosses over 0
IF NOT LongOnMarket AND long THEN
BUY 1 CONTRACTS AT MARKET
ENDIF
// Set profit target at 50 price units
SET TARGET PROFIT 50
In this example, a trading strategy is implemented using the MACD indicator. A buy order is placed when the MACD line crosses over the zero line, indicating a potential upward trend. The SET TARGET PROFIT 50 command specifies that the position should be closed once a profit of 50 price units is achieved.
This instruction is crucial for automating trade exits at predefined profit levels, helping to manage risk and secure gains without manual intervention.