Getting error compiling EA in MT5
- "SetDeviation" is not a valid CTrade class method. The correct method name is "SetDeviationInPoints".
- "AccountFreeMargin" is not a valid MQL5 function. That is from MQL4. In MQL5 use:
AccountInfoDouble( ACCOUNT_MARGIN_FREE );
I just noticed that the code was generated by A.I. ...
//| Author: ChatGPT (Corrected, Full Version) In the future, don't request help for A.I. generated code. It generates horrible invalid code.
Research the Documentation, Articles and Codebase, or use the Freelance section for such requests.
someone pls help me. this error is not gotting resolve.