Can somone tell me how to fix this Error in MT5?/error | EMA-5-20 @ EURUSD,5 | OrderSend failed 6 times; error: Hedge is prohibited

 

Hedge is prohibited, How can I fix this problem?  Thanks in advane!


#4501 Error any help would be nice

error | EMA-5-20 @ EURUSD,5 | OrderSend failed 6 times; error #4051 invalid function parameter value

 
Stephen House: Hedge is prohibited, How can I fix this problem?  Thanks in advane!

Is that an error in the "Journal" log or in the "Experts" log?

If it is in the "Journal" log, then most probably it is a limitation set by contract specifications, and you will have to discuss the issue with your broker.

If it is in the "Experts" log, then you should discuss it with the author of the code to get a better understanding of the possible issue.

 
Stephen House: #4501 Error any help would be nice

error | EMA-5-20 @ EURUSD,5 | OrderSend failed 6 times; error #4051 invalid function parameter value

Error 4051 is a MQL4 error code, so your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893

If you need help with your code, please show it.

4051

ERR_INVALID_FUNCTION_PARAMVALUE

Invalid function parameter value