Closes out the entire position or the entry if the current profit is less than the maximum profit by the specified amount; generates the appropriate Stop order depending on whether the position is Long or Short.
For example, if the specified amount is $50 and the profit has reached the maximum of $120, the position will be closed once the profit drops to $70.
SetStopPosition and SetStopContract or SetStopShare functions determine whether SetDollarTrailing will be applied to the entire position or to each contract or share individually; by default, SetDollarTrailing is applied to the entire position.
- Amount - a numerical expression, specifying the currency value of the maximum loss of profit.
- This function can only be used in signals.
- Use SetPercentTrailing to set a percentage trailing stop loss.
Generate an exit order for the entire position if position profit drops by $50:
Generate an exit order for the entry if per contract profit drops by $10: