Nadaraya Watson Envelope Multicurrency Settings/Inputs Guide for MT4 & MT5

Nadaraya Watson Envelope Multicurrency Settings/Inputs Guide for MT4 & MT5

12 March 2026, 09:14
Biswarup Banerjee
0
290

Complete User Documentation — MT4 & MT5

1. OVERVIEW

The Nadaraya Watson Envelope Strategy Multicurrency EA is a fully automated trading robot that scans multiple currency pairs from a single chart and executes trades based on the Nadaraya Watson Envelope indicator. It combines this non-parametric kernel regression technique with configurable entry and exit strategies, trend filters, and risk management tools like ATR trailing stops and breakeven. This EA solves the problem of manually monitoring multiple pairs for envelope-based reversal or breakout signals, letting you automate a systematic multi-currency approach without staring at screens all day.

Who Should Use It: Retail forex traders who want a hands-off, rule-based system for trading multiple pairs simultaneously using the Nadaraya Watson Envelope, especially those comfortable with fine-tuning indicator parameters and risk controls.

Main Benefit: Automate your multi-currency envelope trading strategy with flexible entry/exit logic, built-in trend filters, and comprehensive risk safeguards — all from a single chart.


2. INPUT PARAMETERS & SETTINGS

This product shares a common set of general input settings with all Multi-Currency Scanner Dashboard products in this series. The following sections are covered in the common guide: General Settings (pairs list, dashboard colors, panel size), Timeframe Signal Settings (individual TF scan per symbol), Timeframe Confluence Settings (multi-TF confluence scan), and Alert Settings (popup, push notification, email). For full details refer to the Common Multi-Currency Scanner Dashboard Settings Guide. The sections below cover only the product-specific inputs unique to this product.

General Settings

These settings control how the EA displays virtual stop levels, manages group-level risk, accounts for swap costs, and records historical trade data for backtesting analysis.

Setting Name Type Default Value Description Example
Chart lines for virtual SL/TP (never drawn during optimization) bool false When enabled, the EA draws horizontal lines on the chart showing where your hidden stop loss and take profit levels are placed. Useful for visual confirmation during live trading, but it won't draw during optimization to avoid clutter. true — Enable when running live to see your virtual SL/TP lines on chart.
Group Stoploss Amount double 0 Sets a maximum total loss in account currency across all open positions from this EA. Once the combined floating loss hits this amount, all trades are closed. Helps cap overall drawdown when trading multiple pairs. 100 — Close all trades if total loss reaches $100 across all pairs.
Include Swap charges in Profit bool true When true, swap (overnight interest) is added to the profit calculation used by breakeven, trailing stop, and group loss logic. Disable it if you want those features to ignore swap costs and only consider pure price movement. false — Disable if you hold positions short-term and don't want swap affecting your breakeven trigger.
Enable history for backtests or optimization bool false When enabled, the EA records a history of all trades and signals to a file, which you can review after a backtest or optimization run. Leave it off during live trading to save resources. true — Enable during optimization runs to analyze which parameter sets performed best.

Atr Trailingstop Settings

These settings configure an adaptive trailing stop based on the Average True Range indicator, allowing the stop distance to adjust automatically to market volatility.

Setting Name Type Default Value Description Example
Use ATR Trailing Stop bool false Master switch for the ATR-based trailing stop feature. When enabled, the EA will dynamically adjust your stop loss based on current volatility, rather than using a fixed pip distance. Useful for letting profits run in trending markets. true — Enable on volatile pairs like GBP/JPY to avoid getting stopped out by noise.
ATR Timeframe ENUM PERIOD_CURRENT Selects the timeframe from which the ATR value is calculated. Using a higher timeframe like H4 gives a smoother, more stable trailing stop, while the current chart timeframe makes it more responsive. PERIOD_H1 — Use hourly ATR for a balance between responsiveness and stability.
ATR Period int 14 The number of bars used to calculate the ATR value. A shorter period like 7 makes the trailing stop more sensitive to recent volatility changes, while 21 or higher smooths out spikes. 10 — Use a shorter period for faster adaptation to changing volatility.
Activation (ATR multiplier) double 2.0 The profit level (in ATR units) that must be reached before the trailing stop kicks in. A value of 2.0 means the trade must be 2 ATRs in profit before trailing begins. Prevents premature trailing on small moves. 3.0 — Use a higher multiplier for trend-following strategies that need room to breathe.
Trail distance (ATR multiplier) double 1.0 The fixed distance (in ATR units) that the stop loss trails behind the current price. A value of 1.0 means the stop is placed 1 ATR away from the price. Tighter values lock in profit faster but risk early exits. 1.5 — Use a wider trail on choppy pairs to avoid getting stopped out by pullbacks.
Trail increment (ATR multiplier) double 0.5 The step size (in ATR units) by which the trailing stop moves up or down as price moves favorably. A smaller increment like 0.3 updates the stop more frequently, while a larger one reduces slippage from multiple updates. 0.3 — Use a smaller increment for tighter control in fast-moving markets.

Grid Settings

This setting controls whether the EA attempts to recover losses from a grid of multiple trades by closing them all at a combined profit target.

Setting Name Type Default Value Description Example
Recover profit from all grid trades bool false When enabled, the EA will close all open trades from this strategy as a group once their combined net profit reaches a positive value. Useful for grid or martingale approaches where individual trades may be in loss but the basket is profitable. true — Enable if you're running a grid strategy and want to exit the whole basket when it turns green.

Safeguard Settings

These backtesting-only parameters let you set minimum performance thresholds — like a max drawdown or minimum profit — so you can quickly filter out poor optimization results without manual inspection.

Setting Name Type Default Value Description Example
Max Loss from initial balance [0: disable] double 0.0 Sets a maximum allowable drawdown as a percentage of the starting account balance. If the floating loss exceeds this level, the EA stops trading. A value of 20 means trading halts if you're down 20% from the initial deposit. 15 — Stop trading if drawdown hits 15% of starting balance.
Minimum Profit Percent [backtesting only] [0: disable] double 0 During backtesting or optimization, the EA will abort the run if the total profit percentage falls below this threshold. Helps you quickly discard parameter sets that don't meet your minimum profitability criteria. 5 — Abort backtest if profit is less than 5% of starting balance.
Minimum Trades [backtesting only] [0: disable] double 0 Sets a minimum number of trades that must be executed during a backtest or optimization. If the EA doesn't trade enough, the run is considered invalid. Useful for ensuring statistical significance in your results. 50 — Require at least 50 trades for a valid backtest result.
Max inactive days [backtesting only] [0: disable] int 0 If the EA goes without opening a trade for more than this many days during a backtest, the run is aborted. Helps filter out parameter sets that only trade during specific market conditions and then go dormant. 30 — Abort if no trade occurs for 30 consecutive days.

Nadaraya Settings

These are the core parameters for the Nadaraya Watson Envelope indicator, controlling the lookback period, envelope width, smoothing, and the entry/exit logic that determines when trades are opened and closed.

Setting Name Type Default Value Description Example
Bars Count int 100 The number of historical bars used to calculate the Nadaraya Watson envelope. A higher value smooths the envelope but makes it less responsive to recent price action. Lower values react faster but may produce more false signals. 200 — Use on higher timeframes like H4 for a smoother, more reliable envelope.
Bandwidth int 8 Controls the kernel bandwidth in the Nadaraya Watson estimator. A smaller bandwidth makes the envelope hug price more closely, generating more signals. A larger bandwidth smooths the envelope, reducing noise but potentially missing quick moves. 12 — Increase bandwidth on volatile pairs to filter out false breakouts.
Multiplayer double 3 Multiplies the envelope's standard deviation to set the distance of the upper and lower bands from the central estimate. A higher multiplier creates wider bands, requiring stronger price moves to trigger signals. Reduces whipsaws in ranging markets. 2.5 — Use a lower multiplier for more frequent signals in trending markets.
Repainting Smoothing bool true When enabled, the envelope uses a smoothed calculation that may change past values as new bars form — this is repainting. Disable it if you want a non-repainting version for more reliable historical analysis, though it may be less smooth. false — Disable for backtesting to ensure signals don't change retroactively.
Entry Strategy ENUM ENTRY_STRATEGY1 See options explained below. ENTRY_STRATEGY2 — Use for breakout trading when you want to enter on crosses rather than reversals.
Exit Strategy ENUM EXIT_STRATEGY0 See options explained below. EXIT_STRATEGY1 — Use for reversal exits if you entered on a breakout and expect a pullback.

Entry Strategy — Options Explained

This setting determines the exact condition that triggers a buy or sell order based on the Nadaraya Watson Envelope. Choosing the right strategy aligns the EA with your preferred trading style — reversal or breakout.

ENTRY_STRATEGY1: This is a reversal-based strategy. A buy signal is generated when price touches or reverses at the lower envelope band, suggesting the downtrend is exhausted. A sell signal occurs when price reverses at the upper band. It works best in ranging markets where price respects the envelope boundaries.

ENTRY_


3. HOW IT WORKS

Core Calculation & Logic

The Nadaraya Watson Envelope MultiCurrency EA monitors up to 30 currency pairs simultaneously from a single chart, applying the Nadaraya Watson kernel regression to each symbol's price data. This non-parametric smoothing technique creates a dynamic envelope around price action, where the envelope width adapts based on the Bandwidth parameter and the distance from price is controlled by the Multiplier. The EA then evaluates every tick on every monitored symbol, checking for predefined entry conditions based on the selected Entry Strategy.

What you're really getting here is a mean-reversion or momentum system depending on how you configure it. The Nadaraya Watson estimator essentially calculates a weighted average of recent prices, with weights determined by a Gaussian kernel — so prices closer to the current bar have more influence. The envelope bands then act as dynamic support and resistance levels. When price touches or crosses these bands, the EA looks for confirmation signals before firing an order. This approach works well in ranging markets when you use reversal strategies, but can also catch strong trends if you switch to the momentum-based entry mode.

Entry Strategies Explained

ENTRY_STRATEGY1 — Reversal at the Bands

BUY Signal: Price touches or crosses below the lower envelope band, then closes back above it. The EA also checks that the previous candle's close was below the lower band, confirming a rejection of that level.

SELL Signal: Price touches or crosses above the upper envelope band, then closes back below it. The previous candle's close must have been above the upper band.

Best For: Range-bound markets where price consistently bounces between support and resistance. You'll see fewer signals in strong trends, which is actually a good thing — it keeps you out of trouble.

ENTRY_STRATEGY2 — Momentum Breakout

BUY Signal: Price closes above the upper envelope band after having been below it. This signals that momentum is shifting upward and the envelope is being breached.

SELL Signal: Price closes below the lower envelope band after having been above it. This indicates bearish momentum is taking over.

Best For: Trending markets where you want to catch breakouts early. I prefer this strategy on higher timeframes (H4 and above) where false breakouts are less frequent.

ENTRY_STRATEGY3 — Band Cross with Filter

BUY Signal: Price crosses above the lower band, and the envelope slope (calculated from the difference between current and previous envelope values) is positive. This adds a trend filter to the basic reversal setup.

SELL Signal: Price crosses below the upper band, and the envelope slope is negative.

Best For: Traders who want to combine mean-reversion entry with a trend confirmation. It's a middle ground between Strategy 1 and Strategy 2.

Step-by-Step Workflow

Step 1: Attach the EA to a chart: Drag the EA onto any currency pair chart (EURUSD recommended). The EA will scan all symbols listed in the SYMBOLS parameter, not just the chart symbol.

Step 2: Configure your symbol list: In the SYMBOLS input field, enter the pairs you want to trade, separated by commas — for example "EURUSD,GBPUSD,USDJPY,AUDUSD". You can add up to 30 pairs.

Step 3: Set your entry strategy: Choose ENTRY_STRATEGY1, ENTRY_STRATEGY2, or ENTRY_STRATEGY3 from the dropdown. Start with Strategy 1 if you're new to this system.

Step 4: Define risk parameters: Set your Lot Size, StopLoss, and TakeProfit values. For a conservative start, use 0.01 lots with a 50-pip stop loss and 100-pip take profit.

Step 5: Enable or disable filters: Decide whether to use the Repainting Smoothing option. If you want to avoid repainting entirely, set this to false — but be aware the signals will be less smooth.

Step 6: Run a backtest first: Before going live, test the EA on at least 6 months of data across multiple pairs. Pay attention to drawdown and win rate for each strategy.

Step 7: Monitor and adjust: Once live, check the EA's performance daily. The dashboard will show you which pairs are active and what signals are firing.


4. RISK MANAGEMENT FEATURES

This EA includes several built-in risk controls that let you manage exposure across multiple pairs without needing external risk management tools.

Feature Description
Lot Size Control Set a fixed lot size for all trades via the LOTS parameter. For dynamic sizing, you can later integrate with a money management module — but the base EA uses a single lot value across all symbols.
Stop Loss & Take Profit Modes Choose from six calculation modes: Pips, Amount, Percent, Group Amount, Group Percent, or No SL/TP. The Group modes aggregate exposure across all open positions for that symbol group, which is useful when trading correlated pairs.
Hidden SL/TP When HIDDEN_SL_TP is enabled, the EA manages stop loss and take profit internally without sending them to the broker. This prevents other market participants from seeing your exit levels. The virtual SL/TP lines can be shown on the chart for visual reference.
Group Risk Limits The GROUP_STOPLOSS_AMOUNT and GROUP_TAKEPROFIT_AMOUNT parameters let you set maximum loss or profit thresholds for the entire portfolio of open trades. Once the group limit is hit, all positions are closed — a hard stop for your account.
Trade Filtering by Time The EA includes time-based filters (not shown in the basic inputs but present in the full code) that prevent trading during high-impact news events or outside your preferred trading hours. Check the full parameter list in the EA's properties dialog.

5. IMPORTANT NOTES & WARNINGS

Known Limitations

Issue Explanation
Repainting with Smoothing Enabled When Repainting Smoothing is true, the envelope lines can shift as new bars form. This means a signal that appeared valid on the previous bar might disappear. Always verify signals on the current bar before taking action.
Multi-Symbol Latency Scanning 20+ pairs on every tick can cause performance lag, especially on older machines or VPS with limited CPU. The EA processes each symbol sequentially, so a slow symbol can delay signals on others.
Strategy 2 False Breakouts in Ranges ENTRY_STRATEGY2 (momentum breakout) tends to generate false signals in choppy, sideways markets. If you see many losing trades in a row, switch to Strategy 1 or 3 until the trend resumes.
Hidden SL/TP Not Supported by All Brokers Some brokers require explicit stop loss and take profit levels in the order. If you enable HIDDEN_SL_TP and the EA fails to open trades, disable this feature and use standard SL/TP instead.
Group Risk Limits Reset on EA Restart The group stop loss and take profit counters reset when the EA is reattached or the platform restarts. This means a group limit might not trigger correctly if the EA loses its state mid-session.

Settings Beginners Should NOT Change

Setting Why to Leave Default
Bars Count The default 500 bars gives a good balance between responsiveness and stability. Reducing it too much makes the envelope jumpy; increasing it delays signals. Stick with 500 until you understand how it affects your pairs.
Bandwidth At 8.0, the envelope is wide enough to avoid most false touches but narrow enough to catch meaningful reversals. Changing this without backtesting can lead to overtrading or missing good setups.
Multiplier The 3.0 multiplier is a standard setting that works across most forex pairs. Lower values make the envelope too tight (more false signals), higher values make it too loose (fewer trades).
Entry Strategy ENTRY_STRATEGY1 is the safest starting point because it waits for clear reversals at the bands. Switching to Strategy 2 or 3 without understanding the market regime often results in poor performance.
SLTP_MODE The default AMOUNT mode lets you set precise dollar risk per trade. Percent and Group modes are more advanced and require careful position sizing to avoid blowing your account.

Dashboard Usage Tips

  1. Sort by signal strength: The dashboard columns show signal direction and confidence. Click the column header to sort — focus on pairs showing the strongest signals first.
  2. Watch for divergence: If the dashboard shows a buy signal on EURUSD but a sell signal on USDCHF, that's a divergence worth noting. It often precedes a reversal in the dollar index.
  3. Use the timeframe filter: The dashboard lets you view signals across multiple timeframes. Don't take a 1-minute signal seriously unless it aligns with the H1 or H4 direction.
  4. Check the envelope slope: Before entering a trade, glance at the envelope line's angle. A flat envelope means low momentum — avoid breakouts in that condition.
  5. Monitor open positions: The dashboard shows your current trades and their P&L. If you see multiple losing positions in correlated pairs, consider closing some manually to reduce risk.
  6. Refresh after news: Major news events can distort the envelope calculation. After a high-impact release, wait 15-30 minutes for the indicator to stabilize before acting on new signals.

Quick Start Guide

Follow these steps to get started in under 5 minutes:

  1. Download and install: Purchase the EA from the MQL5 Market, then download and install it via the MetaTrader Navigator panel (View > Navigator or Ctrl+N).
  2. Attach to a chart: Open an EURUSD H1 chart, drag the EA from Navigator onto the chart, and click OK on the confirmation dialog.
  3. Set your pairs: In the EA properties dialog, find the SYMBOLS parameter and enter the pairs you want to trade, separated by commas — for example "EURUSD,GBPUSD,USDJPY".
  4. Choose a strategy: Leave Entry Strategy at ENTRY_STRATEGY1 for now. This reversal strategy is the most forgiving for beginners.
  5. Configure risk: Set LOTS to 0.01, STOPLOSS to 50 (pips), and TAKEPROFIT to 100 (pips). Enable HIDDEN_SL_TP if you want to hide your stops from the broker.
  6. Run a backtest: Open the Strategy Tester (View > Strategy Tester or Ctrl+R), select the EA, set the date range to the last 6 months, and click Start. Review the results before going live.
  7. Go live on demo: Switch to a demo account and attach the EA with the same settings. Monitor it for at least a week to ensure it behaves as expected.
  8. Transition to live: Once you're confident in the demo performance, switch to a live account with a small balance (e.g., $500) and the same conservative settings. Increase lot sizes gradually as you gain experience.


Installation Guide for MQL Products | Updating Purchased MQL Products on MT4/MT5 | General Troubleshooting Guide | Backtest and Set Files

Check all my products: https://www.mql5.com/en/users/biswait50/seller

Contact me for support: https://www.mql5.com/en/users/biswait50