ATR Trade Assistant

Dynamic Volatility-Based Trade Management for MetaTrader 5

ATR Trade Assistant is a dynamic trade-management Expert Advisor for MetaTrader 5, designed to manage a trade from the moment of entry through to its final exit.

Whether you prefer to enter trades manually using the custom BUY and SELL buttons directly on your trading chart, or use the included Sample Strategy for automated entries, ATR Trade Assistant provides a complete volatility-based framework for position sizing, initial Stop Loss, Take Profit, trailing-stop management, and partial profit taking.

The core philosophy is simple:

Let market volatility determine how the trade should be managed.

Instead of relying exclusively on fixed distances, the EA uses ATR-based calculations throughout its trade-management engine. This allows protective levels, position sizing and trailing behaviour to adapt to changing market conditions.

KEY FEATURES

Manual Trading From the Chart

ATR Trade Assistant includes dedicated on-chart BUY and SELL buttons, allowing traders to initiate positions directly from the trading canvas.

Once a trade is opened, the EA can automatically take over the management process according to the selected settings.

Depending on your configuration, the EA can manage:

  • Initial Stop Loss

  • Initial Take Profit

  • Position sizing

  • ATR-based trailing stops

  • Progressive trailing-stop reduction

  • Partial Take Profit

  • Volatility-based position adjustments

  • Automated Sample Strategy entries

This makes the EA suitable for traders who want to control their own entries while automating the repetitive aspects of trade management.

FULL ATR-BASED TRADE MANAGEMENT

ATR Trade Assistant is built around the Average True Range (ATR) as a core volatility measurement.

Initial protective levels can be calculated from the current ATR rather than using a fixed number of points or pips.

For example:

If Gold has a current ATR value of $3.00:

  • Stop Loss Multiplier = 2.0

  • Initial Stop Loss distance = $6.00

With:

  • Take Profit Multiplier = 4.0

  • Initial Take Profit distance = $12.00

This creates a 1:2 initial risk-to-reward relationship based on the selected ATR multipliers.

The same volatility-aware philosophy continues into the trailing and position-sizing engines.

DYNAMIC POSITION SIZING

ATR Trade Assistant provides multiple lot-sizing methods so traders can choose how position volume is calculated.

Available modes include:

LOT_FIXED

Uses a fixed transaction volume for every trade.

LOT_DYNAMIC_COMPLEMENT

A dynamic low-balance mode designed to adapt transaction volume according to available account balance and margin requirements.

LOT_DYNAMIC_VOLATILITY

The recommended volatility-based sizing mode.

This mode adjusts calculated position volume according to changes in market volatility. When volatility expands, the sizing model can increase the calculated exposure according to the configured expansion factor. When volatility contracts, the model can reduce calculated exposure according to the configured contraction factor.

LOT_DYNAMIC_RISK

Calculates the required position volume according to the configured percentage risk and Stop Loss distance.

This allows traders to establish a consistent risk model where position volume is determined by the relationship between account equity, risk percentage and Stop Loss distance.

THREE TRAILING-STOP MANAGEMENT MODES

ATR Trade Assistant includes three different trailing approaches.

1. STEP REDUCTION

A progressive ATR-based trailing system.

The trailing engine begins after the configured activation milestone is reached and progressively reduces the trailing multiplier as the trade moves further into profit.

This allows the trade to retain more breathing room during the early stages of the move while progressively tightening protection as additional profit milestones are achieved.

A configurable minimum multiplier prevents the trailing distance from being reduced below the defined floor.

2. STANDARD ATR TRAILING

A conventional ATR-based trailing mechanism.

Once the configured activation threshold has been reached, the Stop Loss follows the market using a volatility-based buffer.

This provides a straightforward way to keep the protective stop dynamically aligned with current market conditions.

3. AGGRESSIVE ATR TRAILING

Designed for traders who want the protective Stop Loss to begin following the market very quickly.

The aggressive mode activates immediately according to its configured logic and maintains an ATR-based buffer around the current market price.

This mode can be useful when capital protection is prioritised over allowing a larger pullback.

PROGRESSIVE STEP-REDUCTION ENGINE

The Step Reduction system gives traders control over how aggressively a winning trade is protected.

You can configure:

  • The profit level at which trailing begins

  • The initial ATR trailing multiplier

  • The amount the multiplier is reduced at each step

  • The ATR distance between profit steps

  • The minimum trailing multiplier allowed

For example, with:

  • Activation = 1.5 ATR

  • Start Multiplier = 1.4

  • Step Reduction = 0.2

  • Step Size = 1.5 ATR

  • Minimum Multiplier = 1.2

the EA can progressively tighten the trailing distance as the position reaches successive profit milestones while respecting the configured minimum trailing buffer.

AUTOMATED 50% PARTIAL TAKE PROFIT

ATR Trade Assistant can automatically reduce an open position by 50% once the configured partial-profit milestone is reached.

The milestone is calculated as a percentage of the original Take Profit target.

For example:

If the Take Profit target is 4 ATR and the Partial Profit Factor is 0.5, the EA will target the halfway point of the original Take Profit distance for the partial close.

This allows traders to:

  • Secure a portion of the position's profit

  • Reduce remaining exposure

  • Continue allowing the remaining position to participate in a larger market move

  • Combine partial profit taking with the ATR trailing engine

The feature can be enabled or disabled independently.

INCLUDED SAMPLE STRATEGY

ATR Trade Assistant also includes a built-in Sample Strategy that can be used for:

  • Strategy Tester experimentation

  • Automated trading

  • Demonstrating the EA's trade-management capabilities

  • Testing the integrated internal indicator calculations

The Sample Strategy uses a combination of trend, momentum and money-flow conditions.

EMA Trend Structure

The strategy uses a faster EMA reference together with a longer-term trend filter.

The default 200 EMA acts as the primary directional filter:

  • Price above the 200 EMA → Buy setups permitted

  • Price below the 200 EMA → Sell setups permitted

This is intended to reduce trades taken against the prevailing directional structure.

Volume Momentum Delta

The internal VMD calculation provides an additional confirmation layer for volume and momentum behaviour.

Money Flow Index

The MFI component provides an additional money-flow confirmation condition before a setup is considered valid.

Adaptive Spread Protection

The Sample Strategy includes an automatic spread-management option.

When enabled, the EA can adapt the spread ceiling according to broker/server parameters and market characteristics.

A manual fallback spread limit is also available.

NO iCUSTOM DEPENDENCY

The Sample Strategy's required custom indicator calculations are embedded directly inside the EA.

The EA does not require separate external custom-indicator files to perform these calculations through iCustom() calls.

This simplifies deployment and helps keep the complete strategy calculation framework contained within the Expert Advisor.

MANUAL OR AUTOMATED OPERATION

ATR Trade Assistant can be configured according to your preferred workflow.

Manual Mode

Disable the Sample Strategy and use the on-chart BUY/SELL buttons to initiate trades manually.

The EA then provides automated trade management according to your selected ATR settings.

Automated Mode

Enable the Sample Strategy and allow the integrated strategy engine to identify and execute trades according to its internal conditions.

The same trade-management framework can then manage those positions.

Hybrid Workflow

The EA can also be used as a trade-management assistant while the trader retains control over manual entries, with automated strategy functionality available when required.

DESIGNED FOR FLEXIBLE MARKET CONDITIONS

Because the core trade-management calculations are volatility-aware, the EA is designed to avoid relying exclusively on static distances.

The ATR framework can adapt to changes in the market's current trading range, making the management parameters more responsive than a purely fixed-point approach.

The EA can therefore be configured for different trading styles, instruments and volatility environments by adjusting the available parameters.

IMPORTANT RISK NOTICE

ATR Trade Assistant is a trading tool and does not guarantee profits.

Financial markets involve substantial risk, and automated or semi-automated trading can result in losses. Position sizing and risk parameters should be selected carefully and tested under the conditions of your chosen broker, symbol and account.

Always perform your own testing and optimisation before using the EA with real funds.

Past performance and Strategy Tester results do not guarantee future results.

INPUT PARAMETER MANUAL

INITIAL TRADE SETTINGS

Stop Loss ATR Multiplier ( InpStopLossAtrMult )

Default: 2.0

Sets the distance of the initial protective Stop Loss using the current ATR value.

For example, if the current ATR on Gold is $3.00 and the multiplier is 2.0, the initial Stop Loss distance is calculated as $6.00 from the entry price.

Take Profit ATR Multiplier ( InpTakeProfitAtrMult )

Default: 4.0

Sets the initial Take Profit distance using the current ATR value.

For example, with an ATR of $3.00 and a multiplier of 4.0, the Take Profit distance is calculated as $12.00 from the entry price.

With the default Stop Loss and Take Profit multipliers, the initial target structure is 1:2 risk-to-reward.

RISK & LOT SIZING SETTINGS

Lot Sizing Method ( InpLotMethod )

Default: LOT_DYNAMIC_VOLATILITY

Selects the position-volume calculation method.

Available choices:

LOT_FIXED
Uses a fixed lot size for every trade.

LOT_DYNAMIC_COMPLEMENT
Dynamic low-balance sizing mode that adjusts exposure according to account balance and margin requirements.

LOT_DYNAMIC_VOLATILITY
Recommended volatility-based sizing method. Adjusts calculated position volume according to changes in market volatility.

LOT_DYNAMIC_RISK
Calculates position volume according to the configured account risk percentage and Stop Loss distance.

Fixed Lot Size ( InpLotSize )

Default: 0.01

Defines the fixed position volume when LOT_FIXED is selected.

It can also serve as the baseline starting lot size for configurations where a minimum/base volume is required.

Risk % Per Trade ( InpRiskPercent )

Default: 1.0

Defines the percentage of account equity used by the risk-based position-sizing model for an individual trade.

Volatility Expansion Factor ( InpVolUpMultiplier )

Default: 1.25

Used by LOT_DYNAMIC_VOLATILITY .

When the engine detects expanding ATR conditions, this factor adjusts the calculated risk/volume model according to the configured value.

Volatility Contraction Factor ( InpVolDownMultiplier )

Default: 0.75

Used by LOT_DYNAMIC_VOLATILITY .

When the engine detects contracting volatility, this factor reduces the calculated volume according to the configured value.

Volatility Sizing ATR Period ( InpVolATRPeriod )

Default: 14

Defines the ATR lookback period used by the volatility-sizing engine to evaluate changes in market volatility.

GLOBAL TRAILING CONTROLS

Trailing Method ( InpTrailingMethod )

Default: TRAIL_STEP_REDUCTION

Selects the active trailing-stop algorithm.

Available choices:

TRAIL_STEP_REDUCTION
Progressively reduces the ATR trailing multiplier as the position reaches additional profit milestones.

TRAIL_STANDARD_ATR
Maintains an ATR-based trailing distance from the current market price.

TRAIL_AGGRESSIVE_ATR
Uses an aggressive trailing approach designed to begin protecting a position very quickly.

Enable Trailing Engine ( InpUseTrailing )

Default: true

Enables or disables the background trailing-stop management engine.

ATR Engine Lookback Period ( InpAtrRiskPeriod )

Default: 14

Defines the ATR lookback period used to calculate the volatility buffer for the Standard and Aggressive ATR trailing mechanisms.

STEP REDUCTION PARAMETERS

Activation Milestone ( InpTrailingActivation )

Default: 1.5

Defines the minimum profit distance, measured in ATR multiples, required before the Step Reduction trailing engine activates.

Start Factor ( InpStartMultiplier )

Default: 1.4

Defines the initial ATR trailing multiplier used when Step Reduction first becomes active.

Step Factor ( InpTrailingStep )

Default: 0.2

Defines how much the trailing multiplier is reduced at each new profit step.

A larger value results in faster tightening of the trailing distance.

Profit Step Interval ( InpStepSizeATR )

Default: 1.5

Defines the additional profit distance, measured in ATR multiples, required before another trailing reduction step is triggered.

Max Cap / Minimum Multiplier Floor ( InpMaxCapMultiplier )

Default: 1.2

Defines the minimum trailing multiplier allowed by the Step Reduction engine.

This prevents the trailing distance from being reduced below the configured floor.

STANDARD & AGGRESSIVE TRAILING PARAMETERS

Standard Mode Activation ATR Multiple ( InpTrailingStartMult )

Default: 1.5

Defines the profit distance, measured in ATR multiples, required before Standard ATR Trailing activates.

This parameter is not used for the immediate activation behaviour of Aggressive Mode.

Step Factor ATR Multiple ( InpTrailingStepMult )

Default: 1.5

Defines the ATR-based volatility buffer maintained between the current market price and the trailing Stop Loss for the applicable trailing modes.

SAMPLE STRATEGY SETTINGS

Enable Sample Strategy Execution ( InpEnableSampleStrategy )

Default: true

Enables or disables the integrated automated Sample Strategy.

Disable this option when using ATR Trade Assistant exclusively as a manual trade-management assistant with the on-chart BUY/SELL buttons.

Internal EMA Reference Filter Period ( InpEmaPeriod )

Default: 20

Defines the faster EMA calculation used by the Sample Strategy as part of its signal-generation process.

Macro Trend Filter EMA ( InpEmaFilterPeriod )

Default: 200

Defines the primary trend-filter EMA.

By default:

  • Price above the EMA → Buy direction permitted

  • Price below the EMA → Sell direction permitted

This provides the Sample Strategy with a higher-timeframe-style directional filter based on the selected chart data.

VMD Smoothing Period ( InpVmdPeriod )

Default: 14

Defines the calculation period used by the internal Volume Momentum Distribution component.

This provides an additional volume/momentum confirmation layer within the Sample Strategy.

MFI Evaluation Period ( InpMfiPeriod )

Default: 14

Defines the calculation period used by the internal Money Flow Index component.

The MFI calculation provides an additional money-flow confirmation condition for the Sample Strategy.

Auto-Adjust Spread Ceiling ( InpAutoAdjustSpread )

Default: true

Enables adaptive spread-limit handling.

When enabled, the EA can automatically determine an appropriate spread ceiling based on available broker/server information and market characteristics.

This is particularly useful when working with instruments such as indices, cryptocurrencies and metals where spread behaviour can differ significantly from traditional FX pairs.

Fallback Max Allowed Spread ( InpMaxSpreadPips )

Default: 15

Defines the manual maximum spread limit used when automatic spread adjustment is disabled.

Sample Strategy Magic Number ( InpMagicNumber )

Default: 123456

Defines the Magic Number assigned to trades generated by the automated Sample Strategy.

This allows automated trades to be identified separately from manually initiated positions and other Expert Advisors operating on the same account.

PARTIAL TAKE PROFIT SETTINGS

Enable 50% Partial Take Profit ( InpUsePartialTP )

Default: true

Enables or disables the automatic partial position-closing engine.

When enabled, the EA closes 50% of the eligible position volume when the configured partial-profit milestone is reached.

Milestone Target ( InpPartialProfitFactor )

Default: 0.5

Defines the point at which the partial close is triggered as a proportion of the original Take Profit distance.

For example, a value of 0.5 means the partial Take Profit milestone is reached when price has travelled 50% of the distance toward the original Take Profit target.

WHY ATR TRADE ASSISTANT?

ATR Trade Assistant combines several important components into one integrated MetaTrader 5 Expert Advisor:

✓ Manual BUY/SELL chart controls
✓ Automated Sample Strategy
✓ ATR-based Stop Loss
✓ ATR-based Take Profit
✓ Multiple position-sizing methods
✓ Risk-based position sizing
✓ Dynamic volatility-based sizing
✓ Volatility expansion/contraction adjustments
✓ Three trailing-stop algorithms
✓ Progressive Step Reduction trailing
✓ Standard ATR trailing
✓ Aggressive ATR trailing
✓ Automatic 50% Partial Take Profit
✓ EMA trend filtering
✓ VMD confirmation
✓ MFI confirmation
✓ Adaptive spread management
✓ Configurable Magic Number
✓ Internally embedded indicator calculations
✓ No external iCustom() indicator dependency

ATR Trade Assistant is built to give the trader control over entries while providing a systematic, configurable and volatility-aware framework for managing the trade from entry to exit.

Test. Configure. Optimize. Trade with a defined management framework.

More from author
Anchored VWAP for MT5
Rowan Stephan Buys
5 (2)
Anchored VWAP (AVWAP) for MT5 Take your chart analysis to the next level with Anchored VWAP for MT5 , a powerful and flexible tool designed for traders who want precise, fast, and clear visualization of key price levels . This indicator brings institutional-style VWAP analysis to your charts, similar to the functionality available on TradingView, but fully optimized for MT5. Key Features Multiple Anchors per Chart: Add as many AVWAP lines as needed, each with a unique start date and time. Custom
FREE
Anchored VWAP (AVWAP) with Standard Deviation Bands – MT5 Elevate your trading precision with Anchored VWAP enhanced by dynamic Standard Deviation Bands . Designed for traders who demand speed, clarity, and actionable insights , this indicator brings professional-grade VWAP analysis directly to your MT5 charts, helping you identify key levels and high-probability setups instantly. Key Features Multiple Anchors: Add as many AVWAP lines as you need, each with fully customizable start dates and tim
FREE
Hull Moving Average or HMA for MT5 – Fast, Smooth, Zero-Lag Trend Indicator Take your trading to the next level with the Hull Moving Average (HMA) —an ultra-responsive, zero-lag trend indicator for MetaTrader 5. Unlike SMA, EMA, or WMA, the HMA reacts instantly to market direction while filtering out noise, giving you clean, actionable signals for scalping, intraday, or swing trading. Built with a high-performance Weighted Moving Average engine, it calculates the true Alan Hull formula and outpu
FREE
Moving Average Crossover with RSI EA — A Clean, Reliable Trend System for MT4 Looking for a disciplined, high-quality trend-following EA that just works — without unnecessary complexity? The MA Crossover + RSI EA combines classic moving average crossovers with momentum confirmation to deliver precise entries, reduced false signals, and fully automated execution across any symbol or timeframe. Why Traders Choose This EA 1️⃣ Precision Trend Entries Detects trend shifts using fast and slow Mo
AVWAP Sniper
Rowan Stephan Buys
AVWAP Sniper – Precision Intraday EA with Anchored VWAP & MFI Filters Capture high-probability trades with discipline and precision. AVWAP Sniper combines Anchored VWAP levels, Moving Average trends, and Money Flow Index signals to identify setups with high probability while managing risk effectively. Perfect for intraday trading, but flexible enough for swing setups. Key Features Single Trade per Signal: Avoid overexposure by executing only one trade per confirmed setup. Anchored VWAP Precisio
AVWAP Machine Gun
Rowan Stephan Buys
AVWAP Machine Gun – Multi-Entry Momentum EA with Anchored VWAP & MFI Filters Capture momentum like a machine gun. AVWAP Machine Gun combines the precision of Anchored VWAP, Moving Average trend filters, and Money Flow Index (MFI) confirmation with ATR-based risk management to deliver a high-probability, multi-entry trading engine. This EA is designed for traders who want to scale into strong moves without missing key opportunities , opening multiple trades per bar when momentum aligns with insti
AVWAP Bands Scalper
Rowan Stephan Buys
AVWAP Bands Scalper – Precision 1:2 Risk-Reward Scalping EA Unlock the power of precise, automated scalping with the AVWAP Bands Scalper. Designed for intraday traders, this fully automated Expert Advisor leverages Anchored VWAP (AVWAP) with custom standard deviation bands to identify high-probability buy and sell opportunities, delivering speed, accuracy, and consistency. Get Started Download the free visual indicator for reference: Anchored VWAP with STD Deviation Bands Configure the EA’s anc
Moving Average Surfer
Rowan Stephan Buys
Moving Average Surfer – Precision Trend Capture for MT5 Ride the market waves with confidence using Moving Average Surfer , a fully automated trend-following EA designed for traders who value precision, efficiency, and smart risk management. Combining fast and slow moving average signals with an integrated RSI filter, this EA identifies high-probability trades while keeping risk under control. Key Features Dual Moving Average Analysis Detect trend shifts with a fast MA crossing a slower MA. Flex
HMA Crossover
Rowan Stephan Buys
Hull Moving Average Crossover EA – MT5 Harness the speed and precision of the Hull Moving Average (HMA) in a fully automated trend-following system for MetaTrader 5. The Hull Moving Average Crossover EA is designed for traders who want fast reaction to emerging trends without sacrificing structured risk control. By combining a user-defined fast HMA with a slower HMA, the EA identifies potential momentum shifts early — while managing risk dynamically through ATR-based protection. Built for clari
Phoenix Fury
Rowan Stephan Buys
PHOENIX FURY GOLD SCALPER PRO (M5) Capturing Institutional Momentum via Volatility Pullbacks. Most retail trading robots fail on Gold because they rely on hardcoded point/pip values, static moving averages, and delayed indicators. Phoenix Fury Gold Scalper Pro is completely different. It uses a fully closed, independent, zero-lag mathematical calculation engine designed to exploit intra-day liquidity extensions with pinpoint accuracy. By combining structural anchors, smooth trend tracking, geom
Short Description: A high-performance volume sentiment oscillator that decodes candle geometry to reveal hidden buying and selling pressure. Ideal for spotting market absorption, exhaustion, divergence and trend continuation. Full Description: The Volume Momentum Delta indicator is designed for traders who need to see beyond standard price bars. While most volume indicators show total activity, Volume Momentum Delta breaks every candle down into its "Buyer" and "Seller" components using advance
Wizard of Gold
Rowan Stephan Buys
‍️ Wizard of Gold (M3) — Precision Intraday Volatility Engine Follow live trading signals for this Expert Advisor Wizard of Gold is a high-performance algorithmic trading system engineered exclusively for XAUUSD (Gold) on the M3 timeframe . Built for speed, precision, and adaptability, this Expert Advisor operates within a dynamic volatility framework—continuously adjusting exposure, filtering conditions, and execution logic in real time to match the fast-moving nature of the gold market.
Filter:
No reviews
Reply to review