xhxiang:
What was the Bid and Ask at the time ? what are the STOPS LEVEL and FREEZE LEVEL ? check the return values from your function calls, when you detect that the modify fails report the error and any relevant variables, Bid, Ask, etc, that you need to diagnose the problem.
hi,
i have a EA ,it function correctly in back testing,without no error.
but it return error message in live account as below:
----------------------------------
PM 0 0406_EA_xxx (USDJPY,M15) 12:45:07 CTrade::OrderSend: modify USDJPY (sl: 99.389, tp: 97.871) [invalid stops]
ID 0 0406_EA_xxx (USDJPY,M15) 12:45:07 Error modifying position by USDJPY : 'Invalid stops'
QH 0 0406_EA_xxx (USDJPY,M15) 12:45:07 Modify parameters : SL=99.389000,TP=97.871000
-----------------------------------
and the open price is 98.0
can somebody tell me why?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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,
i have a EA ,it function correctly in back testing,without no error.
but it return error message in live account as below:
----------------------------------
PM 0 0406_EA_xxx (USDJPY,M15) 12:45:07 CTrade::OrderSend: modify USDJPY (sl: 99.389, tp: 97.871) [invalid stops]
ID 0 0406_EA_xxx (USDJPY,M15) 12:45:07 Error modifying position by USDJPY : 'Invalid stops'
QH 0 0406_EA_xxx (USDJPY,M15) 12:45:07 Modify parameters : SL=99.389000,TP=97.871000
-----------------------------------
and the open price is 98.0
can somebody tell me why?