Cross EMA with Trend Filter

Cross EMA with Trend Filter is an arrow indicator that generates buy and sell signals when two exponential moving averages (EMA 9 and EMA 21) cross. The indicator features built-in trend filters (ADX or EMA slope), which significantly reduce the number of false signals in sideways (ranging) markets.

The indicator displays clear arrows on the chart:

  • 🔵 Green Up Arrow — Buy signal

  • 🔴 Red Down Arrow — Sell signal

Signals

Buy Signal

The fast EMA (9) crosses the slow EMA (21) from below to above provided that a strong trend is present.

Sell Signal

The fast EMA (9) crosses the slow EMA (21) from above to below provided that a strong trend is present.

Filter Conditions

  • ADX Filter: A signal is generated only when the ADX value is above the specified threshold (default 25)

  • EMA Slope Filter: A signal is generated only when the slow EMA has sufficient slope (alternative to ADX)

Parameters

Parameter Type Default Value Description
FastEMA int 9 Period of the fast exponential moving average
SlowEMA int 21 Period of the slow exponential moving average
ADXPeriod int 14 ADX calculation period
ADXThreshold int 25 Minimum ADX value to generate a signal (range 20–40)
UseADXFilter bool false Enable/disable ADX filtering
MinTrendStrength double 0 Minimum slope of EMA21 in pips (0 = filter disabled)

Configuration Recommendations

For Different Timeframes:

Timeframe ADXThreshold MinTrendStrength
M5 - M15 30-35 15-20
M30 - H1 25-30 25-30
H4 - D1 20-25 40-50

For Different Asset Types:

Asset ADXThreshold Note
Major FX pairs (EURUSD, GBPUSD) 25 Standard setting
Volatile pairs (GBPJPY) 30 Higher threshold = fewer signals
Metals (XAUUSD) 20 Gold often shows strong trends
Indices 25-30 Depends on volatility

Advantages

 Easy to use — clear arrows on the chart
 False signal filtering — works only in strong trends
 Flexible settings — can disable filters for scalping
 Versatility — suitable for any timeframe and instrument
 Optimized performance — fast calculation, does not overload the terminal

Disadvantages

❌ Does not work in sideways (ranging) markets — intentionally filtered out
❌ Lagging indicator — EMAs are trend-following by nature
❌ Requires confirmation from other indicators on lower timeframes

Usage Examples

Scenario 1: Trend Trading on H1

  1. Set  UseADXFilter = true ,  ADXThreshold = 25

  2. Wait for a green up arrow

  3. Open a BUY position

  4. Place stop loss below the nearest local low

  5. Take profit — 2–3 times the stop loss size

Scenario 2: Scalping on M5

  1. Set  UseADXFilter = false ,  MinTrendStrength = 0

  2. All EMA crossovers generate signals

  3. Use additional filters (volume, support/resistance levels)

How It Works

The indicator calculates EMA 9 and EMA 21 values on each bar. When a crossover occurs, it checks the trend strength:

  1. If ADX is enabled — checks whether ADX exceeds the specified threshold

  2. If EMA slope is enabled — checks how steep EMA21 is

  3. If both filters are disabled — a signal is generated on every crossover

Once trend strength is confirmed, an arrow appears on the chart.

Installation

  1. Download the  Cross_EMA_Arrows.ex4  file

  2. In MetaTrader 4, go to:  File → Open Data Folder → MQL4 → Indicators

  3. Copy the file to the  Indicators  folder

  4. Restart MetaTrader 4 or right-click in the Navigator →  Refresh

  5. Drag and drop the indicator onto the chart from the Navigator window

Frequently Asked Questions (FAQ)

Q: Why are there no arrows on the chart?
A: Possible reasons:

  • The ADX filter is rejecting signals (try lowering ADXThreshold)

  • The timeframe is too low (try H1 or higher)

  • The market is ranging (wait for a trend)

Q: Can I use this on tick charts?
A: Not recommended — too many false signals.

Q: Which broker works with this indicator?
A: Any broker that supports MetaTrader 4 with 5-digit quotes.

Q: Does the indicator repaint?
A: No, arrows are fixed on the current bar and do not change.


Yazarın diğer ürünleri
Bollinger Blade
Alfet Nigmatullin
Scalper's Blade - Bollinger Bands Scalping EA Overview Scalper's Blade   is a professional scalping Expert Advisor based on the classic Bollinger Bands strategy. The EA enters a position when the price crosses the upper or lower band and closes the trade with a fixed Stop Loss and Take Profit. Perfect for traders who prefer a mechanical approach with clear entry rules. Strategy Logic Signal Condition Action SELL Previous candle close > Upper Band & Current candle close < Upper Band Sell Ma
FREE
Detecting Stop Hunts at Key Levels Smart Money Stop Hunt Detector   is a powerful visual analysis tool designed to identify potential "stop hunt" zones orchestrated by large market participants. The indicator automatically displays significant price levels on the chart and signals when price "stops out" positions beyond these levels with a swift subsequent reversal. Core Concept Large market players (Smart Money) often intentionally push price beyond key support/resistance levels (round numbe
FREE
Bollinger Breakout with Stop-Loss Levels Description This indicator tracks breakouts of the upper and lower Bollinger Bands and automatically displays dynamic entry lines and stop-loss levels on the chart. The lines dynamically extend to the current candle, allowing visual tracking of signal relevance. Key Features 1.   Color Coding Upper Breakout (BLUE)   – buy signal (bullish breakout) Lower Breakout (RED)   – sell signal (bearish breakout) 2.   Dynamic Lines Breakout and stop-loss lines autom
FREE
Filtrele:
Değerlendirme yok
Değerlendirmeye yanıt