try to add
RefreshRates();
ok, that works, but I wouldn't expect it and neither for Minutes() nor for RefrehRates() this effect is mentioned :(
Sorry it is mentioned for Minute(): ".. last known server time by the moment of the program start (this value will not change within the time of the program execution)."
I never would have expected this.

In an infinite loop, the trading environment does not update, it is necessary to do it yourself.
?? TimeCurrent() is updated Minute() not. Intuitively I would expect that Minute() is treated similar to TimeCurrent().
Yes indeed.
So this is a feature.
?? TimeCurrent() is updated Minute() not. Intuitively I would expect that Minute() is treated similar to TimeCurrent().
If researched, the update
speed Minute() or TimeCurrent(), much depends on the internet connection
speed between your Terminal and Server Broker.
When there is a delay, then Minute() or TimeCurrent() will jump to the time after delay.
If researched, the update
speed Minute() or TimeCurrent(), much depends on the internet connection
speed between your Terminal and Server Broker.
When there is a delay, then Minute() or TimeCurrent() will jump to the time after delay.
??
Both Minute() and TimeCurrent() are called in the same code line:
Comment("Starting Eieruhr.. ",TimeToString(TimeCurrent(),TIME_SECONDS)," m: ",(string)Minute()," => ",(string)(Minute() < 48));
There cannot be a difference between because of the internet speed!
But as this applies to Hour() and Seconds() as well (pls look in the editor's reference):
Seconds
Returns the amount of seconds elapsed from the beginning of the current minute of the last known server time by the moment of the program start.
int Seconds(); |
Returned value
The amount of seconds elapsed from the beginning of the current minute of the last known server time by the moment of the program start (this value will not change within the time of the program execution).
Note
At the testing, the last known server time is modelled.
Example:
if(Seconds()<=15) |
I would give this functions the Golden Banana because
- real time seems to be treated differently:
a) ... of the last known server time by the moment of the program start.
b) At the testing, the last known server time is modelled. - The name is totally misleading as not only me (I guess) assumes that a function with this name would return the seconds of the last known server time.
- Knowing the seconds the program was started is good for ...? I cannot imagine anything as we easily could save the complete start-time in OnInit() in seconds!
- Seconds() as a bit more ridiculous than Minutes() and Hour() - btw. in MT5 they don't exists.
Anyone with a different suggestion for the Golden Banana?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
This little script:
produces this:
Actually it show this: