Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5: https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code: https://www.mql5.com/en/articles/272
scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/35
Tips from a professional programmer (Part I): Code storing, debugging and compiling. Working with projects and logs
https://www.mql5.com/en/articles/9266
Tips from a professional programmer (Part II): Storing and exchanging parameters between an Expert Advisor, scripts and external programs
https://www.mql5.com/en/articles/9327
Tips from a professional programmer (Part III): Logging. Connecting to the Seq log collection and analysis system
https://www.mql5.com/en/articles/10475
- www.metatrader5.com
If the code can be compiled without any error but it doesn't do what you expect use the debugger to find out why - it is exactly made for this.
Code debugging: https://www.metatrader5.com/en/metaeditor/help/development/debug
Error Handling and Logging in MQL5: https://www.mql5.com/en/articles/2041
Tracing, Debugging and Structural Analysis of Source Code: https://www.mql5.com/en/articles/272
scroll down to: "Launching and Debuggin": https://www.mql5.com/en/articles/35
Tips from a professional programmer (Part I): Code storing, debugging and compiling. Working with projects and logs
https://www.mql5.com/en/articles/9266
Tips from a professional programmer (Part II): Storing and exchanging parameters between an Expert Advisor, scripts and external programs
https://www.mql5.com/en/articles/9327
Tips from a professional programmer (Part III): Logging. Connecting to the Seq log collection and analysis system
https://www.mql5.com/en/articles/10475
However I have run into a problem of using historical data...I am unable to it would seem as I am using MT4 and not MT5 and MQL4 and not MQL5 respectively. The option is greyed out in my options and after doing a quick google search it would appear that feature is not available in MT4. So not sure how to go about this? And so I also defer to my original post in terms of getting the back testing to work right
What option are you referring to that is "greyed out"? (show a screenshot)
The MetaEditor debugging functionality works on both MQL5 and MQL4. You can debug on MQL4 too with no issues.
Even if there was no debugger for MQL4, you can also use Print() in your code at specific points to output information to the Experts log (ou Journal log in the Strategy Tester) to help you debug your code.
You can use either method (or both) to debug and analyse your code to find the cause of the problem.
What option are you referring to that is "greyed out"? (show a screenshot)
The MetaEditor debugging functionality works on both MQL5 and MQL4. You can debug on MQL4 too with no issues.
Even if there was no debugger for MQL4, you can also use Print() in your code at specific points to output information to the Experts log (ou Journal log in the Strategy Tester) to help you debug your code.
You can use either method (or both) to debug and analyse your code to find the cause of the problem.
Thanks for the reply. Below is a screenshot of what I am talking about. I will go through and use the Print() option too if I can't figure out the back testing.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello!
I am a bit stumped on something. I have coded what I believe should be a working EA. And I say "should" because the code compiles with no errors and logically it seems okay to me. Still newer in my journey of coding EA's though so I could be completely off. But I try and back test the EA and I get the following results over and over again with no results. I am not sure what I am doing wrong. I have downloaded data of various currency pairs and various time frames and same thing.
Any suggestions? Hope I've been clear enough with my problem