Join our fan page
- Views:
- 133
- Published:
- Updated:
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
This Expert Advisor is based on a classic Moving Average crossover strategy. A trade signal is generated when the fast moving average crosses the slow moving average, confirming a potential trend direction.
Buy signals occur when the fast MA crosses above the slow MA and the price closes above the fast MA.
Sell signals occur when the fast MA crosses below the slow MA and the price closes below the fast MA.An optional multi-timeframe moving average filter can be enabled to confirm the trend direction from a higher timeframe. This helps reduce false signals and improve trade quality.
🔹 Trade Logic & Interpretation
The EA operates on a new bar basis to reduce noise and avoid excessive trading.
• Bullish condition: Fast MA crosses above Slow MA with price confirmation
• Bearish condition: Fast MA crosses below Slow MA with price confirmationIf enabled, positions can be closed when the price crosses back over the fast MA, allowing dynamic exit management.
The system is trend-following and performs best in trending market conditions.
🔹 Input Parameters (External Variables)
MA Settings:
• mode_ma – Type of moving average (EMA, SMA, etc.)
• period_ma_fast – Fast MA period
• period_ma_slow – Slow MA period
• use_ma_filter – Enable/disable higher timeframe filter
• timeframe_ma_filter – Timeframe for filter MA
• period_ma_filter – Period of filter MARisk Management:
• takeProfit – Take Profit in pips (0 = disabled)
• stopLoss – Stop Loss in pips (0 = disabled)
• useFastMAexit – Enable exit on price crossing fast MA
• maxLotSize – Maximum lot size allowed
• minEquity – Minimum equity required to tradeTrading Settings:
• MagicNumber – Unique identifier for EA trades
🔹 Recommended Settings
The EA has been tested on:
• Symbol: EURUSD
• Timeframe: D1
• Fast MA: 100
• Slow MA: 200These settings showed stable performance with relatively low drawdown over long-term backtesting.
🔹 Purpose of the EA
This EA is designed as a template for traders and developers who want to:
• Learn algorithmic trading
• Test moving average strategies
• Build and customize their own trading systems
🔹 Disclaimer (ADD THIS — IMPORTANT)
⚠️ Trading involves risk. This EA is provided for educational purposes only and does not guarantee future results.
Liquidity Sweep H4 - M15 (Swing Highs and Lows) / MQL5
This Expert Advisor (EA) is designed to detect swing highs and lows on the H4 timeframe, then wait for sweeps (liquidity grabs) on the M15 timeframe to trigger buy/sell trades with defined risk management.
CRT Indicator(MTF) : Explorer
Multi-timeframe CRT Indicator(Explorer) that detects higher timeframe setups and projects CRH/CRL levels onto lower timeframe charts using Fibonacci objects for clear, real-time context.
Accelerator Oscillator (AC)
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
MACD Signals
Indicator edition for new platform.