Introduction to NightAnchor EA MT5
NightAnchor EA MT5 is an automated Forex trading Expert Advisor (EA) featuring configurable lot sizing, risk management, broker time synchronization, entry filters, and advanced trade protection mechanisms. Its settings are designed to provide flexibility in managing multiple currency pairs while controlling trading frequency and exposure to unfavorable market conditions.
One of the key components of NightAnchor EA MT5 is its combination of entry regime filtering, spread protection, news-event filtering, and optional trailing stop management. The EA also includes a multi-day market shock protection system that monitors recent trading ranges and can temporarily prevent trading on affected currency pairs.

Risk warning - read first
Trading forex on margin is high risk. You can lose part or all of your capital. Past or backtest results do not guarantee future profit. Use only money you can afford to lose.
Always test on a DEMO account first (and in the Strategy Tester) before using real money.
NightAnchor works on HEDGING accounts only. It will not work correctly on netting accounts.
Each trade uses a wide stop loss (40-80 pip) and a small take profit (8-11 pip). Many small wins can be erased by a few stop losses, so keep the lot size small.
Quick start
Open a demo hedging account with your broker.
Attach NightAnchor to any one chart (for example EURUSD). The EA trades all enabled pairs from that single chart.
Load a preset .set file that matches your capital and risk (see "Preset files" below), or keep the defaults.
Check that the broker symbols are found (see group 2) and that "Algo Trading" is enabled.
Watch the on-chart dashboard and the Experts log for a few weeks on demo before going live.
General / Risk
InpLotSelect (default: Fixed 0.01) - Quick choice of lot sizing: Manual, Fixed 0.01, or Risk 1% / 2% / 3% per trade. Advice: Beginners: keep Fixed 0.01. Choose Manual only if you want a different fixed lot.
InpLot (default: 0.01) - Fixed lot per trade. Used only when LotSelect = Manual and LotMode = 1. Advice: Start with 0.01 per $2,000 when trading all 20 pairs.
InpLotMode (default: 1) - 1 = fixed lot, 0 = risk %. Used only when LotSelect = Manual. Advice: Keep 1 unless your account is large.
InpRisk (default: 0.5) - Risk % per trade, based on the stop loss distance. Used only when LotMode = 0. Advice: Keep 0.5-1%. Risk mode needs a big balance (about $8,000 at 1% with an 80 pip SL) to reach 0.01 lot.
InpRiskUseMinLot (default: false) - If the risk-based lot is below the broker minimum: false = skip the trade, true = trade the minimum lot. Advice: Keep false. true can make real risk much bigger than the % you set.
InpMaxBook (default: 20) - Maximum total open positions. When reached, the remaining pending orders are cancelled. Advice: Lower it on small accounts (for example 3-10).
InpEquityStopPct (default: 15.0) - Safety stop: no new orders if equity falls below deposit x (1 - this %). 0 = off. Advice: Never set 0. Use 10% (careful) to 25% (aggressive).
InpMagic (default: 101010) - ID number that marks this EA's orders. Advice: Use a different number on each chart if you run several copies on one account.
InpShowPanel (default: true) - Show the on-chart dashboard. Display only, no effect on trading. Advice: Keep true. Turn off on a slow VPS.
InpPanelVertical (default: false) - Dashboard layout: false = compact 2 columns, true = large, one pair per row. Advice: Personal preference.
Broker / Time
InpAutoResolveSymbols (default: true) - Finds the broker's symbol names automatically (USDCHF -> USDCHF.a, etc.). Advice: Keep true.
InpSymbolPrefix (default: (empty)) - Manual symbol prefix, for example "m.". Advice: Fill only if auto-resolve fails.
InpSymbolSuffix (default: (empty)) - Manual symbol suffix, for example ".a", "-b", "m". Advice: Fill only if auto-resolve fails. Copy it exactly from Market Watch.
InpGMT_Mode (default: 0) - 0 = auto (measured live), 1 = manual. The Strategy Tester always uses the manual values. Advice: Keep 0 on live/demo. Set winter/summer values correctly for backtests.
InpGMT_Winter (default: 2) - Server time = GMT + this value in winter. Advice: Most "New York close" brokers use 2.
InpGMT_Summer (default: 3) - Server time = GMT + this value in summer (when DST is on). Advice: Most "New York close" brokers use 3.
InpDST_Mode (default: 1) - Daylight saving rule of the server: 0 = none, 1 = US, 2 = EU. Advice: Use 1 for New York close brokers (e.g. IC Markets). Ask your broker if unsure.
Filters / Schedule
InpUseEntryFilter (default: true) - Market regime filter. Cancels risky pending orders before they fill. Advice: Keep true. It is part of the validated setup.
InpUseYearEndPause (default: false) - Stops trading over the year-end holidays. Advice: Optional. Off is the validated default; turn on if you prefer to be safe in thin holiday markets.
InpMaxSpreadMult (default: 3.0) - No entry when spread is more than this many times the typical spread of the pair. Advice: Keep 2.5-3.0. Higher values allow trading in expensive spreads.
InpTradePace (default: 1.60) - Distance of the entry limit orders, 8 steps from 1.70 (slowest) to 1.00 (fastest). Faster = closer orders = more trades. Advice: Keep 1.60. 1.70 for fewer, safer trades. Below 1.40 is not recommended.
InpNewsFilter (default: false) - Stands aside around FOMC decisions. Advice: Turn on if you want to avoid big US news.
InpNewsMinutes (default: 300) - Blocks trading this many minutes before and after the event. Advice: Keep 300 when the news filter is on.
InpTradeMon ... InpTradeThu (default: true) - Trade on Monday to Thursday night. Advice: Keep true.
InpTradeFri (default: false) - Trade on Friday night. Advice: Keep false to avoid holding trades over the weekend.
Trailing stop (optional)
InpTrailStopEnable (default: false) - Turns the trailing stop on. Advice: Off is the validated default. Test on demo before turning on.
InpTrailStartPip (default: 6.0) - Trailing starts when floating profit reaches this many pips. Advice: Must be smaller than the pair's take profit (8-11 pip).
InpTrailDistPip (default: 3.0) - Stop loss follows price at this distance. Advice: 2-4 pip.
InpTrailStepPip (default: 0.5) - Minimum SL move each time (avoids too many modify requests). Advice: Keep 0.5.
Multi-day shock guard (optional)
InpShockGuardEnable (default: false) - Skips a pair after an unusually large price move. Advice: Off is the validated default. Optional extra protection.
InpShockLookbackDays (default: 1) - Number of recent sessions checked for a shock (1 = today only). Advice: Keep 1-3.
InpShockBaseDays (default: 20) - Number of normal sessions used as the baseline. Advice: Keep 20.
InpShockAtrMult (default: 3.0) - A pair is skipped when its recent range is more than this x the baseline. Advice: 2.5-3.5. Lower = blocks more often.
InpShockPropagate (default: false) - Also blocks every pair that shares a currency with the shocked pair. Advice: Turn on for extra safety (for example a sudden CHF or JPY move).
Per-pair settings (20 pairs)
Each pair has 4 inputs:
InpUse_<PAIR> - true/false: trade this pair or not.
InpSL_<PAIR> - stop loss in pips.
InpTPb_<PAIR> - take profit for BUY orders in pips.
InpTPs_<PAIR> - take profit for SELL orders in pips.
All 20 pairs are ON by default. Default values:
Advice: do not change SL/TP unless you have backtested the change. To lower risk on a small account, switch OFF the pairs with the largest stop loss first (the 80 pip pairs).
EURCHF: SL 70 pip, TP Buy 9 pip, TP Sell 9 pip
NZDCHF: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
NZDUSD: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
EURGBP: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
USDCHF: SL 75 pip, TP Buy 10 pip, TP Sell 9 pip
AUDNZD: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
NZDCAD: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
EURNZD: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
AUDCHF: SL 65 pip, TP Buy 10 pip, TP Sell 9 pip
AUDUSD: SL 50 pip, TP Buy 8 pip, TP Sell 11 pip
CADCHF: SL 50 pip, TP Buy 10 pip, TP Sell 10 pip
EURAUD: SL 60 pip, TP Buy 8 pip, TP Sell 11 pip
GBPAUD: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
GBPUSD: SL 50 pip, TP Buy 9 pip, TP Sell 9 pip
NZDJPY: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
GBPCHF: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
GBPNZD: SL 80 pip, TP Buy 9 pip, TP Sell 9 pip
AUDCAD: SL 40 pip, TP Buy 10 pip, TP Sell 10 pip
USDCAD: SL 60 pip, TP Buy 8 pip, TP Sell 8 pip
EURUSD: SL 60 pip, TP Buy 9 pip, TP Sell 10 pip
Preset files (.set)
15 ready-made presets are included in the NightAnchor_Presets folder. The name tells you capital, risk level and number of pairs:
NA_<number>_<capital USD>_<LOW/MEDIUM/HIGH>_<pairs>P.set e.g. NA_02_00200USD_MEDIUM_5P.set = $200, medium risk, 5 pairs.
$200: NA_01 LOW 5P, NA_02 MEDIUM 5P, NA_03 HIGH 8P
$500: NA_04 LOW 8P, NA_05 MEDIUM 12P, NA_06 HIGH 12P
$1,000: NA_07 LOW 12P, NA_08 MEDIUM 20P, NA_09 HIGH 20P
$2,000: NA_10 LOW 20P, NA_11 MEDIUM 20P, NA_12 HIGH 20P
$5,000: NA_13 LOW 20P, NA_14 MEDIUM 20P, NA_15 HIGH 20P
LOW: Equity stop 10%, pace 1.70 (fewest trades). MEDIUM: equity stop 15%, pace 1.60. HIGH: equity stop 25%, pace 1.40, larger lot.
NA_11 ($2,000 MEDIUM, 20 pairs) is exactly the EA default settings. All other presets are suggestions built from it and have NOT been backtested.
Small accounts cannot go below 0.01 lot, so presets for $200-$1,000 use fewer pairs and a lower MaxBook. Their real risk is still higher than the name suggests.
How to load a preset:
In MT5, click File > Open Data Folder.
Copy the .set files into MQL5\Presets (for the Strategy Tester: MQL5\Profiles\Tester).
Attach the EA to a chart (or open its Properties), go to the Inputs tab and click Load.
Choose the .set file and click OK.
If your broker uses a symbol suffix that auto-resolve does not find, fill InpSymbolSuffix by hand.
If you run more than one preset on the same account, give each chart a different InpMagic.
Final checklist
Hedging account: yes.
Tested on demo for at least a few weeks.
Lot size matches your capital (about 0.01 per $2,000 for 20 pairs).
InpEquityStopPct is not 0.
Broker GMT / DST set correctly (important for backtests).
Algo Trading button is green.
