Independent market intelligence
Research over noise · Risk before return
Forex · Strategy research

MACD and RSI on EUR/USD H1 with an EMA200 filter

Do two extra filters improve a MACD crossover after costs? Three EUR/USD H1 accounts use the same position sizing and exits. We vary the entry filters and compare the full history with a separately initialized later period.

In simple terms

Over the full period, MACD alone returned −24.14%, MACD with EMA200 returned −19.78%, and the version with both filters returned −16.59%. In the later slice, MACD alone had the smallest loss at −5.02%. The full combination returned −6.34% there.

Contents
01

Three versions of one crossover

The base version uses a zero-line cross in the MACD histogram to signal entry. The second also checks which side of EMA200 the close is on. The third adds RSI14. All three use the same quotes, risk sizing, execution and exits.

02

The quote history

The test runs from 1 January 2021 to 1 October 2026 at 00:00 UTC, with November and December 2020 for warm-up. The 71 HistData archives contain 139,954,951 paired quotes. The fixed EST timestamps move forward 5 hours to UTC. Four hours with ambiguous clock order were excluded. The input contains 35,986 observed H1 bars, including warm-up and the end boundary. Gaps remain gaps.

03

The MACD calculation

C is the midpoint of the last paired Bid and Ask in each completed H1 bar. EMA(n) uses weight 2/(n+1), seeded by its first input. The MACD line is the difference between EMA12 and EMA26. Its signal line is EMA9 of MACD. The histogram is the difference between those two lines.

C = (Bid_close + Ask_close) / 2
MACD = EMA12(C) − EMA26(C)
H = MACD − EMA9(MACD)

04

What counts as a crossover?

Use two adjacent completed H1 bars. A move from H ≤ 0 to H > 0 is a long signal. A move from H ≥ 0 to H < 0 is a short signal. The entry decision is made once at the signal close. If a filter rejects it, the strategy waits for a fresh cross.

05

What the filters require

EMA200 is calculated from C. Longs require C above it, shorts require C below it. In the full version RSI14 must also be above 50 for longs or below 50 for shorts. Equality fails the relevant filter. RSI averages gains and losses with Wilder smoothing and a 14-change seed. When both averages are zero, RSI is 50.

s = +1 → C > EMA200(C) ∧ RSI14 > 50
s = −1 → C < EMA200(C) ∧ RSI14 < 50
RSI14 = 100 × RMA14(gain) / [RMA14(gain) + RMA14(loss)]

06

The first quote after the signal

If no position is open, schedule one order for the following H1 interval. Use the first paired quote in that hour if it arrives in under 5 minutes. The order expires if the hour is missing or its first quote is late. For a long position, enter at Ask and exit at Bid. For a short position, enter at Bid and exit at Ask. Apply adverse slippage at both fills.

07

Size and initial price risk

Each case starts with 10,000 USD. The stop distance is 2 × Wilder ATR14 from completed Bid H1 bars. Size targets 0.5% of equity at that price distance and caps the entry notional at 1× equity. The stop is measured from the modeled entry fill. Actual loss can exceed the target after a gap or delayed exit.

D = 2 × ATR14(Bid)
Q_EUR = min(0.005 × Equity_USD / D, Equity_USD / P_entry)
Stop = P_entry − side × D · side ∈ {+1, −1}

08

The same exits for all three

A Bid close at or below the stop for a long, or an Ask close at or above it for a short, queues an exit. An opposite MACD cross also queues an exit. Stop has priority when both occur. Use the next observed opening quote. A limit of 24 clock hours from the entry hour's UTC start exits at the first observed H1 open at or after the limit. A remaining position closes at the test boundary. There is no immediate reversal.

09

Spread, slippage and rollover

The spread comes from the observed quotes. Base costs add 0.35 pip commission and 0.15 pip adverse slippage per fill. The modeled rollover is 0.50 pip per unit at 17:00 New York time, with three units on Wednesday and one on other weekdays. The historical account swap rates and holiday adjustments are outside this model.

USD · Full period
CaseObserved spreadCommissionSlippageModeled rollover
MACD only765.55788.18337.79367.98
MACD + EMA200626.32667.16285.93304.52
MACD + EMA200 + RSI14526.92590.46253.05270.81
10

Results over the full period

All three variants lost money after base costs. Equity drawdown uses opening and closing liquidation-side quotes and booked costs. Net profit factor is the sum of positive closed-trade results divided by the absolute sum of negative results. All three full-period factors are below 1.

Full period
CaseNet returnMax. drawdownTradesProfit factor
MACD only · Full period−24.14%29.23%1,5200.843
MACD + EMA200 · Full period−19.78%22.10%1,2040.833
MACD + EMA200 + RSI14 · Full period−16.59%20.26%1,0500.839
MACD onlyMACD + EMA200MACD + EMA200 + RSI14
Three accounts start at 10,000 USD. The upper panel shows the last marked equity of each UTC date with quotes. The lower panel shows that date’s deepest sampled drawdown.
Three accounts start at 10,000 USD. The upper panel shows the last marked equity of each UTC date with quotes. The lower panel shows that date’s deepest sampled drawdown.
11

Earlier and later slices

Restart each slice with 10,000 USD. The split is 1 January 2024 at 00:00 UTC. Reuse the completed bars before the split for indicator warm-up. The later slice gave −5.02% with MACD, −7.89% with EMA200 and −6.34% with both filters. The full-period ranking changed in the later slice.

Early slice · Later slice
CaseNet returnMax. drawdownTradesProfit factor
MACD only · Early slice−20.13%21.16%7750.787
MACD + EMA200 · Early slice−12.92%14.01%6090.820
MACD + EMA200 + RSI14 · Early slice−10.94%11.62%5360.825
MACD only · Later slice−5.02%11.23%7450.932
MACD + EMA200 · Later slice−7.89%10.32%5950.853
MACD + EMA200 + RSI14 · Later slice−6.34%10.55%5140.860
12

How much do costs change the result?

The spread-only case keeps observed Bid and Ask and removes the other charges. The stress case uses 0.50 pip commission and 0.50 pip slippage per fill, plus 1.00 pip per rollover unit. The full filter combination returned −5.96% with spread only and −26.67% under stress.

Observed spread only · Higher costs
CaseNet returnMax. drawdownTradesProfit factor
MACD only · Observed spread only−9.36%19.62%1,5180.941
MACD + EMA200 · Observed spread only−7.91%15.88%1,2020.933
MACD + EMA200 + RSI14 · Observed spread only−5.96%14.91%1,0480.942
MACD only · Higher costs−34.88%36.65%1,5210.769
MACD + EMA200 · Higher costs−30.48%31.49%1,2060.744
MACD + EMA200 + RSI14 · Higher costs−26.67%27.64%1,0500.744
13

One filled trade and one blocked signal

The first eligible later trade with both filters is short with RSI14 at 27.71. E and X show the modeled fills in UTC. The first later MACD-only entry that passes EMA200 but fails RSI has a short signal with RSI14 at 52.67. S marks that signal on the second chart. Both charts use observed Bid candles. Histogram H and C−EMA200 are shown in pips.

EEntryXExit
First full-filter trade entered in the later slice. E and X are modeled fills. Candles show actual Bid and the indicator points use completed H1 bars. The price panel is in USD per EUR.
S · UTC
2024-01-03T13:00:00.000Z
C
1.091690
EMA200
1.100389
RSI14
27.71
MACD H · pip
−0.571
E · UTC
2024-01-03T13:00:00.095Z
X · UTC
2024-01-03T20:00:00.047Z
E · USD/EUR
1.091665
X · USD/EUR
1.091805
P&L · USD
−1.71
First full-filter trade entered in the later slice. E and X are modeled fills. Candles show actual Bid and the indicator points use completed H1 bars. The price panel is in USD per EUR.
SSignal
First later MACD-only entry that passes EMA200 and fails RSI. S identifies the closed-bar short signal. The full-filter account skips this signal.
S · UTC
2024-01-04T23:00:00.000Z
C
1.094735
EMA200
1.098409
RSI14
52.67
MACD H · pip
−0.180
First later MACD-only entry that passes EMA200 and fails RSI. S identifies the closed-bar short signal. The full-filter account skips this signal.
14

Fewer trades and lower total costs

The three full base accounts closed 1,520, 1,204 and 1,050 trades. Total observed spread and modeled charges were 2,259.50 USD with MACD and 1,641.24 USD with both filters. These totals come from different sets of fills and position sizes. Lower total costs alone cannot establish a positive expectancy.

15

How to reproduce the check

Independent indicator and interval calculations reproduce all 15 cases and the three full equity paths. Raw-archive checks and independently reconstructed H1 bars confirm the input mapping. The downloadable JSON contains the frozen protocol and results. The CSV contains the trade journals of the three full base cases.

16

What this test supports

EMA200 and RSI reduced the full-period loss under these rules and costs. MACD alone lost less in the later slice. All variants were negative in the spread-only case. The evidence covers one quote feed, one period and these entry, exit and cost assumptions.

Questions and answers

Why use a signal EMA9?

It defines the tested MACD implementation. Use the same average type, periods and seeds when reproducing it on a platform.

Is RSI 50 an overbought or oversold level?

Here it splits upward and downward momentum. Longs need RSI above 50 and shorts below 50.

Why use two quote sides?

A buy normally crosses to Ask and a sell to Bid. Using both sides carries the observed spread into the modeled fills.

Does 0.5% define the maximum loss?

It defines a position-size target at the initial distance. The H1 exit condition and subsequent execution can lead to a larger loss.

Is the rollover an actual broker rate?

It is a fixed cost assumption. Actual charges or credits depend on direction, account, date and settlement calendar.

Can the filtered strategy enter later on the same signal?

It waits for a new qualifying cross. Each scheduled order also expires if the next opening quote misses its five-minute window.

Sources and reproducibility

Created by the MyProfitFactor editorial team.

Copying or republication without attribution and an active link to the original material is prohibited. Usage policy.

Risk disclosure

Educational material. Foreign-exchange positions carry execution, margin and market risk. The simulation describes a historical sample.