Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What does the "BacktestingLockTicks" EA option do? #237

Closed
eabase opened this issue Nov 26, 2020 · 2 comments
Closed

What does the "BacktestingLockTicks" EA option do? #237

eabase opened this issue Nov 26, 2020 · 2 comments
Labels

Comments

@eabase
Copy link
Contributor

eabase commented Nov 26, 2020

^^ that.

@vdemydiuk
Copy link
Owner

vdemydiuk commented Nov 27, 2020

MtApi has aync mode of sending events (tick, candle) from MQL (terminal) side to clients.
For example, MtApi expert (MQL side) received new tick and it does not wait after sending the tick to the clients. So if you are using backtesting the expert receives big count of ticks in short time and sends it to clients side. Client side will perform tick and will try to send command (open order) to terminal but price will be out of date.
I have added parameter BacktestingLockTicks to avoid this effect: for MT4 it was implemented for candle events only, for MT5 it has two modes for locking tick's events and locking candle's events. If lock is enable then MtApi expert is waiting after sending event until it will receive command UnlockTicks from client side.
For MT4 version I have created ticket #226 and I will update MtApi with lock of ticks soon (will be same as MT5 version).

The lock of events is working for backtesting mode only.

@eabase
Copy link
Contributor Author

eabase commented Nov 29, 2020

Perfect answer. Thank you.

@eabase eabase closed this as completed Nov 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants