Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1393
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Igor Makanu, MakarFX, which one of you is right? Let's try to find the description and find out. Saw it once but can't find it all day long.
i am right
Check it yourself, it's not difficult - Expert Advisor in which there is a timer, in the timer there is a loop, say, for 100 000 iterations and in the loop body Sleep(1), we get 100 seconds, in OnTick() write Print("Tick")
and the second Expert Advisor on the second chart with Print(" Tick") in OnTick()
The first expert will be silent for 100 seconds, and it is not certain that it will have time to write in the log at the arrival of a new tick - if the timer is started again
Or search the forum - my search has the same effect as yours.
Another tip: if there is more than one EA in the terminal, in what order will they process ticks, if their processing takes longer than pause between ticks?
not in any order
Each EA is working in its own thread, i.e. they all work in parallel, don't depend on each other and receive messages from the terminal simultaneously
https://docs.mql4.com/ru/runtime/running
" The programme only receives events from the schedule on which it is running. All events are processed one after the other in the order they are received. If there is already an eventOnTimer() or OnTick() during a complex calculation, it will be skipped " - it will only be skipped if it is the same event.
If there are options on how to implement the priority of calculations over visuals, I'm really looking forward to it.
correct me if i'm wrong.
If there are variants how to implement calculation priority over visual design, I'm looking forward to it.
Use the standard scheme for various trading panels - process mouse messages in OnChartEvent(), and in OnTick() work upon the arrival of a tick.
If you use super heavy calculations inOnTick() - try to output them into the indicator
If you need a timer, callOnTick() after the exit from the timer
ZZY: MT4 is working very fast now, you should try to skip ticks ))))
Andrey Sokolov:
If there are options on how to implement the priority of calculations over visuals, I'm very much looking forward to it.
Correct me if I'm wrong.
I have a lot calculation taking into account the spread and limiting its expansion. There have been some trade openings with limits violated.
After I put OnTimer() before OnTick() and ran EventSetMillisecondTimer(100) no errors yet.
I'm not a programmer...all by gut feeling)))
https://docs.mql4.com/ru/runtime/running
" The programme only receives events from the schedule on which it is running. All events are processed one after the other in the order they are received. If there is already an eventOnTimer() or OnTick() during a complex calculation, it will be skipped " - it will only be skipped if it is the same event.
If there are options on how to implement the priority of calculations over visuals, I'm really looking forward to it.
correct me if I'm wrong.
The rules are clear. If you need every tick, you can get them from a third-party indicator, write them in an array and then, after the calculation, drag the array and compare it. It's not even a question of the execution time of trades.
Either the task is not completely understood.
Good afternoon everyone. I'm improving my Grail machine ;-) and I understand that there is only one support for deals right now - trawl by parabolic. It's unrealistically low((((( Who has the fractal trawl function? Please share the code. If i have a close order function by reversed stochastic signal. If i have a Buy order, there is a profit and when stochastic comes out of its overbought zone, the order is closed if there is a profit on it.) If you want to share this code with us, please don't hesitate to do it...
Share the code fraternally please, don't be a bummer. ..
You've got a strange way of talking...
Look in CodeBase.
You have a strange way of speaking...
Look in CodeBase
I can't search there because of my visual impairment :-( That's why I'm asking for help...
https://www.mql5.com/ru/code/28975
https://www.mql5.com/ru/code/28975