Voir comment télécharger gratuitement des robots de trading
Retrouvez-nous sur Twitter !
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
Scripts

Server Clock Check - script pour MetaTrader 5

Amul Ravikumar
Amul Ravikumar
  • Founder · MT5 / Full-stack Developer à  Brain Grain
  • Inde
  • 1032
5 (1)
MT5 / MQL5 developer. I build indicators, Expert Advisors and utility panels from a written spec — every rule an input, 0 errors / 0 warnings, verified in the Strategy Tester before handover.
Vues:
86
Note:
(1)
Publié:
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

MetaTrader computes TimeTradeServer() and TimeLocal() from your computer's clock. If that clock drifts, every time-based rule in your EA drifts with it: pending orders with an expiry time expire early or late, session and news filters open and close at the wrong moment, and "close before the weekend" fires at the wrong second. The terminal shows no warning.


I hit this on a live VPS: the Windows time service had stopped, the clock was 11 seconds slow, and limit orders meant to live 15 seconds were expiring after 4.

This script measures the error directly. Each live tick carries the time the server stamped it with, to the millisecond. The script compares that stamp with your own clock at the moment the tick arrives, over 40 fresh ticks, and takes the smallest gap (a tick can never arrive before it was stamped), corrected by half the current ping.

Run it on an active symbol while the market is open. It prints to the Experts log and on the chart:
- OK, or WARNING with how many seconds your clock is AHEAD of or BEHIND the server
- smallest and median lag, ping, and the server's time zone
- on a warning, the Windows steps to fix it

Inputs: symbol (empty = chart symbol) · number of ticks · timeout · warning threshold in seconds.

It never opens, closes or modifies a trade. No DLLs.

Accuracy is about ±0.2 s, which is plenty to catch the multi-second drift that breaks order expiry. On a quiet symbol or a closed market it says so instead of guessing.

Multi-Indicator Divergence Detector Multi-Indicator Divergence Detector

Regular and hidden divergences between price and ten oscillators calculated inside the indicator: MACD, MACD histogram, RSI, Stochastic, CCI, Momentum, OBV, VWMACD, Chaikin Money Flow and MFI. Lines on price, a box naming every oscillator that agrees, and alerts.

Session Levels - Asian range, PDH/PDL, VWAP, swings and round numbers Session Levels - Asian range, PDH/PDL, VWAP, swings and round numbers

Session Levels draws the reference levels intraday traders watch most: Asian range, London and New York sessions, previous day and week high/low, daily VWAP, swing points and round numbers. Hover any level to read what it is and why it matters. Optional alerts when price breaks the Asian range or the previous day high/low.

Prop Daily Loss Meter Prop Daily Loss Meter

Shows how much of the daily loss limit of a prop firm account is already used, and how much is left. Read-only indicator.

MACD Signals MACD Signals

Indicator edition for new platform.