Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1104
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
Hello!
Can you please tell me,
How do I make the OnTick() function execute a print only once(when a series of conditions occurs) and not execute it on subsequent ticks?
Hello!
Can you please tell me,
How to make the OnTick() function execute a print only once, and not execute it on next ticks?
use static modifier for the flag to be reset when you have printed it once, or define this flag globally and reset it when you have printed the print once
Use a static modifier for a flag that resets when you print once, or globally describe this flag and reset it when you print once
Thank you very much for your reply.
Sorry, what if we complicate things and allow only one Print for the current timeframe bar? And after creating a new bar you can print again?
Thank you very much for the reply.
Sorry, what if we complicate things and allow only one Print for the current bar of the current timeframe? And after creating a new bar, you would be able to print again?
Search the forum"new bar" or "new bar" to find how to control the new bar and if there is a new bar, you will print your print - these examples of new bar at every step here
search the forum for"new bar" or "new bar" to find how to control a new bar and if there is a new bar you will display your print - these examples of a new bar are at every turn here
Thank you!
Greetings.
Doing an indicator, at some point it causes a hang. I don't have time to print the last one to understand where it hangs.
Can you tell me if there's any way to prescribe a pause, or prioritise printing to a journal, or some other solution.
Greetings.
Doing an indicator, at some point it causes a hang. I don't have time to print the last one to understand where it hangs.
Can you please tell me if there is any way to prescribe a pause, or make printing to the journal a priority, or another solution.
there is no way, just learn to use debugger - it used to be worse, there was no debugger, now there is everything
set a breakpoint and then track your cycles, usually if the indicator hangs, it means you got caught in an infinite loop somewhere
there is no way, just learn to use a debugger - it used to be worse, there was just no debugger, now there is everything
If usually, if the indicator hangs, it means that you have hit an infinite loop somewhere.
Isn't there a DebugBreak() in mql4?
Doesn't DebugBreak() exist in mql4?
ME is the same now.
what difference does it make in ME to put a breakpoint or use DebugBreak()? - I think the result is the same.