Smart Hedging Armor
- Experts
- Versione: 3.0
- Aggiornato: 29 novembre 2026
- Attivazioni: 5
SMART HEDGING ARMOR V3.00
Advanced Range-Detection Hedging & Basket Recovery System for MT4
Smart Hedging Armor V3.00 is an advanced two-sided hedging and basket-management Expert Advisor designed for MetaTrader 4.
The system combines an original BUY/SELL hedging strategy with an enhanced market range-detection filter, controlled recovery logic, basket profit management, and three independently configurable GMT trading sessions.
Instead of opening a new trading cycle under any market condition, the EA first evaluates whether the market qualifies as a ranging environment. A new cycle is authorized only when the configured session and range conditions are satisfied.
The objective is to improve entry timing and manage BUY and SELL positions through a coordinated basket-management approach.
HOW DOES IT WORK?
1. Three GMT Trading Sessions
The EA includes three independent trading sessions based on GMT:
- Session 1: 01:30 – 06:30 GMT
- Session 2: 08:00 – 11:30 GMT
- Session 3: 17:00 – 20:00 GMT
Each session can be enabled or disabled independently, and its start and end times can be customized.
Overnight sessions are also supported.
The EA can start a new trading cycle only during an enabled session. If a cycle is already active, its existing positions continue to be managed outside the trading sessions.
2. Advanced Range Detection – V3.00 Core Feature
Before authorizing a new cycle, the EA evaluates market conditions using a multi-factor range-detection model.
The detector analyzes up to seven conditions:
- ADX: Checks whether trend strength is sufficiently low and whether ADX is flattening.
- Efficiency Ratio: Measures directional movement compared with total price movement.
- ATR-Based Range Measurement: Evaluates the price range relative to ATR.
- Moving Average Crossings: Measures how frequently price crosses the moving average.
- Moving Average Slope: Checks whether the moving average is relatively flat.
- Bollinger Band Width: Evaluates current band width against its recent average.
- Higher-Timeframe ADX: Optional confirmation using a higher timeframe, H1 by default.
A configurable minimum score, consecutive-bar confirmation, and ADX trend veto are used before a new cycle can be authorized.
The detected range can also be displayed on the chart.
Important: Range calculations use completed candles. The current market price is used to verify whether the entry is inside the permitted range zone.
3. Two-Sided Hedging Cycle
When the session and range conditions are satisfied, the EA starts a new cycle by opening a BUY and a SELL position.
Both sides are managed as part of the same trading strategy rather than relying on a single directional prediction.
4. Recovery and Position Management
When one side of the basket moves into an unfavorable position, the EA can add recovery positions according to its existing recovery rules.
The default recovery mode uses additive lot increments rather than unrestricted exponential multiplication.
The following settings help control exposure:
- Initial lot size
- Recovery lot increment
- Maximum lot threshold
- Maximum number of positions per side
- Broker margin and volume validation
Actual exposure depends on the selected settings, market movement, and available margin.
5. Basket Management and Exit Logic
The EA includes several basket-management methods:
- Configurable basket profit target.
- Optional basket loss threshold.
- Equity-based closing target.
- Selective partial closing of profitable and losing positions.
- Break-even-based exit with an additional price-distance target when only one position remains on a side.
The objective is to manage the overall basket rather than depend exclusively on individual trade exits.
KEY FEATURES
- Advanced two-sided hedging strategy.
- Multi-condition range detection.
- Closed-candle range calculations.
- ADX trend-strength filter and trend veto.
- Efficiency Ratio and ATR-based market analysis.
- Moving Average and Bollinger Band analysis.
- Optional higher-timeframe confirmation.
- Three independently configurable GMT sessions.
- Overnight session support.
- New-cycle authorization based on session and range conditions.
- Existing position management continues outside trading sessions.
- Additive recovery mode by default.
- Configurable basket profit and loss thresholds.
- Selective partial basket closing.
- Break-even and distance-based exit logic.
- Automatic initial lot calculation option.
- Broker volume and margin validation.
- On-chart account and trading information panel.
- Optional dark chart theme.
- Unique Magic Number for order identification.
RECOMMENDED SETUP
Platform: MetaTrader 4 (MT4)
Recommended timeframe: M5
Trading style: Hedging and basket recovery
Account type: Hedging-capable MT4 account
Broker: A broker with competitive spreads and reliable execution
Execution: A VPS is recommended for continuous operation.
The EA can be attached to supported trading symbols. However, settings should be adjusted and tested separately for each symbol because volatility, spread, contract specifications, and margin requirements differ.
Capital and Risk Considerations
There is no universal minimum balance suitable for every symbol and configuration.
The required capital depends on initial lot size, recovery increments, maximum position count, leverage, margin requirements, and the market conditions in which the EA operates.
Use sufficient free margin and conservative settings. A larger capital reserve may be necessary when multiple recovery positions are open simultaneously.
INPUTS AND SETTINGS
MONEY MANAGEMENT
Lot1 = 0.01
Fixed starting lot for a new cycle when Auto_Lots is disabled.
Auto_Lots = false
Enables or disables automatic initial lot calculation.
MaxRisk = 0.01
Sizing factor used when Auto_Lots is enabled. The calculation is based on account balance, not a guaranteed percentage of maximum trade loss.
Lots = 0.01
Additive recovery increment and scale factor used by some internal basket targets.
Max_Lots = 0.1
Recovery lot-growth threshold. This setting influences when the recovery lot increment stops being applied. It should not be interpreted as an absolute hard cap on every calculated recovery order.
Max_Open = 100
Maximum number of positions permitted on each side, subject also to broker and account order limits.
Multiple_Total = 3
Controls the recovery-stage transition.
Continuous_trading = true
- true: The EA can continue starting new cycles when the required conditions are met.
- false: The EA removes itself after the current cycle has been closed.
BASKET EXITS
win_USD = 0.5
Closes the basket when its net floating profit reaches the specified amount in the account currency.
Set to 0 to disable this target and use the internal fallback profit condition.
Loss_USD = 0
Optional basket loss threshold.
Set to 0 to disable this condition.
TakeProfit = 25
Distance in points used by the recovery-entry logic and the break-even-based exit calculation.
StopLoss = 0
Individual position stop-loss distance in points.
Set to 0 to disable individual stop loss.
GMT TRADING SESSIONS
Enable_Session_1 = true
Session_1_Start = "01:30"
Session_1_End = "06:30"
Enable_Session_2 = true
Session_2_Start = "08:00"
Session_2_End = "11:30"
Enable_Session_3 = true
Session_3_Start = "17:00"
Session_3_End = "20:00"
All session times use the GMT clock and the HH:MM format.
Each session can be configured independently. An end time earlier than its start time represents an overnight session.
RANGE DETECTOR SETTINGS
Use_Range_Filter = true
Enables or disables range authorization for new cycles.
Range_TF = PERIOD_CURRENT
Timeframe used for range calculations.
Range_Bars = 30
Lookback period for range measurements and moving-average crossings.
ADX_Period = 14
ADX calculation period.
ADX_Max = 22.0
Maximum ADX level for the low-trend-strength condition.
ADX_Veto = 30.0
Hard trend veto. A new cycle is not authorized when ADX reaches or exceeds this level.
ER_Bars = 20
Efficiency Ratio lookback period.
ER_Max = 0.30
Maximum Efficiency Ratio threshold. Lower values impose a stricter condition.
Box_ATR_Max = 8.0
Maximum permitted range-box height relative to ATR.
MA_Period = 20
Moving Average period.
Min_Crosses = 4
Minimum number of price crossings around the Moving Average.
Slope_Bars = 10
Lookback period for measuring Moving Average slope.
Slope_ATR_Max = 1.5
Maximum permitted Moving Average slope relative to ATR.
BBW_Ratio_Max = 1.15
Maximum ratio of current Bollinger Band width to its sampled recent average.
Use_HTF_Filter = true
Enables higher-timeframe ADX confirmation.
HTF = PERIOD_H1
Higher timeframe used for confirmation.
HTF_ADX_Max = 25.0
Maximum higher-timeframe ADX threshold.
Min_Score = 5
Minimum required range score. The detector uses six conditions without the higher-timeframe filter and seven when it is enabled.
Confirm_Bars = 3
Number of consecutive completed bars required to confirm the range conditions.
Zone_Low_Pct = 0.25
Lower boundary of the permitted entry zone within the detected range.
Zone_High_Pct = 0.75
Upper boundary of the permitted entry zone within the detected range.
Cooldown_Bars = 3
Number of range-timeframe bars to wait after a cycle closes before authorizing another cycle.
Show_Range_Box = true
Displays the detected range box on the chart.
IDENTIFICATION AND DISPLAY
MagicNumber = 2027
Unique identifier for the EA's orders. Use a different number for each chart instance trading the same symbol.
TradeComment = "Smart Hedging Armor"
Order comment.
ChartStyle = true
Applies the optional dark chart theme.
ShowPanel = true
Displays the information panel.
ON-CHART DASHBOARD
The dashboard displays important account and EA information, including:
- Account Balance
- Account Equity
- Equity target
- Floating basket profit
- Daily profit
- Weekly profit
- Monthly profit
- GMT time
- Broker time
- Range detector status and score
- GMT session status
- Current spread
- Drawdown reading
- Trading symbol and timeframe
IMPORTANT RISK DISCLOSURE
Smart Hedging Armor is an advanced hedging and recovery Expert Advisor. It does not guarantee profits or eliminate trading risk.
Please understand the following:
- Hedging and recovery strategies can accumulate multiple simultaneous positions.
- Strong directional market movements may cause significant floating losses.
- Recovery entries can increase total market exposure.
- The maximum position count and recovery settings must be selected carefully.
- The Max_Lots setting is a recovery growth threshold, not a guaranteed absolute exposure limit.
- StopLoss is disabled by default. Consider configuring individual stop losses or a basket loss threshold appropriate to your account.
- A basket may remain open for an extended period during unfavorable market conditions.
- High leverage does not eliminate margin-call risk.
- Always perform extensive Strategy Tester and demo forward testing before using a live account.
- Results can vary significantly between brokers because of spread, execution, commission, swap, and contract specifications.
- Past or simulated performance does not guarantee future results.
Use this Expert Advisor responsibly and at your own risk.
WHY CONSIDER SMART HEDGING ARMOR V3.00?
- Range-based authorization before starting new cycles.
- Three configurable GMT trading sessions.
- Two-sided basket management.
- Multiple market-condition filters.
- Recovery logic with configurable exposure settings.
- Selective basket closing methods.
- Continuous management of active cycles outside trading sessions.
- Transparent on-chart information.
Smart Hedging Armor V3.00 combines market-condition analysis with an established hedging and basket-management approach, giving traders configurable tools to manage their own trading strategy.
SUPPORT
For questions about installation, settings, symbol selection, or configuration, please contact me through the MQL5 messaging system.
I will be glad to assist with technical support and configuration guidance.
Thank you for your interest in Smart Hedging Armor V3.00.

