'Single Step' / Error Tracer a VERY useful feature for the MetaEditor

 

Hi,

My significant programming experience to date is limited to a very narrow vertical market: CNC Machining (Computer Numerical Controlled). In this environment there is ZERO room for error. Such things might cause serious injuries and even death; as well as literally millions of dollars worth of damage can happen in less than a blink of an eye. Thus ALL CNC machining computers have a number of features built into them to allow for temporary modifications in how the program runs before it is put into full production.  One such feature is the ‘Single Step’ capacity whereby the set up personnel can step through the code one line, or even one command at a time, along with control over various rates of movement etc, including the ability to make a ‘virtual’ run. These are all immensely helpful for identifying and finding problems and resolving them before they cause catastrophe. Even just the addition of a ‘single block’ (1 line of code) capability with the outcome of that line illustrated &/or documented would be a significant feature to help all MQL programmers, including very experienced ones and very much more so for beginners like me in finding errors and debugging new code much quicker and the end results tend to be a better program.

The first ‘computer animated’ movie was called ‘TRON’ (two thumbs down) which was the command in BASIC to turn the ‘Tracer On’ for just such purposes.  Please give this careful consideration and implement it.

Thanks,

  Doug


Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types - Documentation on MQL5
 
DougRH4x :

Hi,

My significant programming experience to date is limited to a very narrow vertical market: CNC Machining (Computer Numerical Controlled). In this environment there is ZERO room for error. Such things might cause serious injuries and even death; as well as literally millions of dollars worth of damage can happen in less than a blink of an eye. Thus ALL CNC machining computers have a number of features built into them to allow for temporary modifications in how the program runs before it is put into full production.  One such feature is the ‘Single Step’ capacity whereby the set up personnel can step through the code one line, or even one command at a time, along with control over various rates of movement etc, including the ability to make a ‘virtual’ run. These are all immensely helpful for identifying and finding problems and resolving them before they cause catastrophe. Even just the addition of a ‘single block’ (1 line of code) capability with the outcome of that line illustrated &/or documented would be a significant feature to help all MQL programmers, including very experienced ones and very much more so for beginners like me in finding errors and debugging new code much quicker and the end results tend to be a better program.

The first ‘computer animated’ movie was called ‘TRON’ (two thumbs down) which was the command in BASIC to turn the ‘Tracer On’ for just such purposes.  Please give this careful consideration and implement it.

Thanks,

  Doug



I think you'll find that the debug mode in Metaeditor will allow you to do what you want (although I think it does not work in indicators).  F10 = single step, and the watch window will display current values of expressions.
 
phampton :


I think you'll find that the debug mode in Metaeditor will allow you to do what you want (although I think it does not work in indicators).  F10 = single step, and the watch window will display current values of expressions.

Hi pHamton,

Are you referring to MQL4 or MQL5 ? 

Either way, thanks for the info. 

 
DougRH4x :

Hi pHamton,

Are you referring to MQL4 or MQL5 ? 

Either way, thanks for the info. 


This is a new feature in MT5 which promises to allow the development of far more complex codesets than was ever possible in MT4.  The debugging feature is easily seen on the Metaeditor 5 toolbar

 


For documentation, bring bring up the Metaeditor 5 help and look for Creating Programs.

 

 

 

  

 

 
phampton :


This is a new feature in MT5 which promises to allow the development of far more complex codesets than was ever possible in MT4.  The debugging feature is easily seen on the Metaeditor 5 toolbar

 


For documentation, bring bring up the Metaeditor 5 help and look for Creating Programs.

Thanks again,

Though I'm strictly in MQL4 at this point in time.

Tis a pity that the capability won't be extended to indicators and scripts as it would most definitely be a benefit in coding those as well. 

 
DougRH4x :

Thanks again,

Though I'm strictly in MQL4 at this point in time.

Tis a pity that the capability won't be extended to indicators and scripts as it would most definitely be a benefit in coding those as well. 


Just indicators. Scripts should be good to go.
 

I certainly hope that they put an excellent tracer into MQL5.  It IS IMMENSELY helpful.

To leave one out when MQ is building entirely new apps where they have the opportunity to easily incorporate one would be a real shame.

FYI: Even a early version of Basic of about 30 years had one. They ARE well worth the effort to include this.  The Commands were TrOff and TrOn which is self explanatory: Trace On/Off.  A historical point of interest: The very first completely computer generated and animated movie that was made by the Walt Disney Studios was called 'TRON' utilizing this command. It was VERY Lame!

Reason: