Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 855

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
you can't complicate simple tasks! ... said Me, who idly wrapped the new bar definition function into a class ))))
to the point:
the idea is clear, but it's more correct >= in all likelihood
the idea is clear, only more correct >= in all likelihood
did not check, unprint the variables immediately see if by 1 error, then either your version, or do not zero, and assign values =1 to counters timer1 and timer2
as an option, you can try it that way too:
did not check, unpin the variables immediately see if by 1 error, then either your version or do not zero, and assign values =1 to counters timer1 and timer2
However, the method certainly doesn't guarantee a given periodicity. Execution of code in one timer may exceed the time of the other timer.
However, the method certainly does not guarantee a given periodicity. Code execution in one timer may exceed the time of another timer.
Where do you get a real-time timer guaranteed on Windows systems? - If the system is overloaded, there will be delays.
in MQL - if you overloaded OnTick() with complex calculations, then until it is executed the OnTimer() event will not happen.
i.e., even MT4 is enough for complex calculations, if not then MT5 - it really works at the level of C++, but the lack of performance is usually related to a bad calculation algorithm - use the profiler, don't do calculations every tick where there is nothing to calculate until a new bar appears, don't calculate the whole history, if you use signals on the last 1 to 3 bars - calculate only 100 bars ... there are many variants
HH: working with graphical objects slows down everything, working with strings also reduces performance - in theory, but lately I haven't noticed that, like working with time conversion functions - it's unambiguously seen in the profiler, where a lot of time is spent - we try to use this code fragment less often
and where can you be guaranteed to get a real-time timer on Windows systems? - if the system is overloaded, there will be delays
the same in MQL - if you have loaded complex calculations with OnTick() , then until it is executed the OnTimer() event will not happen.
i.e., even MT4 is enough for complex calculations, if not then MT5 - it really works at the level of C++, but the lack of performance is usually related to a bad calculation algorithm - use the profiler, don't do calculations every tick where there is nothing to calculate until a new bar appears, don't calculate the whole history, if you use signals on the last 1 to 3 bars - calculate only 100 bars ... there are many variants
HH: working with graphical objects slows down everything, working with strings also reduces performance - in theory, but lately I haven't noticed that, like working with time conversion functions is also a pain - clearly everything in the profiler is visible, where much time is spent - we try to use this part of the code less often
Agreed, standard timer also does not guarantee anything. Well thanks, we'll give it a try.
Good afternoon, dear friends!
Can you please tell me if it is possible in MKL4 to setthe opening of a position for one symbol at the time of opening a position for another symbol? Maybe such a question already discussed, then give me a link.
Thank you.
Good afternoon, dear friends!
Can you please tell me if it is possible in MKL4 to setthe opening of a position for one symbol at the time of opening a position for another symbol? Maybe such a question already discussed, then give me a link.
Thank you.
The question is not formulated completely.
That's great. How do I describe it in the code? For example, if conditions are correct and I open a Buy position in GBP at 9:00, I open a Buy position in EUR as well (at 9:00).
Great. How do I describe it in the code? For example, if conditions have developed at 9:00 and a BUY on the pound is opened, then a BUY on the euro is also opened (at 9:00).