Hi SunnyGirl,
Probably the easiest way to work out which error belongs to which error number is to open the file "MetaTrader4\experts\include\stdlib.mqh". The actual library file "MetaTrader4\experts\lib\stderror.mqh" will show you this as well, although it also contains the surrounding code to handle the error.
If you want the expert to say, print the error to the log, you can add something like the following to your expert...
(at the top of your expert code) #include <stdlib.mqh>
then when you want to print your error condition, include something like:
print("The following error occurred: " + ErrorCondition(GetLastError()));
Hope this helps.
Probably the easiest way to work out which error belongs to which error number is to open the file "MetaTrader4\experts\include\stdlib.mqh". The actual library file "MetaTrader4\experts\lib\stderror.mqh" will show you this as well, although it also contains the surrounding code to handle the error.
If you want the expert to say, print the error to the log, you can add something like the following to your expert...
(at the top of your expert code) #include <stdlib.mqh>
then when you want to print your error condition, include something like:
print("The following error occurred: " + ErrorCondition(GetLastError()));
Hope this helps.
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'd also like to know what the different colours (green/red, lt green/dk green) mean in the little coloured box in the bottom right hand corner of the chart window, and also the meanings of the numbers with the "/" between them beside that coloured box. What's good and what's not good? When should I get worried?
Lesley