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
Scripts

SessionEdgeTester - does a time-of-day rule beat spread and swap? - script pour MetaTrader 5

PROSPRA IQ ENTERPRISES (PTY) LTD
PROSPRA IQ ENTERPRISES (PTY) LTD
  • Founder, MQL5 developer and strategy tester à  PROSPRA IQ ENTERPRISES (PTY) LTD
  • Afrique du Sud
  • 335
MQL5 developer and strategy tester, South Africa (Prospra IQ Enterprises). I build Expert Advisors, indicators, trade managers and prop-firm risk guards for MetaTrader 5 and 4, and convert MT4 code to MT5.
Vues:
45
Publié:
MQL5 Freelance Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance

Does "buy at 18:00 New York, sell 9 hours later" really make money on your broker after costs? SessionEdgeTester answers that in about 20 seconds from your terminal's own H1 history. It places no trades.Gold: 9-hour hold from every entry hour

What it does

  • Buys (or sells) on the chosen weekdays at a fixed entry hour and exits a fixed number of hours later.
  • Each trade pays the larger of 1.5x the live spread and the spread recorded on the entry bar, plus optional commission, plus the live swap for every server midnight crossed (triple on the rollover day).
  • The entry time can be written in server, New York or London time. Daylight saving is handled, so the rule stays on the same clock hour all year, on GMT brokers and on New York-close (GMT+2/+3) brokers.
  • Optional stop-loss in %, checked on H1 highs/lows.

The report

  • All trades, the first 60% vs the last 40% of history (an honest out-of-sample check) and a PASS / WATCH / FAIL verdict.
  • Result before swap, by weekday and by year.
  • Baseline: the same hold started at every other hour. If most hours do as well, your "edge" is the market's drift, not your timing.

Example (Deriv XAUUSD, 2011-2026, buy 18:00 New York, hold 9 h, Mon-Thu, 2,489 trades): +2.74 bp per trade after costs, t 2.86; last 40% +5.49 bp, t 3.57; 0 of the 23 other entry hours did as well. The first 60% was flat (+0.07 bp), so the effect is recent, and the report shows you that too.

Inputs

Sym - symbol ("" = chart symbol)

GoLong - true = buy, false = sell

Clock - server, New York or London time

EntryHour, HoldHours, Weekdays (0=Sun..6=Sat)

StopPct - stop-loss in %, 0 = none

ServerClock - fixed offset (now), NY+7 (New York-close brokers) or GMT

SpreadMult, ExtraCostPct (commission in %), From, ISShare, OutFile

Output: Experts tab and MQL5\Files\SessionEdgeTester.txt

Research tool. Past results do not guarantee future results.

BotWatchdog - phone alerts when your EAs silently stop working BotWatchdog - phone alerts when your EAs silently stop working

Push notifications when the connection drops, algo trading is switched off, an EA leaves its chart, the account changes, a position has no stop, equity or margin hit a limit - plus a daily heartbeat.

SpreadClock - your broker's spread by hour and weekday from real ticks SpreadClock - your broker's spread by hour and weekday from real ticks

Reads real tick history and reports average, median and 95th-percentile spread for every server hour and weekday, plus the cost in % of price.

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

MACD Signals MACD Signals

Indicator edition for new platform.