Yes put it in OnMillisecondTimer() in stead of OnTick()
You dont want it in ontick but you also dont want it in ontimer ?
Whats left
Yes put it in OnMillisecondTimer() in stead of OnTick()
You dont want it in ontick but you also dont want it in ontimer ?
Whats left
Not a solution because if you set MillisecondTimer to 1ms code will get executed only around every 15ms which is not sufficient for my purpose.
Also it could probably cause quite some load if the code is executed all the time.
For example, there is a FIX to MT4 application that brings quotes to MT4 I think by using offline chart, but I don't know how to do that. Just an idea.
Also it could probably cause quite some load if the code is executed all the time.
For example, there is a FIX to MT4 application that brings quotes to MT4 I think by using offline chart, but I don't know how to do that. Just an idea.
Have a look at my SpreadTracker source code. It uses the technique (Windows Message Posting) you have just described: https://www.mql5.com/en/code/10983
- votes: 2
- 2013.09.20
- Fernando Carreiro
- www.mql5.com
Thanks a lot!
If the information is sent via Windows Message Posting from the (Java coded) program, how can I make MT4 execute code on this event (when windows message is posted)?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is there any way to execute a code on an external event instead of executing thre code on every tick? For example when a .txt file in MQL/Files folder gets refreshed.
The idea is to send information/quotes to MT4 by an external (e.g. Java coded) program. This (Java coded) program creates/refreshes a .txt file inside MQL/Files folder.
An MQL EA would read the information from the .txt file.
However if it would read the .txt file in OnTick() function, this would only happen on every MT4 tick.
I would like the code to get executed every time the (Java coded) program refreshes the .txt file.
Is there anyway to do this?
A "solution" by using MillisecondTimer to read every xx ms would not be an option for me.
Thank you very much in advance!