Join waitlist
Strategies / Momentum / MACD Crossover Short With Volatility Stop

MACD Crossover Short With Volatility Stop

The system sells short when the MACD line crosses below its signal line and DI+ is below DI-. It covers when price closes more than 3% above the average entry or crosses below a volatility stop based on twice ATR(20).

MomentumShort onlyIntradayEUR/USD2 min
n/aProfit factor
30,681Net profit USD
50.00%Win rate
2Trades
-27,917Max drawdown
15,341Avg trade

Best run of 2. EUR/USD, 2 min, spread 1, from run sweeps:2026-10-11-EURUSD-2m-opt.tsv:9.

Entry rules, short

  1. DI+ (14) is below DI- (14).
  2. Signals are ignored during the first 40 bars.

Exit rules

  1. A close more than 3% above the average entry price closes the short.

Test conditions

PeriodUp to 2026-10-11
InstrumentEUR/USD, 2 minutes
Spread1 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-11

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
EUR/USDBest run2 minn/a 250.0030,681 USD-27,917
USD/JPYDailyn/a 1100.001,215,880 USD-1,022,800

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// MACD Crossover Short With Volatility Stop
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Momentum
// Direction: Short only
// Timeframe tested: 2 minutes
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE vmax = 0
ONCE vmin = 0
ONCE up = 1
ONCE vstop = 0
ONCE vinit = 0

myMacd = ExponentialAverage[12](close) - ExponentialAverage[26](close)
sig = ExponentialAverage[9](myMacd)
dip = DIplus[14](close)
dim = DIminus[14](close)

atrm = AverageTrueRange[20](close) * 2
IF vinit = 0 THEN
    vmax = close
    vmin = close
    vinit = 1
ENDIF
vmax = max(vmax, close)
vmin = min(vmin, close)
IF up = 1 THEN
    vstop = max(vstop, vmax - atrm)
ELSE
    vstop = min(vstop, vmin + atrm)
ENDIF
prevup = up

26 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

MACDEMADMIATR
Read this firstKnown weaknesses3 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The best run has only 2 trades, which is a small sample to judge it on.
  • The maximum drawdown of 27,917 USD is large next to the net profit of 30,681 USD.

Questions

About this strategy

Can I run MACD Crossover Short With Volatility Stop 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 2 market and timeframe combinations. The best run by trade count was EUR/USD, 2 minutes, with 2 trades.

How large was the drawdown?

The best run had a maximum drawdown of 27,917 USD at the tested position size, against a net result of 30,681 USD.

Does it trade long, short or both?

It only takes short trades.

Related

Strategies like this one

Slow MACD Slope

Uses the same indicator.

6.80 PF · 7,305 trades

Stochastic Crossover Long With Bracket

Best run on the same market, EUR/USD.

1.75 PF · 5,666 trades

ATR Momentum

Also a momentum strategy.

n/a PF · 15,021 trades

See how ProRealAlgos combines strategies like this into one automated portfolio.

The ProRealAlgos community gets the full rules, the complete code and the automated portfolio.

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