Hi,
Seems from the log, your myposition.StopLoss() value is changing?
1.34987 1.34985 1.34984
But the pip difference is too small. You should increase it.
Also for your reference, please check this hard trailing coding example. There is some useful comment on the code to make it easy to understand. It's written in C++ style.
https://www.mql5.com/en/forum/6226/166552#comment_166552
Cheers.

Help me find this....
- www.mql5.com
I don't need it to open new trades, only adjust my T/P just before the market hits the one I originally set.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi guys,
I'm still having problem with my trailing stops. The stoploss level is supposed to be changed only if the price minus the trailing stop point is greater than the existing stoploss point. But in my program, the stop loss is being adjusted as I can see it in the visual tester. The problem is that myposition.Stoploss() is not changing values and this is the one that I use in my if condition. Any suggestions?
I printed the myposition.Stoploss() to see if the value is really changing, turns out it does not change that's why my code continuously goes through the entire thing of modifying the existing position.
Any suggestions for the replacement of myposition.Stoploss since it does not give the most current stoploss level (only the original sl level)?