The TARGET instruction in ProBuilder language is used to set a profit target for a trading position in terms of price movement. This instruction is crucial for implementing a strategy where a specific profit goal is predefined, allowing the trading system to automatically close a position once the target profit level is reached.
SET TARGET PROFIT x
Here, x represents the target profit amount expressed in points or pips. The value of x should be adjusted based on the point size of the traded instrument.
myMACD = MACD[12,26,9](close)
long = myMACD crosses over 0
IF NOT LongOnMarket AND long THEN
BUY 1 CONTRACTS AT MARKET
SET TARGET PROFIT 20
ENDIF
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 20 instruction sets a profit target of 20 points above the entry price. If the price reaches this target, the position will be closed automatically to secure the profit.
This instruction is particularly useful in automated trading systems where managing risk and securing profits systematically is crucial. By setting a profit target, traders can ensure that profitable trades are closed at predetermined levels, potentially enhancing the consistency of their trading strategy.