Closes out the entire position or the entry if the loss reaches the specified currency value; generates the appropriate Stop order depending on whether the position is long or short.
The SetStopPosition and SetStopContract or SetStopShare functions determine whether the SetStopLoss function will be applied to the entire position or to each contract or share individually; by default, SetStopLoss is applied to the entire position.
- Amount - a numerical expression, specifying the stop loss amount.
- This function can only be used in signals.
Generate an exit order for the entire position if the position loss reaches $100:
Generate an exit order for the entry if the loss per contract reaches $10: