Anyone aware of such a tool?
Thank you
Roger
I don't think it's really possible because MQL4 is a compiled code.
See the post 'Download function library for scrolling, color-coded messages directly on chart'
The main function is: Post(id,"message",color);
I use this often as a debug tool like this:
extern bool debug=true;
...
start () {
...
if (debug) Post(id,"some extra info I want in debug mode",Yellow);
...
}
I don't think it's really possible because MQL4 is a compiled code.
See the post 'Download function library for scrolling, color-coded messages directly on chart'
The main function is: Post(id,"message",color);
I use this often as a debug tool like this:
extern bool debug=true;
...
start () {
...
if (debug) Post(id,"some extra info I want in debug mode",Yellow);
...
}
Its not true to say that there is no debug facility due to MQL4 being a compiled (rather than interpreted) language.
Many compiled languages have a debug facility. This requires the interim stage of compiling the source code using debug libraries and then running the resulting object code through a debug utility. MQL4 just doesn't have these facilities.
If you don't wish to write to the chart, then the Print() function is very useful in order to output comments, contents of variables etc. to the logfile.
I don't think it's really possible because MQL4 is a compiled code.
See the post 'Download function library for scrolling, color-coded messages directly on chart'
The main function is: Post(id,"message",color);
I use this often as a debug tool like this:
extern bool debug=true;
...
start () {
...
if (debug) Post(id,"some extra info I want in debug mode",Yellow);
...
}
Thanks very much Jingo..., I was already using the "Comment" command to minitor the code, but MC (MessageConsole) seems to be much better.
But I cannot run it, I never get the CID code from the screen (chart), and all files are at there right place.
Any suggestions? (seems like the first bug found, will be of the debugger tool itself LOL)
Thanks
Roger
Thanks very much Jingo..., I was already using the "Comment" command to minitor the code, but MC (MessageConsole) seems to be much better.
But I cannot run it, I never get the CID code from the screen (chart), and all files are at there right place.
Any suggestions? (seems like the first bug found, will be of the debugger tool itself LOL)
Thanks
Roger
Be sure to use CID=StartMessageConsole(...); and preferrably within init() {...}
If you are already doing that, please post the exact code (if you don't mind). Also, which version of MT4 are you using. Thanks.
Thanks very much Jingo..., I was already using the "Comment" command to minitor the code, but MC (MessageConsole) seems to be much better.
But I cannot run it, I never get the CID code from the screen (chart), and all files are at there right place.
Any suggestions? (seems like the first bug found, will be of the debugger tool itself LOL)
Thanks
Roger
OK,,, Jingo, I got it, I reread the instructions and for some reasons, the "int CID;" var declaration line was not Highlighted and I overlooked it.
This is very neat, i like very much.
- Are there better instructions available?
- Is there a way to have some audio alerts for certain conditions?
- Is there a way to pause,start (Keyboard shortcuts)?
Roger
Anyone aware of such a tool?
Thank you
Roger
hmmm... you could write an interpreter, take the data from MT4 and drop it into a DB, then run an interpreter over it so it runs one tick at a time. You could even use a non-mql language (eg vbscript, perl, .net) because the logic is all the same, it's only the orders and stuff that would be different.
actually, just thinking about it, that would be a really good way to test strategies, ignore MT and write your logic in another language, all you need to do is emulate the TA's and order methods.
Thanks Mick, I'm happy you like it. Adding audio is a great idea, so I will work on that. As for the pause, it could be done in normal EA operation by integrating the MQL4 function MessageBox into the Post function, but unfortunately the Strategy Tester ignores any MessageBox calls. Let me think about this a bit... (so I guess the answer is yes and no) jdc
Your welcome Jingo, if you ever need someone to beta test it, here is my email: r.d@tlb.sympatico.ca .
hmmm... you could write an interpreter, take the data from MT4 and drop it into a DB, then run an interpreter over it so it runs one tick at a time. You could even use a non-mql language (eg vbscript, perl, .net) because the logic is all the same, it's only the orders and stuff that would be different.
actually, just thinking about it, that would be a really good way to test strategies, ignore MT and write your logic in another language, all you need to do is emulate the TA's and order methods.
WOUFFF, I'm not proficient enough to get into that, I think I'll let the Pros (coding) work on that. But do you know if there is an editor (any other language)
that we could copy the code in it and maybe automate the debugging a bit more?
Roger
Thanks Mick, I'm happy you like it. Adding audio is a great idea, so I will work on that. As for the pause, it could be done in normal EA operation by integrating the MQL4 function MessageBox into the Post function, but unfortunately the Strategy Tester ignores any MessageBox calls. Let me think about this a bit... (so I guess the answer is yes and no) jdc
Hi Jingo, It would also be very nice if we could print the value of one or two variables beside the comment at each Post. I dont know how much more work it would be but it would be VERY useful to follow the action of specific components at each steps of the code.
Also, i have a favor to ask, would you mind taking a look at another post I have here under "
Please HELP, I need some advice.............
Im trying to write Functions, at having rough time.
Thanks
Roger
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Anyone aware of such a tool?
Thank you
Roger