Join waitlist
Strategies / Trend / Reversal With Ergodic CSI

Reversal With Ergodic CSI

Buys when a reversal pattern on closing prices and a smoothed Ergodic CSI both point up, and sells short when both point down. Any open position is closed when the two signals disagree.

TrendLong & shortSwingNasdaq 1004 hours
n/aProfit factor
7,751Net profit EUR
48.19%Win rate
857Trades
-5,147Max drawdown
9.04Avg trade

Best run of 12. Nasdaq 100, 4 hours, spread 3, from run sweeps:2026-10-12-NAS100-4h-opt.tsv:7.

Entry rules, long

  1. CSI state is +1 when the 5-bar average of the Ergodic CSI is above 0.02, and -1 otherwise.
  2. The system buys one contract at market when both states are +1.

Entry rules, short

  1. CSI state is -1 when the 5-bar average of the Ergodic CSI is 0.02 or below.
  2. The system sells short one contract at market when both states are -1.

Exit rules

  1. A short closes when the two states no longer both point down.
  2. There is no stop or target.

Test conditions

PeriodUp to 2026-10-12
InstrumentNasdaq 100, 4 hours
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-12

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
Nasdaq 100Best run4 hoursn/a 85748.197,751 EUR-5,147
Nikkei 225Dailyn/a 6744.7848,515 USD-10,541
Dow JonesDailyn/a 8654.6529,363 EUR-9,474
Dow Jones4 hoursn/a 38656.4819,732 EUR-7,426
Nikkei 2254 hoursn/a 38244.7619,380 USD-9,355
Nasdaq 100Dailyn/a 7058.5715,923 EUR-5,632
DAX 40Dailyn/a 8252.4414,172 EUR-6,275
Brent CrudeDailyn/a 3240.627,376 EUR-6,949
DAX 404 hoursn/a 61749.276,022 EUR-5,515
S&P 500Dailyn/a 9450.004,829 EUR-1,273
GoldDailyn/a 7943.042,868 EUR-1,387
Gold4 hoursn/a 70846.191,634 EUR-1,012

Charts

Results by run

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

Net profitMax drawdown

The code

ProBuilder code, as tested

// ==============================================================
// Reversal With Ergodic CSI
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Trend
// Direction: Long & short
// Timeframe tested: 4 hours
// ==============================================================

DEFPARAM CumulateOrders = false

ONCE posrev = 0
ONCE sincebad = 1000
ONCE plus = 0
ONCE minus = 0
ONCE postwo = 0

ll = lowest[14](low)
hh = highest[14](high)

80 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

ADXTrue RangeSMAStochastic
Read this firstKnown weaknesses2 points
  • No profit factor is available, because only sweep results exist for this strategy.
  • The maximum drawdown of 5,147 EUR is large next to the net profit of 7,750 EUR.

Questions

About this strategy

Can I run Reversal With Ergodic CSI 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 12 market and timeframe combinations. The best run by trade count was Nasdaq 100, 4 hours, with 857 trades.

How large was the drawdown?

The best run had a maximum drawdown of 5,147 EUR at the tested position size, against a net result of 7,750 EUR.

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

Volatility Spike Regression Long

Best run on the same market, Nasdaq 100.

1.22 PF · 1,850 trades

ADX Filtered EMA Cross

Also a trend strategy.

1.15 PF · 607 trades

Get the full rules, the complete code and the ProRealAlgos portfolio as a member.

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