Higher High And Lower Low Settings/Inputs Guide for MT4 & MT5

Higher High And Lower Low Settings/Inputs Guide for MT4 & MT5

12 March 2026, 08:51
Biswarup Banerjee
0
289

Complete User Documentation — MT4 & MT5

1. OVERVIEW

The Higher High and Lower Low Strategy Multicurrency EA automates fractal-based market structure trading across multiple currency pairs from a single chart. It identifies swing points — higher highs, lower highs, higher lows, and lower lows — then enters trades on breakouts of these key levels. This solves the problem of manually scanning multiple pairs for structure breaks, letting you capture trend continuations and reversals without staring at charts all day. The EA includes ATR-based trailing stops, grid recovery, and a trend filter voting system to keep you on the right side of the market.

Who Should Use It: Retail forex traders who understand market structure concepts (swing highs/lows) and want a systematic, multi-pair approach to trend trading without coding their own EA.

Main Benefit: Automates the tedious work of identifying fractal breakouts across dozens of pairs, so you can focus on strategy tuning rather than execution.


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 parameters control basic trade execution, risk management, and how the EA interacts with your broker — things like stop-loss mode, trade direction, and magic number isolation.

Setting Name Type Default Value Description Example
Chart lines for virtual SL/TP (never drawn during optimization) bool false When enabled, the EA draws dashed lines on the chart showing where your hidden stop-loss and take-profit levels sit. Useful for visual confirmation during live trading, but it won't draw during optimization to keep backtests clean. true, so you can see virtual SL/TP lines on the chart while monitoring live positions.
Group Stoploss Amount double 0 Sets a maximum total loss in account currency across all open trades from this EA. Once the combined floating loss hits this value, all positions are closed. Essential for capital preservation when running multiple pairs simultaneously. $150, to cap total drawdown across a 5-pair portfolio at $150.
Include Swap charges in Profit bool true When true, the EA factors overnight swap fees into profit calculations for breakeven and trailing stop decisions. Leave it on unless you want to ignore swap costs — but that can lead to false positives on long-held positions. true, so breakeven doesn't trigger on a position that's actually losing after swap deductions.
Enable history for backtests or optimization bool false When enabled, the EA records trade history to a file during backtests, allowing you to analyze performance beyond the Strategy Tester report. Useful for detailed post-optimization analysis, but slows down backtests slightly. true, when running a multi-pass optimization to export trade logs for external analysis.

Atr Trailingstop Settings

These settings let you attach a volatility-adjusted trailing stop to every open position, using Average True Range to set the distance dynamically instead of a fixed pip value.

Setting Name Type Default Value Description Example
Use ATR Trailing Stop bool false Master switch for the ATR-based trailing stop. When enabled, the EA replaces any fixed trailing stop with one that adapts to current market volatility. Disable it if you prefer a simple fixed pip trail or no trail at all. true, to let the EA automatically widen the trail during high volatility and tighten it in quiet markets.
ATR Timeframe ENUM PERIOD_CURRENT See options explained below. PERIOD_H1, to base ATR calculations on hourly bars for a medium-term trailing stop.
ATR Period int 14 Number of bars used to calculate the ATR value. A shorter period (e.g., 7) makes the trail react faster to recent volatility changes, while a longer period (e.g., 21) smooths out noise. Default 14 is a good starting point for most pairs. 21, for a smoother ATR that ignores short-term volatility spikes on EURUSD.
Activation (ATR multiplier) double 2.0 The trailing stop activates only after price has moved this many ATRs in your favor. A value of 2.0 means the trail kicks in after a 2-ATR profit. Higher values delay activation, giving the trade more room to breathe before locking in gains. 3.0, to avoid premature trailing on a volatile pair like GBPJPY where early lock-ins often get stopped out.
Trail distance (ATR multiplier) double 1.0 Once activated, the stop-loss trails price by this many ATRs. A value of 1.0 means the stop sits one ATR behind the current price. Tighter values (0.5) lock profits faster but risk getting stopped out by normal noise. 1.5, for a wider trail on a trending pair like USDJPY to avoid being shaken out during pullbacks.
Trail increment (ATR multiplier) double 0.5 Controls how often the trailing stop updates. Each time price moves this many ATRs further in your favor, the stop adjusts. A smaller value (0.3) updates more frequently, while a larger value (1.0) reduces updates and commission costs. 0.3, for frequent stop updates on a fast-moving pair like GBPUSD during news events.

Grid Settings

These settings control the EA's ability to recover losses from multiple grid-style trades, useful when using the EA with a martingale or scaling-in approach.

Setting Name Type Default Value Description Example
Recover profit from all grid trades bool false When enabled, the EA calculates total profit across all open positions from the same signal and closes the entire grid once the combined profit target is hit. Useful for recovering from multiple losing trades with a single winning cluster. true, if you're using a grid recovery strategy where multiple entries average into a position.

Safeguard Settings

These backtesting-only filters let you set minimum performance thresholds — if the EA doesn't meet them during optimization, the run is rejected automatically.

Setting Name Type Default Value Description Example
Max Loss from initial balance [0: disable] double 0.0 Sets a maximum drawdown percentage from the starting balance. If the equity drops below this level during a backtest, the EA stops trading. Leave at 0 to disable. Critical for avoiding catastrophic losses during optimization. 20, to stop the EA if drawdown exceeds 20% of initial balance during a backtest.
Minimum Profit Percent [backtesting only] [0: disable] double 0 Backtesting filter: if the total profit at the end of the test is below this percentage, the optimization pass is rejected. Helps you quickly discard parameter sets that don't meet your minimum return expectations. 5, to reject any optimization run that doesn't achieve at least 5% net profit.
Minimum Trades [backtesting only] [0: disable] double 0 Backtesting filter: optimization passes with fewer trades than this value are rejected. Prevents over-optimization on a handful of lucky trades. Set to 30-50 for statistically meaningful results. 30, to ensure each optimization pass has at least 30 trades for statistical validity.
Max inactive days [backtesting only] [0: disable] int 0 Backtesting filter: if the EA goes this many consecutive days without opening a trade, the optimization pass is rejected. Useful for weeding out parameter sets that are too inactive to be practical. 10, to reject any run where the EA doesn't trade for 10 consecutive days.

Hh_ll_lh_hl Settings

These are the core strategy parameters — they define how the EA identifies swing highs and lows, which timeframe to scan, and which fractal patterns trigger entries and exits.

Setting Name Type Default Value Description Example
Scan last N bars int 50 Number of recent bars the EA scans to identify swing points. A higher value (e.g., 100) captures more historical structure but may include outdated levels. Lower values (e.g., 20) react faster to recent price action but may miss significant levels. 100, for a longer-term view on daily charts where major swing points matter more.
HH_LL_LH_HL Timeframe ENUM PERIOD_CURRENT See options explained below. PERIOD_H4, to analyze swing points on the 4-hour chart for swing trading.
Fractal Entry Strategy ENUM ENTRY_STRATEGY1 See options explained below. ENTRY_STRATEGY1, to buy when price breaks above the recent higher high and higher low structure.
Fractal Exit Strategy ENUM EXIT_STRATEGY0 See options explained below. EXIT_STRATEGY0, to disable fractal-based exits and rely on the trailing stop or take-profit instead.

Fractal Entry Strategy — Options Explained

This setting determines which market structure pattern triggers a new trade. You can choose to enter on bullish breakouts, bearish breakouts, or disable entry entirely.

ENTRY_STRATEGY0 (Disable): No fractal-based entries will be taken. The EA will still manage existing positions but won't open new ones based on HH/HL/LH/LL patterns. Useful if you want to use the EA purely for trade management with manual entries.

ENT


3. HOW IT WORKS

Core Calculation & Logic

The EA scans price action across your chosen symbols to identify four fractal patterns: Higher High (HH), Higher Low (HL), Lower High (LH), and Lower Low (LL). It looks back a configurable number of bars (default 50) to find these swing points. The core idea is that markets tend to move in waves — after a HH+HL sequence, momentum is bullish; after LH+LL, it's bearish. The EA doesn't use lagging indicators; it reacts to actual price structure breaks, which makes it responsive in trending conditions. It tracks the most recent HH, HL, LH, and LL for each symbol and timeframe, then compares current price against those levels to generate signals.

Mathematically, a HH is a bar whose high is higher than both the previous and next bars' highs — a standard fractal definition. The EA then waits for price to break above the most recent HH (for buys) or below the most recent LL (for sells). It also checks for confluence: you can require both a HH break and a HL break to confirm entry, which filters out false breakouts. The exit logic works similarly — it closes trades when the opposite fractal pattern breaks, aiming to capture the bulk of a trend while avoiding giving back profits during reversals.

Entry Strategies Explained

Fractal Entry Strategy — ENTRY_STRATEGY1 (Buy on HH+HL break above recent HH)

BUY Signal: Price must break above the most recent Higher High and the most recent Higher Low must also be broken to the upside. In other words, both the HH and HL levels are taken out by bullish price action.

SELL Signal: Not applicable for this strategy — it's a buy-only entry mode. You'd pair it with a separate sell strategy or use it only when you want to trade bullish breakouts.

Best For: Strong uptrends where pullbacks are shallow and price keeps making new highs. Works well on H1-H4 timeframes in trending pairs like GBP/JPY or USD/CHF.

Fractal Entry Strategy — ENTRY_STRATEGY2 (Sell on LH+LL break below recent LL)

BUY Signal: Not applicable — this is a sell-only strategy.

SELL Signal: Price must break below the most recent Lower Low and the most recent Lower High must also be broken to the downside. Both fractal levels are violated by bearish momentum.

Best For: Sustained downtrends, especially after a clear trend change. Use on M30-H1 for faster moves, or H4 for swing trades.

Fractal Exit Strategy — EXIT_STRATEGY0 (Exit buy on LH or HL break)

Exit Condition for Buys: Closes all buy positions when price breaks below the most recent Lower High or breaks below the most recent Higher Low. Either condition triggers an exit.

Exit Condition for Sells: Not used — this exit mode only applies to buy trades.

Best For: Traders who want to exit long positions at the first sign of weakness, preserving profits before a deeper pullback.

Fractal Exit Strategy — EXIT_STRATEGY1 (Exit sell on HH or LH break)

Exit Condition for Buys: Not used.

Exit Condition for Sells: Closes all sell positions when price breaks above the most recent Higher High or breaks above the most recent Lower High. Either bullish fractal break triggers the exit.

Best For: Exiting shorts quickly when buying pressure returns, ideal for volatile pairs like GBP/NZD or EUR/JPY.

Step-by-Step Workflow

Step 1: Attach EA to one chart: Drag the EA onto any chart — it doesn't matter which pair, because the EA reads the symbol list from the input parameter. Use a 1-minute or 5-minute chart as the host; the EA handles all timeframes internally.

Step 2: Configure your symbol list: In the SYMBOLS input, type the pairs you want to trade, separated by commas — e.g., EURUSD,GBPUSD,USDCHF . The EA will open positions on each symbol independently.

Step 3: Set your lot size: Enter a fixed lot size in the LOTS field. Start with 0.01 for testing. If you prefer risk-based sizing, use the SLTP_MODE set to Percent or Amount and adjust the corresponding stoploss/takeprofit values.

Step 4: Choose your entry and exit strategies: Under HH_LL_LH_HL Settings, pick your Fractal Entry Strategy and Fractal Exit Strategy. For a simple trend-following setup, use ENTRY_STRATEGY1 with EXIT_STRATEGY0.

Step 5: Set stoploss and takeprofit mode: Decide whether you want fixed pips, a dollar amount, or a percentage of account equity. For most beginners, Amount mode with a $10 stoploss and $20 takeprofit is straightforward.

Step 6: Enable or disable hidden SL/TP: If you set HIDDEN_SL_TP to true, the EA manages stoploss and takeprofit internally without sending them to the broker — useful if your broker doesn't allow stops within a certain distance. Keep SHOW_HIDDEN_SL_TP_LINES true during testing so you can see the levels on the chart.

Step 7: Run a backtest first: Before going live, backtest on at least 6 months of data for your chosen pairs. Pay attention to drawdown and win rate — the fractal strategy works best in trending markets, so check if your backtest period includes strong trends.


4. RISK MANAGEMENT FEATURES

The EA offers several ways to control risk, from per-trade stops to group-level limits that protect your entire portfolio.

Feature Description
Per-Trade Stoploss & Takeprofit Set fixed stoploss and takeprofit in pips, account currency amount, or percent of equity. The SLTP_MODE input lets you choose which method to use. For example, set STOPLOSS_AMOUNT to 10 and TAKEPROFIT_AMOUNT to 20 for a 1:2 risk-reward ratio.
Group Stoploss & Takeprofit Limits total loss or profit across all open positions. If you set GROUP_STOPLOSS_AMOUNT to 50, the EA will close all trades when the combined loss reaches $50. Useful for multi-pair traders who want to cap daily or per-session drawdown.
Hidden SL/TP (Virtual Stops) When HIDDEN_SL_TP is true, the EA manages stops and targets internally without sending them to the broker. This prevents brokers from seeing your levels and potentially hunting them. The EA monitors price and closes the trade when the virtual level is hit.
Check for Opposite Close When enabled, the EA closes existing positions if an opposite signal appears. For example, if you're long EURUSD and a sell signal triggers, the EA closes the buy and opens a sell. This keeps you aligned with the current fractal structure.
Risk-Based Lot Sizing (Percent Mode) Set SLTP_MODE to Percent and define STOPLOSS_PERCENT (e.g., 1.0 for 1% risk per trade). The EA calculates lot size automatically based on your account equity and stop distance. Ideal for consistent risk management across different pairs.

5. IMPORTANT NOTES & WARNINGS

Known Limitations

Issue Explanation
Fractal Strategy Struggles in Ranging Markets The EA relies on clear HH/HL or LH/LL patterns. In sideways, choppy markets, fractals form frequently but breakouts often fail, leading to multiple small losses. Avoid using this EA during low-volatility sessions or on pairs that are range-bound.
Multi-Pair Risk Concentration If you trade correlated pairs (e.g., EURUSD and GBPUSD), the EA may open multiple positions that move in the same direction, amplifying drawdown. Use the group stoploss feature or limit the number of correlated pairs in your symbol list.
Hidden SL/TP Not Supported by All Brokers While the EA implements virtual stops, some brokers may still see market orders and react. Additionally, if the EA crashes or is removed, virtual stops are lost — the trade will remain open without protection. Always have a backup plan.
Backtest Dependency on Tick Data The fractal logic is sensitive to exact price levels. For accurate backtesting, use every tick mode with high-quality tick data. OHLC-only backtests may produce misleading results because they miss intra-bar fractal formations.
Scan Last N Bars Impact on Performance Setting Scan last N bars too high (e.g., 500+) increases CPU usage and may slow down the EA, especially on multiple pairs. Keep it between 30-100 for most setups. Higher values only help on very long-term charts like daily or weekly.

Settings Beginners Should NOT Change

Setting Why to Leave Default
Scan last N bars Default 50 is a good balance between responsiveness and stability. Lower values (e.g., 10) make the EA too sensitive to minor price swings; higher values (e.g., 200) make it slow to react. Stick with 50 until you understand how it affects signals.
HH_LL_LH_HL Timeframe Setting this to PERIOD_CURRENT means the EA uses the chart's timeframe. Beginners often accidentally set it to a very low timeframe like M1, causing excessive noise and false signals. Leave it on current or H1 for cleaner fractals.
Hidden SL/TP Settings Turning off HIDDEN_SL_TP sends real stop orders to the broker, which can be seen and potentially stopped out. Keep it true unless you fully understand the implications. Also, leave SHOW_HIDDEN_SL_TP_LINES true so you can see the levels.
Group Stoploss Amount Default 0 means no group stoploss. Beginners should set a small value like $20-$50 to cap total losses across all pairs. Without it, a string of losses on multiple pairs can quickly eat into your account.
Check for opposite close Default true ensures the EA closes positions when the trend reverses. Setting it to false means you could hold a losing trade while the market moves against you. Keep it enabled unless you have a specific reason to override.

Dashboard Usage Tips

  1. Start with one pair: Don't overload the EA with 10 pairs right away. Test on EURUSD or GBPUSD for a week to see how the fractal logic behaves in live conditions.
  2. Watch for news events: The EA doesn't filter by economic calendar. During high-impact news (NFP, CPI, central bank decisions), the fractal patterns can break violently. Consider disabling the EA or reducing lot sizes during those times.
  3. Use a demo account for at least 30 days: Fractal strategies can have long losing streaks in choppy markets. A month of demo trading helps you understand the EA's behavior before risking real money.
  4. Monitor the group stoploss: If you trade multiple pairs, check the group stoploss level regularly. A sudden market move can trigger it, closing all positions — which might be a good thing if it prevents a larger loss.
  5. Adjust scan bars based on timeframe: On H1, 50 bars covers about 2 days of data. On M15, 50 bars is only 12.5 hours. For lower timeframes, consider increasing scan bars to 100-150 to get enough fractal data.
  6. Don't mix entry strategies on the same chart: If you want both buy and sell signals, you'll need to run two instances of the EA on separate charts — one with ENTRY_STRATEGY1 and one with ENTRY_STRATEGY2. Running both on the same chart can cause conflicting orders.

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 in your MT4 or MT5 platform. It will appear in the Navigator panel under Expert Advisors.
  2. Attach to a chart: Drag the EA onto any currency pair chart (e.g., EURUSD M5).

    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