Best way to make action only once
Buba Akhrakhadze: has anyone knows better way to make action only once?
- Time has a resolution of one second. So your condition plus time is valid for all ticks withing a second.
-
You are looking at a signal. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - MQL5 programming forum #1 2017.12.12
You could use GetTickCount64() as a serial number for your actions next to the timestamp.
This gives you a resolution of 1 ms.
And if that is not enough, use GetMicrosecondcount().
That's a microsecond resolution.
Hi, I used timestamp to make action only once before, but I noticed that it isn't that accurate and when action happens more than 2-3 times per second it happens 2-3 times too I mean tick change per second. Below is my code that I used before:
has anyone knows better way to make action only once?