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
A) Don't bother using MT4 as a real time clock. It's a bit like getting a dog to walk on its hind legs - interesting to see it done, but doesn't actually achieve much.
B) Why so critical to process each second? If nothing much is happening with ticks, then nothing much is happening to prices.
(each comment worth 1 cent)
A) Why shouldn't we! Is just either pc or server time; I guess we can get info accurately.
B) Why is it critical ... let me see- high frequency trading - not based on asynchronous information where tick-by-tick is ! that should be a valid reason I guess.
I am still waiting for my 2 cents.
MQL4 Reference : https://docs.mql4.com/runtime/start : "Scripts and experts work in their own thread. Custom indicators work in the main interface thread."
So your indicator displays time on the Interface of the user in the GUI ? real time / second by second.
To work "second by second" we use "Sleep()" function.
To do this, we measure run time of main routine.
For example, let run time will be stored in variable "int Runtime;", and let "RunTime < 1000".
Then we invoke "Sleep (1000 - RunTime) ;" to make sure that next run will take place in 1000 ms, with given precision of course.
But.
MQL4 Reference : https://docs.mql4.com/common/Sleep : "The Sleep() function cannot be called from custom indicators since they calculate in the interface thread and may not decelerate it."
Simple solution:
Include the calculations in your EA and your are fine.
Pros:
No need to call icustom
No indicator
Cons:
No Indicator. But for high-freq trading you *must* use an EA because humans are to slow.
"High-frequency" and "low-latency" are slightly differ.
And, visualisations often used for analysis or for monitoring, not only for trading.
"High-frequency" and "low-latency" are slightly differ.
And, visualisations often used for analysis or for monitoring, not only for trading.
If you really need monitoring you can rebuild the indictor behavior with lines. Sure high performance is something different.
What if we want to analyse and monitor events on time intervals basis?
For example, every 1 second.
What if we want to analyse and monitor events on time intervals basis?
For example, every 1 second.
As soon as you talk about tick-by-tick you mean ultra high frequency ....
'Analysis of ultra-high-frequency financial data using advanced Fourier transforms' (2009) Finance Research Letters Vol 6, pp 47-53 (with I.Giampaoli and W.L.Ng)
Sampling in predefined intervals can be defined as high-frequency sampling where T<t
easily re-codable to an EA to use the proper sleep function. Already did this.
Nice program . TimeCurrent() is the tick-by-tick price we need to get the computer price!
Maybe we can build a synthetic clock though from example:
if(Time[0]!=t.r){
t.r=Time[0];
redraw();
give us a hint! zzuegg :)