Skip to content
FXNook HubBeta

Alex / Time Based Entry EA for MT4

MetaTrader 4Expert AdvisorMITCompiled · build 2425
Compile logCompiled
MetaEditor build 2425 · MT4 · 1 Dec 2026, 10:23 UTCcompiling FXN_TimeEntry.mq4✓ Result: 0 errors, 0 warnings, 3.8 soutput FXN_TimeEntry.ex4 · 34 KBsha256 f0b4d93bda30f90a…657bd1d9

Files version 1.0

FileLinesSize
FXN_TimeEntry.mq449416 KB
FXN_TimeEntry.ex4 compiled by the Lab–34 KB
FXN_TimeEntry.mq4494 lines
//+------------------------------------------------------------------+//| FXN_TimeEntry.mq4                                                 |//| FXNook Lab Hub starter library - MIT licence                       |//| https://lab.fxnook.com/hub                                         |//+------------------------------------------------------------------+#property copyright "FXNook Lab (MIT licence)"#property link      "https://lab.fxnook.com/hub"#property version   "1.00"#property description "Time entry EA: opens one trade a day at a set server time, fixed direction or by the previous candle or an EMA, fixed or ATR stop and target, closes at a set time."#property strictenum ENUM_FXN_LOTS  {   FXN_LOTS_FIXED = 0, // Fixed lot   FXN_LOTS_RISK  = 1  // Risk % of balance  };enum ENUM_FXN_DIR  {   FXN_DIR_BUY         = 0, // Always buy   FXN_DIR_SELL        = 1, // Always sell   FXN_DIR_CANDLE      = 2, // Same direction as the previous candle   FXN_DIR_CANDLE_FADE = 3, // Opposite to the previous candle   FXN_DIR_EMA         = 4  // Previous close above the EMA = buy, below = sell  };enum ENUM_FXN_DIST  {   FXN_DIST_POINTS = 0, // Fixed points   FXN_DIST_ATR    = 1  // ATR multiple  };sinput string InpHdrEntry = "=== Entry (server time) ==="; // ===== Entry (server time) =====input int    InpEntryHour       = 8;     // Entry hour (0-23, server time)input int    InpEntryMinute     = 0;     // Entry minute (0-59)input int    InpEntryWindowMin  = 5;     // Minutes after the entry time in which a late entry is still allowedinput ENUM_FXN_DIR InpDirection = FXN_DIR_CANDLE; // Direction ruleinput ENUM_TIMEFRAMES InpSignalTf = PERIOD_H1; // Timeframe for the previous candle, the EMA and the ATRinput int    InpEmaPeriod       = 50;    // EMA period (direction rule = EMA)
Sign in to read all the code and download it

It is free. A free account lets you see every line, copy it, download the source and open a copy in your Lab. The compiled file can be downloaded without an account.

Sign in Create a free account

Version history

  1. Version 1.0Live1 Dec 2026

    First version.

    Source · Compiled