Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Facebook !
Rejoignez notre page de fans
Un script intéressant ?
Poster un lien vers celui-ci -
laisser les autres l'évaluer
Vous avez aimé le script ? Essayez-le dans le terminal MetaTrader 5
Bibliothèque

Time in microseconds (µs) since 01/01/1970 - bibliothèque pour MetaTrader 5

Vues:
3310
Note:
(40)
Publié:
2021.07.27 23:41
Mise à jour:
2021.07.28 02:21
\MQL5\Include\
TimeUs.mqh (2.61 KB) afficher
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

Simple class for getting the number of microseconds (µs) elapsed since January 1, 1970.
The error of this method is about 0.5 milliseconds. This is due to the temporal discreteness of updating the TimeLocal() function.

At the very beginning of your program (script, indicator or advisor), you need to create an instance of the class:

#include <TimeUs.mqh>

CTimeμs t;

There are three methods in this class, the names of which explain their purpose:

ulong GetTimeLocal();
ulong GetTimeTradeServer();
ulong GetTimeGMT();

A test script demonstrating the work of this class is provided:

#include <TimeUs.mqh>

CTimeμs t;

void OnStart() {
   while(!IsStopped()) {
      Comment("Local   - "       + string(t.GetTimeLocal()) +
              " µs\nGMT   - "    + string(t.GetTimeGMT()) +
              " µs\nServer - "   + string(t.GetTimeTradeServer()) + " µs");
   }
   Comment("");
}
//+------------------------------------------------------------------+


    Heikin Ashi Engulfing Heikin Ashi Engulfing

    & moving average , two rsi filters.

    AO n Stochastic AO n Stochastic

    awesome oscillator, stochastic filter. expert

    The Fisher Stochastic Center Of Gravity The Fisher Stochastic Center Of Gravity

    "The Fisher Stochastic Center Of Gravity" was created by John Ehlers (УCybernetic Analysis For Stocks And FuturesФ , pg.95)

    Price Line Price Line

    Shows Last Price, Daily percentage change and Time based on Input selection to the Price Line