ATR Master Ea
- Experts
- Kuldeep Pradeep Nikam
- 버전: 2.0
- 업데이트됨: 20 2월 2026
ATR Master EA is a sophisticated, fully automated trend-following Expert Advisor designed for traders who want to capture significant market moves while maintaining strict risk control. This professional-grade trading system combines the reliability of Moving Average trend confirmation with the precision of ATR (Average True Range) based entries and dynamic position management.
===================
DM me for Set file
================
The EA is built on a solid foundation of technical analysis principles, using dual Moving Averages to identify the dominant trend direction and ATR to adapt all trading decisions to current market volatility. This volatility-adaptive approach ensures the EA performs consistently across different market conditions, automatically adjusting entry distances, position spacing, and trailing stops based on real-time market volatility.
Unlike simple grid or martingale systems that can expose accounts to catastrophic drawdowns, ATR Master EA employs a conservative position-building approach with strict stop losses on every trade. The system never averages down against the trend and closes all positions if the market shows signs of reversal, protecting your capital at all times.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 COMPREHENSIVE FEATURE LIST
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ DUAL MOVING AVERAGE TREND FILTER
The EA uses two Simple Moving Averages (SMA) with different periods to establish trend direction:
• Fast Moving Average (Default: 70 periods) - Responds quickly to price changes
• Slow Moving Average (Default: 180 periods) - Provides stable trend reference
The system requires the Fast MA to be consistently above (for uptrends) or below (for downtrends) the Slow MA for a specified number of bars (MPeriod parameter, default: 50 bars). This strict requirement filters out weak or uncertain trend conditions, ensuring the EA only trades when there is clear trend momentum.
This dual-MA filtering system dramatically reduces false signals and prevents the EA from entering trades during choppy, sideways markets where trend-following strategies typically suffer.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ ATR-BASED DYNAMIC ENTRIES
Instead of using fixed pip values that may work on one instrument but fail on another, ATR Master EA uses the Average True Range indicator to dynamically calculate all distances. The ATR measures market volatility by analyzing the true range of price movement over a 100-period lookback.
Entry Logic:
• BUY ENTRY: When uptrend is confirmed, the EA waits for price to pull back from the highest high of the period by Step × ATR value. This pullback entry ensures you're entering at a better price while the overall trend remains bullish.
• SELL ENTRY: When downtrend is confirmed, the EA waits for price to rally back from the lowest low of the period by Step × ATR value. This ensures short entries at elevated prices within a bearish trend.
Additional requirement: Price must be above the Slow MA for buys, below the Slow MA for sells. This provides an extra confirmation layer.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ INTELLIGENT POSITION BUILDING SYSTEM
ATR Master EA doesn't put all capital into a single position. Instead, it builds positions gradually as the trend confirms itself:
Position Building Rules:
• Maximum of 3 positions in the same direction
• Each additional position opened only when price moves favorably by Steps × ATR
• All additional positions require minimum pip distance (PipDistance parameter)
• Each position has its own individual stop loss
This approach offers several advantages:
1. Reduces entry timing risk by averaging into positions
2. Increases exposure as the trend proves itself
3. Maintains strict risk control with individual stop losses
4. Prevents overtrading with pip distance requirements
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ ADAPTIVE TRAILING STOP MECHANISM
Once all 3 positions are open, the EA activates its adaptive trailing stop system:
For BUY Positions:
• When price moves up by Step × ATR above the current stop level, all stops are raised
• Stops trail behind price maintaining Step × ATR distance
• If price reverses and drops below the lowest position entry by Steps × ATR, all positions are closed
For SELL Positions:
• When price moves down by Step × ATR below the current stop level, all stops are lowered
• Stops trail above price maintaining Step × ATR distance
• If price reverses and rises above the highest position entry by Steps × ATR, all positions are closed
This ATR-based trailing mechanism automatically adjusts to market conditions:
• In volatile markets: Wider trailing distance, avoiding premature exits
• In quiet markets: Tighter trailing distance, locking in profits efficiently
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ FOUR LOT SIZING METHODS
ATR Master EA provides four different money management approaches, allowing you to choose the method that best fits your trading style and risk tolerance:
▶ METHOD 1: FIXED LOT
The simplest approach - trade with a constant lot size regardless of account balance or market conditions.
• Best for: Traders who prefer consistent position sizes
• Parameter: Lots (default: 0.01)
▶ METHOD 2: RISK PERCENT OF BALANCE
Calculates lot size based on risking a specific percentage of your account balance per trade. The EA considers the stop loss distance and current pip value to determine the appropriate lot size.
• Best for: Professional risk management
• Parameters: RiskPercent (default: 1.0%), RiskStopLossPips (default: 100)
• Example: With $10,000 balance and 1% risk, you risk $100 per trade
▶ METHOD 3: BALANCE-BASED SCALING
Automatically increases lot size as your account grows. You specify how much balance should correspond to 0.01 lot.
• Best for: Compounding account growth
• Parameter: BalancePerLot (default: 10000)
• Example: With $20,000 balance and BalancePerLot=10000, lot size = 0.02
▶ METHOD 4: PROFIT STEP SCALING
Increases lot size after achieving profit milestones. Uses your starting balance as reference and steps up when profit reaches specified percentage.
• Best for: Prop firm challenges and aggressive compounding
• Parameters: StartingBalance (default: 500), ProfitStepPercent (default: 100%)
• Example: Start at $500 with 0.01, reach $1000 (+100%), lot increases to 0.02
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ COMPREHENSIVE RISK MANAGEMENT SYSTEM
ATR Master EA includes multiple layers of risk protection:
▶ MARGIN LEVEL PROTECTION
Before opening any new trade, the EA checks the account's margin level. If margin level falls below the specified threshold (default: 200%), no new trades are opened. This prevents margin calls and account blowouts during drawdown periods.
▶ MAXIMUM STOP LOSS CAP
While ATR-based stops provide adaptive protection, extreme volatility could result in very wide stops. The MaxStopLossPips parameter (default: 500 pips) ensures stop losses never exceed a reasonable distance, capping potential loss per trade.
▶ MINIMUM PIP DISTANCE BETWEEN TRADES
The PipDistance parameter (default: 500 pips) ensures adequate spacing between positions of the same type. This prevents the EA from clustering too many positions in a small price range, which would increase concentrated risk.
▶ FREE MARGIN VALIDATION
Before each trade, the EA calls OrderCalcMargin() to verify sufficient free margin exists to open the position. If free margin is insufficient, the trade is not executed and an alert is logged.
▶ LOT SIZE LIMITS
Both minimum (MinLotSize) and maximum (MaxLotSize) lot size limits are enforced. Additionally, lot sizes are validated against broker specifications (SYMBOL_VOLUME_MIN, SYMBOL_VOLUME_MAX, SYMBOL_VOLUME_STEP).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 COMPLETE TRADING STRATEGY EXPLANATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The ATR Master EA follows a systematic, rules-based trading approach. Here is the complete trading logic explained step by step:
▶ PHASE 1: TREND IDENTIFICATION
At the start of each new bar (no intra-bar trading to avoid noise), the EA evaluates trend conditions:
BUY Trend Conditions:
1. Fast MA (70) must be ABOVE Slow MA (180) for ALL of the last 50 bars (MPeriod)
2. Current Ask price must be ABOVE the Slow MA
3. No existing positions in either direction
SELL Trend Conditions:
1. Fast MA (70) must be BELOW Slow MA (180) for ALL of the last 50 bars (MPeriod)
2. Current Bid price must be BELOW the Slow MA
3. No existing positions in either direction
This strict multi-bar confirmation ensures only strong, established trends trigger entries.
▶ PHASE 2: PULLBACK ENTRY EXECUTION
Once trend conditions are met, the EA waits for an optimal entry point:
BUY Entry Execution:
• Identifies the highest high of the last MPeriod bars
• Calculates entry level = Highest High - (Step × ATR)
• When price drops to this level, opens first BUY position
• Stop loss placed at: Entry Price - (3 × Step × ATR), capped by MaxStopLossPips
SELL Entry Execution:
• Identifies the lowest low of the last MPeriod bars
• Calculates entry level = Lowest Low + (Step × ATR)
• When price rises to this level, opens first SELL position
• Stop loss placed at: Entry Price + (3 × Step × ATR), capped by MaxStopLossPips
▶ PHASE 3: POSITION BUILDING (1-3 POSITIONS)
After the initial position is opened, the EA monitors for opportunities to add positions:
Adding BUY Positions:
• If price rises Steps × ATR above highest open position → Add BUY
• If price drops Steps × ATR below lowest open position → Add BUY (scaling in on pullback)
• Must maintain PipDistance from all existing positions
• Maximum 3 BUY positions total
Adding SELL Positions:
• If price drops Steps × ATR below lowest open position → Add SELL
• If price rises Steps × ATR above highest open position → Add SELL (scaling in on rally)
• Must maintain PipDistance from all existing positions
• Maximum 3 SELL positions total
Each new position receives an independent stop loss calculated using the same formula.
▶ PHASE 4: ACTIVE TRADE MANAGEMENT (3 POSITIONS)
Once all 3 positions are open, the EA enters active management mode:
For 3 BUY Positions:
• Identifies the highest current stop loss among all positions
• When price exceeds this stop + Step × ATR, trails all stops higher
• All stops moved to: Current Price - (Step × ATR)
• EXIT CONDITION: If price drops below lowest entry - (Steps × ATR), close all positions
For 3 SELL Positions:
• Identifies the lowest current stop loss among all positions
• When price drops below this stop - Step × ATR, trails all stops lower
• All stops moved to: Current Price + (Step × ATR)
• EXIT CONDITION: If price rises above highest entry + (Steps × ATR), close all positions
