Join waitlist
Strategies / Trend / SMA Crossover With Trend Slope Filter

SMA Crossover With Trend Slope Filter

The idea buys when the 7-period SMA crosses above the 50-period SMA while the 200-period SMA is not falling, and sells short on the mirror-image cross while it is falling. Trades use a 0.5 percent stop and 1.0 percent target.

TrendLong & shortSwingGBP/USD1 hour
n/aProfit factor
3,740Net profit USD
34.22%Win rate
1,914Trades
-3,060Max drawdown
1.95Avg trade

Best run of 9. GBP/USD, 1 hour, spread 1.5, from run sweeps:2026-10-04-GBPUSD-1h-opt.tsv:9.

Entry rules, long

  1. Buys 1 contract at market with a 0.5 percent stop and a 1.0 percent target

Entry rules, short

  1. Sells 1 contract short at market with a 0.5 percent stop and a 1.0 percent target

Exit rules

  1. The 200-bar SMA turns up while a short is open, closing the short at market
  2. A qualifying opposite cross reverses the position
  3. The 0.5 percent stop or 1.0 percent target closes the trade

Test conditions

PeriodUp to 2026-10-04
InstrumentGBP/USD, 1 hour
Spread1.5 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
GBP/USDBest run1 hourn/a 1,91434.223,740 USD-3,060
USD/JPY1 hourn/a 1,60835.14442,120 USD-254,210
USD/JPY30 minn/a 1,81132.41212,690 USD-205,340
DAX 401 hourn/a 1,55634.965,651 EUR-1,673
Nikkei 225Dailyn/a 17940.223,011 USD-1,815
Dow JonesDailyn/a 22128.511,434 EUR-1,060
Nasdaq 100Dailyn/a 16222.84900 EUR-545
Gold5 minn/a 1,89031.48712 EUR-506
US Crude OilDailyn/a 17632.39604 EUR-415

Charts

Results by run

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// SMA Crossover With Trend Slope Filter
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 1 hour
// ==============================================================

DEFPARAM CumulateOrders = false

fast = Average[7](close)
slow = Average[50](close)
sma = Average[200](close)

28 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 3,060 USD is large next to the net profit of 3,740 USD.

Questions

About this strategy

Can I run SMA Crossover With Trend Slope Filter 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 9 market and timeframe combinations. The best run by trade count was GBP/USD, 1 hour, with 1,914 trades.

How large was the drawdown?

The best run had a maximum drawdown of 3,060 USD at the tested position size, against a net result of 3,740 USD.

Does it trade long, short or both?

It trades both long and short.

Related

Strategies like this one

Trend Surfer

Uses the same indicator.

1.04 PF · 10,813 trades

Color Code Candle Flip

Best run on the same market, GBP/USD.

1.56 PF · 3,285 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 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