Join waitlist
Strategies / Trend / Price Crosses 30-Period SMA

Price Crosses 30-Period SMA

The strategy buys when the close crosses above its 30-period simple moving average and sells the long when the close crosses back below it. It trades 1 contract at a time and uses no stop or target.

TrendLong onlySwingDAX 401 hour
n/aProfit factor
5,409Net profit EUR
23.68%Win rate
5,161Trades
-4,300Max drawdown
1.05Avg trade

Best run of 16. DAX 40, 1 hour, spread 3, from run sweeps:2026-10-04-DAX40-1h-opt.tsv:53.

Entry rules, long

  1. No long position is currently open

Exit rules

  1. The long closes at market on this signal, with no stop or target set

Test conditions

PeriodUp to 2026-10-04
InstrumentDAX 40, 1 hour
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
DAX 40Best run1 hourn/a 5,16123.685,409 EUR-4,300
EUR/USDDailyn/a 57625.6971,410 USD-55,988
Nikkei 225Dailyn/a 53127.5037,150 USD-13,981
Silver4 hoursn/a 1,43222.7728,085 USD-20,327
Nikkei 2254 hoursn/a 1,17125.8825,469 USD-9,959
Dow JonesDailyn/a 65729.5323,266 EUR-6,825
Nasdaq 1004 hoursn/a 1,36825.7313,091 EUR-4,515
Nasdaq 100Dailyn/a 51729.9812,965 EUR-5,527
DAX 40Dailyn/a 64231.9311,776 EUR-4,201
Dow Jones4 hoursn/a 46227.4910,357 EUR-7,534
Brent CrudeDailyn/a 24427.8710,312 EUR-9,634
DAX 404 hoursn/a 1,40725.666,815 EUR-4,151
Gold4 hoursn/a 1,34425.002,730 EUR-1,084
S&P 500Dailyn/a 68328.702,708 EUR-927
GoldDailyn/a 64222.902,271 EUR-1,326
S&P 5004 hoursn/a 1,41926.151,254 EUR-1,022

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Price Crosses 30-Period SMA
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long only
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

sma = Average[30](close)

13 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

SMA
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 4,300 EUR is large next to the net profit of 5,409 EUR.

Questions

About this strategy

Can I run Price Crosses 30-Period SMA 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 16 market and timeframe combinations. The best run by trade count was DAX 40, 1 hour, with 5,161 trades.

How large was the drawdown?

The best run had a maximum drawdown of 4,300 EUR at the tested position size, against a net result of 5,409 EUR.

Does it trade long, short or both?

It only takes long trades.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Heikin Ashi Color Flip

Best run on the same market, DAX 40.

1.12 PF · 3,692 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

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

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