when I profit USD10, and return back 20%, I will exit my position.
May I know which strategy is correct?
1.
Setstopposition
Setpercenttrailing(10,20);
2.
Setpercenttrailing(10,20);
Thanks!
Setpercenttrailing & Setstopposition
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: Setpercenttrailing & Setstopposition
Hello ctu1121,
Both pieces of code will do the same thing-they will close out the entire position if the specified percentage (20) of the maximum profit is lost after the profit has reached the specified value (10).
If SetStopPosition and SetStopContract or SetStopShare are not specified then by default SetPercentTrailing is applied for entire position.
Please refer to SetPercentTrailing wiki description for more information and examples.
Both pieces of code will do the same thing-they will close out the entire position if the specified percentage (20) of the maximum profit is lost after the profit has reached the specified value (10).
If SetStopPosition and SetStopContract or SetStopShare are not specified then by default SetPercentTrailing is applied for entire position.
Please refer to SetPercentTrailing wiki description for more information and examples.