Good evening,
Nicolas thank you for your answers.
I try to change your trailing stop program.
http://www.prorealcode.com/blog/trading/complete-trailing-stop-code-function/
Your stopprofit is set up when the market goes up if you buy.
however, the setup is not activated if the market goes up when making a purchase
I would do the opposite.
Stoptraining trigger if the market goes down on a purchase.
The dax = 10000
If dax falls in 9500, the trailing stop is triggered with a stop at 9450. If the market rises, the stop back by 5 points.
Can you tell me the elements to change in the code.
Other people may want a trailing stop after a loss instead of a gain.
I hope my English is not too bad.
Thank you very much.