lionelalbo:
Check mode stop level.
the actual price (Ask) is greather than the stoploss (new value) in case of buy.
- lionelalbo: Of course, the actual price (Ask) is greather than the stoploss (new value) in case of buy.You buy at the Ask and sell at the Bid.
- Your buy order's TP/SL are triggered when the Bid reaches it. Not the Ask.
-
Your sell order's TP/SL will be triggered when the Ask reaches it. To trigger at
a specific Bid price, add the average spread.
MODE_SPREAD (Paul) - MQL4 and MetaTrader 4 - MQL4 programming forum - Page 3 - The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools -> Options {control-O} -> charts -> Show ask line.)
-
lionelalbo: in this case OrderModify return me error code 130.You can't move stops (or pending prices) closer to the market than the minimum (MODE_STOPLEVEL * _Point.)
Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial
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
Hello Everybody,
I'm new on MQL4 and I would like to modify the stoploss of and existing order.
If my trade go up I would like to modify my stoploss, it should be greather than the open price (in case of buy), in this case OrderModify return me error code 130.
Does anyone have a solution to modify the stoploss with a value greather than the openprice ?
Of course, the actual price (Ask) is greather than the stoploss (new value) in case of buy.
Thank you.
Lionel