Join waitlist
Strategies / Trend / MACD Signal State Long

MACD Signal State Long

The strategy buys on the first bar that a 25 and 60 period MACD line sits above its 220 period EMA signal line. It sells on the first bar that the MACD line falls below that signal.

TrendLong onlySwingNasdaq 100Daily
2.98Profit factor
17,390Net profit EUR
49.06%Win rate
106Trades
-3,568Max drawdown
164Avg trade

Best run of 39. Nasdaq 100, Daily, spread 3, from run pf:2026-10-13-NAS100-D.tsv:2.

Entry rules, long

  1. No long position is open.

Exit rules

  1. The MACD line is below its 220 period EMA signal line, but was not on the previous bar, closing the long.

Test conditions

PeriodUp to 2026-10-13
InstrumentNasdaq 100, Daily
Spread3 points
Starting capital1,000,000
CostsSpread only. Commissions and overnight financing are not included.
BarsUp to 200,000 bars, fewer where the instrument has less history
Last tested2026-10-13

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best runDaily2.98 10649.0617,390 EUR-3,568
DAX 404 hours1.47 27540.7314,078 EUR-3,236
Gold1 hour1.39 1,05237.173,323 EUR-677
USD/JPY30 min1.25 1,71237.21902,700 USD-192,400
Gold30 min1.24 1,75734.382,728 EUR-687
USD/JPYDailyn/a 11838.98974,160 USD-733,000
USD/JPY15 minn/a 1,75034.86433,860 USD-132,330
USD/JPY10 minn/a 1,78834.84399,340 USD-168,710
USD/JPY1 hourn/a 1,29137.10314,680 USD-305,520
EUR/USDDailyn/a 11438.6050,262 USD-40,496
Nikkei 225Dailyn/a 10436.5441,139 USD-9,366
Nikkei 2251 hourn/a 90635.1037,324 USD-11,004
Nikkei 2254 hoursn/a 23139.8329,466 USD-7,905
Dow JonesDailyn/a 14436.8120,452 EUR-5,553
Nikkei 2253 minn/a 1,74634.9920,347 USD-8,841
Nikkei 22515 minn/a 1,78334.2116,472 USD-10,572
Nikkei 2252 minn/a 1,72634.7615,245 USD-6,739
DAX 40Dailyn/a 13839.1313,882 EUR-3,773
Nasdaq 10015 minn/a 1,75637.1912,546 EUR-3,280
Dow Jones30 minn/a 70436.9312,046 EUR-7,147
DAX 4015 minn/a 1,76035.1110,631 EUR-4,040
DAX 401 hourn/a 1,02537.5610,303 EUR-3,996
Nasdaq 1001 hourn/a 1,15637.2810,100 EUR-5,073
US Crude OilDailyn/a 10437.5010,037 EUR-6,678
Nasdaq 10030 minn/a 1,80335.779,817 EUR-3,425
DAX 4030 minn/a 1,76836.039,800 EUR-5,117
Brent CrudeDailyn/a 4639.137,667 EUR-7,185
Nasdaq 10010 minn/a 1,73734.206,819 EUR-4,789
Brent Crude30 minn/a 1,14435.666,477 EUR-4,220
DAX 4010 minn/a 1,79833.934,082 EUR-3,205
GoldDailyn/a 13238.642,884 EUR-910
FTSE 1004 hoursn/a 27834.892,654 EUR-1,352
S&P 500Dailyn/a 15935.222,627 EUR-797
S&P 5004 hoursn/a 31838.362,342 EUR-1,016
Gold15 minn/a 1,82132.952,270 EUR-629
Gold4 hoursn/a 29436.051,870 EUR-1,552
S&P 5001 hourn/a 1,14936.901,160 EUR-1,050
S&P 50015 minn/a 1,75936.671,147 EUR-1,045
Gold10 minn/a 1,81631.50965 EUR-749

Charts

Results by run

Top 10 of 39 runs. The full list is in the table above.

Above 1.0 made money, below 1.0 lost money.

The code

ProBuilder code, as tested

// ==============================================================
// MACD Signal State Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

myMacd = ExponentialAverage[25](close) - ExponentialAverage[60](close)
signal = ExponentialAverage[220](myMacd)

20 more lines: the entry and exit rules.

Setup

How to load it

  1. Copy the code with the copy button on the code block.
  2. In ProRealTime, open a chart of the instrument and timeframe you want to test, then open ProOrder > New trading system and choose "Create with programming".
  3. Paste the code, give the system a name and save it.
  4. Click "Backtest", set your own spread and position size, and run it before you consider trading it live.

Indicators used

MACDEMA
Read this firstKnown weaknesses2 points
  • The code sets no stop loss, so a losing trade stays open until an exit signal arrives.
  • Results include the spread only. Commissions and overnight financing are not included.

Questions

About this strategy

Can I run MACD Signal State Long in ProOrder?

Yes. The code is ProBuilder and runs as an automated ProOrder system. Backtest it on your own account with your own spread and position size before trading it live.

Which markets was it tested on?

It was tested on 39 market and timeframe combinations. The best run was Nasdaq 100, Daily, with a profit factor of 2.98 over 106 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,568 EUR at the tested position size, against a net result of 17,390 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

Donchian Low WMA Cross With Target

Also a trend strategy.

2.97 PF · 190 trades

Put your name on the ProRealAlgos waitlist to trade a tested portfolio instead of single strategies.

Copy trading on US indices is available to ProRealAlgos members as spots open.

Past backtest results do not guarantee future results. This is not financial advice. Curated and maintained by ProRealAlgos. ProRealTime™ is a trademark of ProRealTime SAS. prorealalgos.comStatsDocs