You're welcome, I tried my best for you. :)
I plan to maintain and try to expand the functionality in this system. If there will be a need in something, then write.
-----
For full clarity I think it is necessary to say about two more purely technical points.
1. In the Trace.mqh file a single instance of the tracer is created (at the bottom of the file).
extern CTraceCtrl* m_trace; // a single instance of the tracer
Thanks to the extern directive, the instance will be only one. That is, it doesn't depend on how many #include "Trace.mqh" files are included in the #include "Trace.mqh" file
2. CTraceView class is used in CTraceCtrl only for one single reason - to work out the CTraceCtrl::Break function.
Namely to have a reaction to user clicks in a looped while (true)
Added __PATH__ macro processing (build 420), in connection with which all classes are updated.
The button to open a node file has been added to the INFO window.
Opening is performed by ShellExecute command, so DLL import permission is required for classes to work
added functionality for adding node description.
now in _IN macros it is possible to add an additional description, for example, to display conditions for entering a node or some relevant information.
This description is dynamically updated in the tree display.
Code example:
void OnTick() { _IN(""); static datetime limit_time=0; // last trade processing time + timeout //--- don't process if timeout if(TimeCurrent()>=limit_time) { _IN2(TimeCurrent()+">="+limit_time); //--- check for data if(Bars(Symbol(),Period())>2*InpMATrendPeriod) { _IN3(Bars(Symbol(),Period())>2*InpMATrendPeriod); //--- change limit time by timeout in seconds if processed if(ExtExpert.Processing()) limit_time=TimeCurrent()+ExtTimeOut; } } //--- }
An example of how the information will look like
Button to activate the description display - top right "i"
1. Added a separate CPropertyView class for displaying node properties.
2. All overridden functions of classes are made as virtual, so all classes are updated.
3. Added two new properties to the CNode class.
m_edit - sign of the editable field in CPropertyView
m_brkuse - number of calls to the node, at which the CTraceCtrl::Break function is stopped and called. 3.
3. According to Urain's notes on the forum, two possibilities of using code stops were added.
- enable/disable stops (red button D)
- stop by specified number of node invocation
а. Setting the initial number m_brkuse in the node can be done using a macro (in the Trace file)
#define _BRKUSES(u) if (!NIL(m_trace)) if (!NIL(m_trace.m_cur)) ........
b. Or directly in the node properties window in the"DebugBreak after" field, which specifies the required number of calls before stopping
CHARTEVENT_CLICK
CHARTEVENT_KEYDOWN
CHARTEVENT_OBJECT_DELETE
CHARTEVENT_OBJECT_CHANGE
CHARTEVENT_OBJECT_CREATE
5. Minor cosmetic changes in tree mapping
Is there any way to use this mechanism in scripts?
I think so. But usually in scripts the code is not branched much (unless of course the script is in a loop).
Besides, there is an inconvenience - OnChartEvent event is not handled in scripts.
I think so. But usually in scripts the code is not branched much (unless of course the script is in a loop).
Besides, there is an inconvenience - scripts don't handle OnChartEvent event.
And if my script uses many different classes, class hierarchies?
I think it is necessary to sharpen the tool for scripts as well...
CTraceView class doesn't care who calls it. It will make a tree and display it.
But scripts have an unsolvable feedback problem. You will not be able to actively work with the tree.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Tracing, Debugging and Structural Analysis of Source Code is published:
Author: Alex Sergeev