-
No way to limit
-
Fix your code.
-
EAs : Don't do per tick what you can do per bar, or on open.
If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts, and you recalculate.)
If you are waiting for an order to close, only look when OrdersTotal (or MT5 equivalent) has changed.
How to get backtesting faster ? - MT4 - MQL4 programming forum (2017) -
Indicators: Code it properly so it only recomputes bar zero (after the initial run).
How to do your lookbacks correctly. (2016)
3 Methods of Indicators Acceleration by the Example of the Linear Regression - MQL5 Articles. (2011)
Or, reduce Tools → Options (control+O) → Charts → Max bars in chart to something reasonable (like 1K.)
-
-
No way to limit
-
Fix your code.
-
EAs : Don't do per tick what you can do per bar, or on open.
If you are waiting for a level, don't reevaluate, wait until price reaches it (or a new bar starts, and you recalculate.)
If you are waiting for an order to close, only look when OrdersTotal (or MT5 equivalent) has changed.
How to get backtesting faster ? - MT4 - MQL4 programming forum (2017) -
Indicators: Code it properly so it only recomputes bar zero (after the initial run).
How to do your lookbacks correctly. (2016)
3 Methods of Indicators Acceleration by the Example of the Linear Regression - MQL5 Articles. (2011)
Or, reduce Tools → Options (control+O) → Charts → Max bars in chart to something reasonable (like 1K.)
-
The problem with MT4/MT5 is that this issue arises even if you don't attach any EA to the chart, once you open +10 terminals with naked charts at the same setup, you start having problems.
If you are waiting for an order to close, only look when OrdersTotal (or MT5 equivalent) has changed.
Let's say I need to reevaluate with every tick waiting for a signal that gets written from the master terminal to a txt file, how can I do this without the OnTick() method?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone,
As you know, OnTick() method will get triggered with any new tick gets pushed from the market. Sometimes, there will be only one tick a second, sometimes it can get as high as hundred. This becomes a problem when running multiple terminals on the same computer. Is there any way to limit the number of ticks received?
Say we put a limit of maximum 1 tick per 100 millisecond, any new ticks comes before the 100 millisecond elapses will be ignored.
Would appreciate any practical workarounds for this issue.