Does MQL4 have a ''program' tracer' / Reverse Engineering capacity?

 

Some programming languages have the capacity to run through the program one step &/or line at a time and see the procession and the results of it. Some allow the user to choose which way they want to go at conditional logic decision branches to follow through the various logic routes. As well as being a great help in writing, troubleshooting and debugging programs it would significantly help me & other KnewBees with the learning curve for MQL4. It is a great aid for understanding what existing programs are doing and make it so that one can see the result of the code and learn from it. Likewise it allows for reverse engineering a program and mapping out a flow chart from an existing program as opposed to mapping the flow chart first and then constructing the program from it.

It's likely that right about the time I am reasonably competent with MQL4 it will be phased out. LoL. That's computer/ progress for you (< 8)

Thanks again to one and all for any assistance with this.

 

The answer to the question, as I'm sure you've gathered, is no. MQL4 doesn't have a debugging facility. Having said that, in all the EAs I've written, I've never needed anything more than the capability to use Print() to check program flow and variables content.

There are tools and online services for reverse-engineering code. As a professional programmer who is careful about source code backup and version control, I've never had a legitimate need to use a decompiler. Therefore, I have no time for decompilers, or anyone who uses them.

Don't hold your breath on MQL4's demise. As version uplifts go, my feel is that this one will be a very protracted parallel run.


CB

 

Hi Cloud Breaker,

.

The answer to the question, as I'm sure you've gathered, is no. MQL4 doesn't have a debugging facility. Having said that, in all the EAs I've written, I've never needed anything more than the capability to use Print() to check program flow and variables content.

You get program pauses at the null Print command?

If so, the programs continues on again after you hit the ‘Enter’ key?

.

There are tools and online services for reverse-engineering code. As a professional programmer who is careful about source code backup and version control, I've never had a legitimate need to use a decompiler. Therefore, I have no time for decompilers, or anyone who uses them.

I’m not looking to decompile and steal anyone’s properties. The things I mentioned above are to assist in the learning and troubleshooting programs as well as to help learn and understand what an existing MQ4 program is doing.

It’s unbelievably lame, even CP/M (Control Program for MicroComputers) from over 30 years ago, which was the DOS that Bill Gates put a small security deposit on to hold it for him to buy it outright until such time that he got the contract to license the OS to IBM for their new ‘PC’ and the rest as they say is history; had a Debugger, TRON (Tracer On) to go through the BASIC programming that came with it one step/line at a time, as did there BATCH programming language that came with the OS for controlling programming, manipulation and (inter) actions primarily of the DOS commands. The ONLY thing that was changed after Bill Gates brought it and started licensing CP/M for PCs was that the command prompt said MSDOS instead of CP/M and they added one command. As you are likely aware, BASIC (at least at that point in time) was not a ‘structured program' in that it had a 'GoTo' commands, which could very useful. Though as I’m sure you are aware of, it most definitely had its downside. I once wrote a little 4 line program in this BASIC that had so many conditional GoTo commands and a LOT of permutations of ‘loops’ as a result of them, that I couldn’t figure out what it was doing after I made it even with the TrOn command. LoL. After a frustrating waste of time, I deleted it and started over using much more discretion in utilizing the GoTo command and making multiple conditional loops, within loops, with in… ad nauseum.

In most NC programming that I did and still (very rarely do completely manually) sometimes, they use line numbers and most have GoTo commands with a corresponding ‘return’ command. But I also a have a very sizable library of small specialty canned subroutines: both ones that come with the NC language as well as ones that I make myself and call them from the main program and then return control back over to the main program once they have finished their tasks. They also have the ability to pass information, variable (values), results etc back and forth between them. I have a couple of specialized editors that flag errors in real time as I code the programs and about a half dozen simulators on which to test and optimize them as much as is possible virtually before they ever get to a machine. Once they get on the machine, it has many multiple modes to control and a wide range of variable controls to test, optimize and qualify them before they start full capacity production.

.

Don't hold your breath on MQL4's demise. As version uplifts go, my feel is that this one will be a very protracted parallel run.

As you know I have nowhere near the baseline experience and knowledge of this market that you do, but I have the same sense of it as well. From what little I have learned about MQL5, I’m relieved that this will likely be the case, though the benefits of object orientated programming in these beastly programming languages is attractive and hopefully will serve to at least make it easier and better to produce good programs more readily.

.

So been up in the clouds at all lately?

I’ve never been in a helicopter or even a light airplane as of yet. But I imagine it must be a very enjoyable and liberating experience, at least until something goes wrong. To say that choppers don’t have much in the way of a ‘glide ratio’ is an understatement to say the least!

I remember years ago when they were having the ‘International Helicopter Olympics’ as part of the Paris air show I think it was. The pilot that took the Gold was a Russian military pilot and he had a maneuver where he came in at a high rate of forward speed at only about 50 feet (~ 19 Meters) above the ground and did a full 360 forward role in front of the judges and the spectators! Obviously he was VERY good, but that has to be pushing the ‘risk management’ to the edge of the envelope!

Jill Villeneuve, Jacques Villeneuve’s father, who was also an F1 driver, was a genuine ‘adrenaline junkie’, He flew helicopters as well and at times purposely took off on flights without having enough fuel on board to make the trip! Crazy!

.

Regards,

Doug

Reason: