Join waitlist
Strategies / Trend / SMA Crossover Stop And Reverse

SMA Crossover Stop And Reverse

It buys when SMA(14) crosses above SMA(28) and sells short when it crosses below, so the position reverses on each signal. The strategy has no stop loss or profit target.

TrendLong & shortSwingUSD/JPYDaily
1.58Profit factor
3,492,750Net profit USD
40.94%Win rate
513Trades
-497,760Max drawdown
6,808Avg trade

Best run of 11. USD/JPY, Daily, spread 1, from run pf:2026-10-04-USDJPY-D.tsv:21.

Entry rules, long

  1. SMA(14) crosses over SMA(28) while not long.

Entry rules, short

  1. SMA(14) crosses under SMA(28) while not short.

Exit rules

  1. No stop loss or profit target is set.

Test conditions

PeriodUp to 2026-10-04
InstrumentUSD/JPY, Daily
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-04

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
USD/JPYBest runDaily1.58 51340.943,492,750 USD-497,760
USD/JPY1 hour1.13 5,44038.531,428,190 USD-326,420
USD/JPY30 minn/a 7,78436.23611,960 USD-254,490
EUR/USDDailyn/a 48543.51154,300 USD-62,071
Brent CrudeDailyn/a 18338.2522,902 EUR-10,399
US Crude OilDailyn/a 42640.6121,155 EUR-10,333
Nasdaq 100Dailyn/a 40039.2513,627 EUR-5,355
DAX 401 hourn/a 4,32338.3511,106 EUR-8,718
Gold1 hourn/a 4,74235.913,823 EUR-1,659
Gold4 hoursn/a 1,23836.831,712 EUR-1,342
GoldDailyn/a 55939.531,549 EUR-1,321

Charts

Results by run

Top 10 of 11 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

// ==============================================================
// SMA Crossover Stop And Reverse
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: Daily
// ==============================================================

DEFPARAM CumulateOrders = false

smafast = Average[14](close)
smaslow = Average[28](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
  • Results include the spread only. Commissions and overnight financing are not included.
  • The code is published as it was backtested and has not been compiled again since.

Questions

About this strategy

Can I run SMA Crossover Stop And Reverse 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 11 market and timeframe combinations. The best run was USD/JPY, Daily, with a profit factor of 1.58 over 513 trades.

How large was the drawdown?

The best run had a maximum drawdown of 497,760 USD at the tested position size, against a net result of 3,492,750 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

EMA 8 21 RSI Filtered Bracket

Best run on the same market, USD/JPY.

1.09 PF · 6,194 trades

EMA 50/200 Cross With Stop

Also a trend strategy.

1.58 PF · 304 trades

Want strategies that are already part of a live portfolio? Join the ProRealAlgos waitlist.

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