Exercises: Exit Methods

1. Profittarget

Code the following

  • A $2000 profit target
  • A $1000 stop loss

Setprofittarget(2000);

Setstoploss(1000);

2. Exit on close

Code an exit that gets out on the close of the trading session.

Setexitonclose;

3. Trailing stop

Code a trailing stop that activates after a $500 positive excursion, and trails price by 2 %. 

Setpercenttrailing(500,2);

>

Login to Your Account



Signup Here
Lost Password