Nexus Focus is an automated Expert Advisor for MetaTrader 5 designed for Hedged accounts, combining dual Buy/Sell engines, dynamic ATR-based spacing, Grid/Martingale scaling, smart hedge pending orders, reverse recovery, basket trailing stops, and an on-chart Dashboard with a daily P/L calendar.
Core Features:
- Dual Buy & Sell Engines for Hedged Accounts: Runs independent Buy and Sell engines (with separate magic numbers) to manage positions on hedged MT5 accounts.
- Trading Modes (Both / Buy / Sell / Auto): Switch between Both, Buy only, Sell only, or Auto mode (which evaluates EMA fast/slow separation against PipThreshold).
- Lot & Martingale Scaling: Supports Fibonacci-style progression (LOT_FIBO) and doubling (LOT_X2) from BaseLot up to InpMaxMartingaleLevel, with live mode and base lot buttons on the chart panel.
- Dynamic ATR Grid Distance: Adjusts order spacing dynamically based on ATR (ATR_Min_Value, ATR_Max_Value, Distance_Min_Points, Distance_Max_Points) with bar-level order limits (EnableBarLimit, MaxOrdersPerBar).
- Basket TP & Trailing Stop Controls: Supports target profit scaling via MinimumTP_USD and BasketTP_Multiplier, Basket Trailing Stop (EnableBasketTrailingStop, BasketTrailing_Percent), and Level-0 Basket D handling (BasketD_USD, EnableBasketDTrailingStop, BasketDTrailingStep_USD), with optional chart lines (ShowBasketTPLine).
- Smart Hedge Orders & Reverse Recovery Machine: Places pending hedge orders starting from HedgeStartLevel (when EnableHedgeOrders is enabled) and pairs recovery logic via EnableReverseRecovery with break-even and trailing point settings.
- Risk Protection, Sessions & Auto Sleep: Includes per-engine max drawdown limits (Buy_Engine_Max_DD_Percent, Sell_Engine_Max_DD_Percent), daily profit auto-sleep (AutoSleepByProfit, DailyProfitTarget_USD), multi-session schedules (Sessions 1-3 and Friday shutdown), and state persistence across restarts.
- On-Chart Dashboard & P/L Ledger: Displays live engine status, recent closed baskets, quick controls, and a toggleable daily profit and worst floating drawdown calendar.
Input Parameters:
- Buy_Engine_Magic / Sell_Engine_Magic: Magic numbers for the Buy and Sell engines.
- AutoSleepByProfit: Automatically enters sleep mode once the daily profit target is reached.
- DailyProfitTarget_USD: Daily profit target in USD for automatic sleep.
- UserTimeZoneOffset: Local time zone offset in hours from UTC (for example, 7.0).
- EnableMultiSession / EnableSession1..3: Enables trading schedule windows and session start/end times (Session1Start..Session3End).
- EnableFridayShutdown / FridayShutdownTime: Stops new trading on Friday starting at the specified time.
- TradeMode: Initial trading mode (TRADE_BOTH, TRADE_BUY, TRADE_SELL, or TRADE_AUTO).
- PipThreshold: Minimum EMA separation threshold used in Auto mode.
- MartingaleLotMode: Lot progression mode (LOT_FIBO or LOT_X2).
- BaseLot: Starting lot size for level 0.
- InpMaxMartingaleLevel: Maximum Martingale level allowed.
- ATR_Min_Value / ATR_Max_Value: ATR range boundaries for dynamic distance calculation.
- Distance_Min_Points / Distance_Max_Points: Minimum and reference maximum grid spacing in points.
- MinimumTP_USD: Minimum basket profit target in USD (scaled with base lot).
- BasketTP_Multiplier: Multiplier applied to main position volume to calculate basket target profit.
- BasketD_USD: Profit threshold for single-order (Level 0) Basket D handling.
- EnableBasketTrailingStop / BasketTrailing_Percent: Enables basket trailing stop and sets the profit lock percentage.
- ShowBasketTPLine: Shows or hides target and protection lines on the chart.
- EnableBasketDTrailingStop / BasketDTrailingStep_USD: Enables trailing stop and step size (in USD) for Basket D.
- EnableHedgeOrders / HedgeStartLevel: Enables hedge pending orders and sets the starting Martingale level.
- EnableBarLimit / MaxOrdersPerBar: Limits how many orders can be opened per bar.
- Buy_Engine_Max_DD_Percent / Sell_Engine_Max_DD_Percent: Maximum allowed drawdown percentage per engine (0 disables).
- AutoResetAfterStop: Allows automatic restart after a drawdown stop cooldown when enabled.
- EnableReverseRecovery: Enables the reverse recovery mechanism.
- ReverseBETriggerPoints / ReverseBELockPoints: Break-even trigger distance and locked profit in points for reverse trades.
- ReverseEnableTrailing: Enables trailing stop on reverse recovery positions.
- ReverseTrailingStartPoints / ReverseTrailingLockPoints / ReverseTrailingStep: Trailing activation, lock distance, and step size in points.
- OverrideChartColors & Chart*Color: Customizes chart background, grid, candles, line, and volume colors.
Recommendations & Risk Disclaimer:
"Recommended symbol: XAUUSD" Default input parameters are configured for EURUSD. If you are running the EA on XAUUSD (Gold), please replace the default values with the recommended values shown in parentheses ( )
XAUUSD setting values
- Initial Base Lot Size ...(0.01)
- Min ATR Threshold (Uses Min Distance below this) ...(5.0)
- Max ATR Threshold (Scales linearly above this) ...(15.0)
- Min Grid Distance (Points) ...(250)
- Max Grid Distance at Max ATR (Points) ...(1100)
- Minimum Basket Take Profit (USD) ...(6.0)
- Basket TP Multiplier (Total Main Lot x Value) ...(40.0)
- Single-Order (Level 0) Profit Target (USD) ...(1.8)
- Single-Order Trailing Step (USD) ...(0.10)
Preset Files & Support: If you would like to request a .set preset file (such as for
XAUUSD), please contact me directly via the
MQL5 built-in messenger or leave a message in the
Comments tab on this product page.
Always test Nexus Focus thoroughly in the MetaTrader 5 Strategy Tester using realistic tick/historical data and test on a demo account before live trading. Grid, Martingale, and Hedging strategies carry substantial risk—use conservative lot sizes and proper risk management. Trading Forex, metals, and CFDs involves a high level of risk and may not be suitable for all traders; past performance does not guarantee future results.