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
Thanks, Deep Thought. I'll give things a look. I haven't tried it in some time. I started programming in the late'70s when no such thing as IDES or debuggers existed. PC's didn't even exist. We used text editors to create our programs and inserted print statements to "debug". I've been using Alerts because I can see them when they happen and I automatically get a log that I can go back and look at. Hey, that's better than we had it "back in the day". :-)
You're right about the available information. It's definitely lacking. I get most of my information by coming onto the forum and asking questions. I try to provide useful information in return if I figure out a solution to a programming issue. We're all Devs. We've got to work together here. Pleasure to make your acquaintance. :-)
Thanks, Deep Thought. I'll give things a look. I haven't tried it in some time. I started programming in the late'70s when no such thing as IDES or debuggers existed. PC's didn't even exist. We used text editors to create our programs and inserted print statements to "debug". I've been using Alerts because I can see them when they happen and I automatically get a log that I can go back and look at. Hey, that's better than we had it "back in the day". :-)
You're right about the available information. It's definitely lacking. I get most of my information by coming onto the forum and asking questions. I try to provide useful information in return if I figure out a solution to a programming issue. We're all Devs. We've got to work together here. Pleasure to make your acquaintance. :-)
Hi,
Which information are you missing about the debugger ? Did you check the help file of MetaEditor ?
There is known bug with build 646, with an available fix.
Yes, I did check the Help file. Some of this information apparently wasn't available when I did(that was in build 600 or so, if I remember correctly). I don't recall seeing a debug tab in the Options dialog at that point. Nor did I see any mention of it in the documentation. Obviously, the 646 fix wasn't available then. If you will, clarify a couple of things for me. I write and keep my project code(and a copy of the current MetaEditor) in a directory folder dedicated to that purpose and copy the executables to the proper MT4 installation folder for testing(forward only, I don't back test). It makes sense to me that the project you're trying to debug needs to be in the proper folder in your MT4 installation and that you need to use the MetaEditor application from your running MT4 app and open the mq4, etc. files that are residing in the installation folder or the debugger won't know what you're trying to debug. The indicator I'm working on only has a single mq4 file, so I'm assuming that's what needs to be open in MetaEditor. Correct? That's the approach I took from the start assuming that the debugger and running MT4 couldn't possibly know anything about what I had in my separate development directory.
I probably won't get to this until the beginning of next week. I'm in the USA and have been up all night working. It's time for me to "hit the hay" as we say here in the States. Thanks for your response and I will definitely post and let you know what I encounter when I try the current incarnation of the debugger. Like I've said previously, I know that what MQ is doing here is not trivial. I'll be happy to help in any way that I can.
Have a great weekend, angevoyageur.
Yes, I did check the Help file. Some of this information apparently wasn't available when I did(that was in build 600 or so, if I remember correctly). I don't recall seeing a debug tab in the Options dialog at that point. Nor did I see any mention of it in the documentation. Obviously, the 646 fix wasn't available then. If you will, clarify a couple of things for me. I write and keep my project code(and a copy of the current MetaEditor) in a directory folder dedicated to that purpose and copy the executables to the proper MT4 installation folder for testing(forward only, I don't back test). It makes sense to me that the project you're trying to debug needs to be in the proper folder in your MT4 installation and that you need to use the MetaEditor application from your running MT4 app and open the mq4, etc. files that are residing in the installation folder or the debugger won't know what you're trying to debug. The indicator I'm working on only has a single mq4 file, so I'm assuming that's what needs to be open in MetaEditor. Correct? That's the approach I took from the start assuming that the debugger and running MT4 couldn't possibly know anything about what I had in my separate development directory.
I probably won't get to this until the beginning of next week. I'm in the USA and have been up all night working. It's time for me to "hit the hay" as we say here in the States. Thanks for your response and I will definitely post and let you know what I encounter when I try the current incarnation of the debugger. Like I've said previously, I know that what MQ is doing here is not trivial. I'll be happy to help in any way that I can.
Have a great weekend, angevoyageur.
You are welcome. Let me know any problem you can encounter while using the debugger. I will help if I can, as it works very well for me.
If you are keeping your file outside MT4 data folder it's effectively better to keep all in one file and then copy it on the right folder when debugging.
Hey, angevoyageur
This might deserve a thread of its own but here goes - when I start the debugger I really need to have the chart that it brings up set to my specs. I have an indicator that I've already finished as well as a couple of other things that I want on the chart. In addition, I need the chart to be set to certain specs, such as displaying candlesticks, zoomed in to a certain point, etc. I need to have that so that I can focus on the start of the indicator I'm developing and watch what it does. As things stand, either execution has blasted by me and done things that I've missed, thereby invalidating my test run or if I try to set things up everything locks up and I end up having to use the Task Manager to close out and try again.
The price graph that the debug window brings up runs completely off the right hand side of the chart which results in trade indicators being displayed that I can't see. As a result, I don't know what just happened or why. The MQL5 documentation says that there is a debug.tpl file in the profile/templates folder which, I assume, would allow you to set this kind of thing up so that your debug window would be configured in the way you need it to be. My MT4 installation doesn't have such a folder and creating one and saving a template file in it didn't work. I didn't think it would but I tried it anyway.
Is there a solution for this that I'm simply not finding or does the the current version of MQL4 simply not have this functionality? Another thing that would be really nice would be to have a tooltip popup that would give you the value of a variable on mouseover.
I don't mean to be a pain but you did say if I found anything ... :-)
Hey, angevoyageur
This might deserve a thread of its own but here goes - when I start the debugger I really need to have the chart that it brings up set to my specs. I have an indicator that I've already finished as well as a couple of other things that I want on the chart. In addition, I need the chart to be set to certain specs, such as displaying candlesticks, zoomed in to a certain point, etc. I need to have that so that I can focus on the start of the indicator I'm developing and watch what it does. As things stand, either execution has blasted by me and done things that I've missed, thereby invalidating my test run or if I try to set things up everything locks up and I end up having to use the Task Manager to close out and try again.
The price graph that the debug window brings up runs completely off the right hand side of the chart which results in trade indicators being displayed that I can't see. As a result, I don't know what just happened or why. The MQL5 documentation says that there is a debug.tpl file in the profile/templates folder which, I assume, would allow you to set this kind of thing up so that your debug window would be configured in the way you need it to be. My MT4 installation doesn't have such a folder and creating one and saving a template file in it didn't work. I didn't think it would but I tried it anyway.
Is there a solution for this that I'm simply not finding or does the the current version of MQL4 simply not have this functionality? Another thing that would be really nice would be to have a tooltip popup that would give you the value of a variable on mouseover.
I don't mean to be a pain but you did say if I found anything ... :-)
Ah ah. You don't read the help file, it's all there. In MetaEditor, Help menu, Help topics, search for "Debugging".
You have to set the debugger options for Symbol/Timeframe you need to run. You can use a debug.tpl template to set the chart as you want.
I did read the Help file. That's where I got the info I quoted. In addition, the debugger options for the Symbol and time frame are set to where I want them. This is what the documentation says and, as far as I can find, all it says on the matter.
Like I said, the MT4 installation doesn't have this directory, so I created it, set up a chart the way I wanted and saved it there as debug.tpl. Here is what it should look like:
A
As you can see, I have an EA and two indicators on the chart. All the Moving Average stuff in the main window is the indie I'm working on. The one at the bottom of the chart is one I've already created. This is what I saved as debug.tpl. The debugger doesn't use it. It pops up a chart window and the properties dialog for my MA indicator and displays the indicator on main window. The window is zoomed way out and the price is displayed as bars. I can set everything up manually but that means having to set it all up each time I do a debug run and also it's very likely that I'm going to miss something because code execution has triggered while I'm setting the chart back up.
Like I said, it seems as though this functionality is not implemented in MQL4
Hi Jeff,
while you are sitting at a breakpoint in a debugger, the IDE seems to be stopped (not quite sure about EAs and scripts, but I believe indicators are). So the indicators in the template should not interfere.
Do not bother with physical location of the template file. Use rightclick on the chart you want to use as a template for debug:
As you can see, I have several templates for debugging already saved, so I usually choose load e.g. Debug-1, then Save template and overwrite the Debug.tpl
I saw you crying for help earlier, but you asked explicitly the moderator, so I had been waiting for his qualified answer.