renzbub:
I have shown below 2 different codes that each do the same task of moving my stop to breakeven after price has gained profit of 200pts (at 0.1 lots).
While the first code works like I want without any problems, I cant see why the second code although appears to work correctly in the MT4 journal it always says OrderModify error 1?
Code 1
Code 2
Error 1 means you are trying to set a new stoploss with the same value as the old one. Check your new value against the old.
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
I have shown below 2 different codes that each do the same task of moving my stop to breakeven after price has gained profit of 200pts (at 0.1 lots).
While the first code works like I want without any problems, I cant see why the second code although appears to work correctly in the MT4 journal it always says OrderModify error 1?
Code 1
Code 2