- 2023.03.03
- www.mql5.com
Totally this highlighted part is my 1st trailing stop which says if Ask is 30 pips bellow OrderOpenPrice, in a short Trade,then place order stop loss 10 pips bellow Orderopen price.
when i test this EA for the 1st sell order, All 3 trails work properly.
But for the 2nt sell order (Magic# 2222),the 1st trail which is highlighted in yellow does not work and sends this error: OrderModify error 130
Also here is the print functions results before the error:
2023.03.03 18:28:53.762 2023.01.05 16:00:00 testma1250 EURUSD,H1: open #2 sell limit 0.05 EURUSD at 1.05959 sl: 1.06289 tp: 1.04322 ok
2023.03.03 18:28:53.762 2023.01.05 16:00:00 testma1250 EURUSD,H1: Let's play Short order modifyyyyy 30 trail
2023.03.03 18:28:53.762 2023.01.05 16:00:00 testma1250 EURUSD,H1: Newstop= 1.05859
2023.03.03 18:28:53.762 2023.01.05 16:00:00 testma1250 EURUSD,H1: SYMBOL_TRADE_STOPS_LEVEL= 0.00031
2023.03.03 18:28:53.762 2023.01.05 16:00:00 testma1250 EURUSD,H1: Ask-SYMBOL_TRADE_STOPS_LEVEL= 1.05528 - 0.00031 =1.05497
2023.03.03 18:28:53.762 2023.01.05 16:00:00 testma1250 EURUSD,H1: OrderModify error 130
2023.03.03 18:28:53.762 2023.01.05 16:00:00 testma1250 EURUSD,H1: Error in OrderModify. Error code=130
so you can see that all the conditions for the trail is correct, and stop level as 3.1 pips and my trailing stop is about 30 pips above Ask , but it is not working.
Please help i hope i explained clearly.
Don't double post! You already had another thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum (2017)Don't double post! You already had another thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum (2017)I could not edit that to send the total code.
Here is the total code.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use