Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 130
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
Please tell me what this warning means:
Declaration of 'm_data' hides member declaration in file 'ArrayObj.mqh' at line 16 ZigZag_rev_4.mqh 27 32
Please tell me what this warning means:
Declaration of 'm_data' hides member declaration in file 'ArrayObj.mqh' at line 16 ZigZag_rev_4.mqh 27 32
it means you are redeclaring a new variable (the same one)
Same variables declared globally, if I'm not mistaken.
Thanks, I take it the new compiler doesn't allow this anymore?
It does. This is not an error. But the compiler warns that there may be problems and program errors that are hard to detect.
A word of advice for a beginner. There is such a thing in the indicator:OnCalculate(...).
Question: Can I generate a custom event to triggerOnCalculate(...) and immediately re-calculate the indicator? Objective: not to wait for the tick to come
A word of advice for a beginner. There is such a thing in the indicator:OnCalculate(...).
Question: Can I generate a custom event to triggerOnCalculate(...) and immediately re-calculate the indicator? Objective: not to wait for the tick to come
Please: either by timer, or send your own event. And implement logic OnCalculate() in the appropriate handlers when the event occurs.
I can't touch it withOnCalculate(...) event, I can touch any function, but I can't touch this one. The timer is not an option, the indicator is needed not so often, and it would be better to use it with a click on a graphic item.
How to implement it?
Can you please tell me how to correctly look for the most resource-intensive places in the code that load the CPU?
I can't touch it withOnCalculate(...) event, I can touch any function, but I can't touch this one. The timer is not an option, the indicator is needed not so often, and it would be better to use it with a click on a graphic item.
How to implement it?
Well, inOnCalculate(...) itself we track the button
if it is pressed - do the calculations, if it is not pressed - exit
at the end of calculation, press .................OBJPROP_STATE,false);