Yes and the error is 4051
Well according to https://docs.mql4.com/constants/errors/ a 4051 is an "Invalid function parameter value" so I would venture to guess that one or more of the parameters you are submitting is not accepted by your broker. For example, my broker does not allow me to submit a Take Profit and Stop Loss with an Open Market Execution. After the order is submitted, I can edit the order and add a SL and TP, but not before; it would result in a 4051.
octriano:
Cool, can you show the line of code, and any code associated with any variables used in that line of code, that is responsible for reporting this error to the log please.
Yes and the error is 4051
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 am running my EA in different DEMO and LIVE platforms working fine in all of them except for 1 at FXCM live.
I adjusted settings to work the same in all platforms but keep getting:
- Trade disabled
- Ticket=-1 intead of a regular ticket as happens with the other brokers
Error 4051
I cannot understand how come the EA works perfectly fine in other brokers, even in the FXCM DEMO but not in the FXCM live.