Join today
Strategies / Mean reversion / TMA Channel Long

TMA Channel Long

The lower band is a 141-bar triangular moving average minus 2.4 times ATR(141). A close crossing back above that band opens a long. It sells at the middle line or on a 3% stop or 3% target.

Mean reversionLong onlyIntradayFTSE 10015 min
n/aProfit factor
3,189Net profit EUR
77.29%Win rate
1,484Trades
-1,261Max drawdown
2.15Avg trade

Best run of 8. FTSE 100, 15 min, spread 2, from run sweeps:2026-09-17-FTSE100-15m-opt.tsv:3.

Entry rules, long

  1. Members only

Exit rules

  1. Members only
  2. Stop loss 3%
  3. Profit target 3%

Test conditions

PeriodUp to 2026-09-17
InstrumentFTSE 100, 15 minutes
Spread2 points
Contracts1
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-09-17

Parameters

positionSize
Contracts per trade
1
tmaHalfLength
Half length of the triangular average
141
atrPeriod
ATR length for channel width
141
atrMultiplier
Channel width in ATRs
2.4
stopLossPct
Protective stop, percent
3
takeProfitPct
Profit target, percent
3

Every run

Markets and timeframes tested

MarketTimeframePFTradesWin %NetMax DD
FTSE 100Best run15 minn/a 1,48477.293,189 EUR-1,261
Nikkei 22515 minn/a 1,48174.8114,734 USD-6,454
Dow Jones4 hoursn/a 9078.899,366 EUR-4,362
Dow Jones30 minn/a 60776.287,653 EUR-5,013
Brent CrudeDailyn/a 10256.863,663 EUR-1,291
DAX 404 hoursn/a 30073.333,578 EUR-2,460
FTSE 100Dailyn/a 15259.871,807 EUR-1,127
S&P 5004 hoursn/a 30674.841,190 EUR-550

Charts

Results by run

Net profit against max drawdown

Net profitMax drawdown
0-10K-5K10K20KNikkei 225 · 15 minDow Jones · 4 hoursDow Jones · 30 minBrent Crude · DailyDAX 40 · 4 hoursFTSE 100 · 15 minFTSE 100 · DailyS&P 500 · 4 hours

The code

ProBuilder, rewritten to house standard

Every file in the library uses the same header, the same section order and the same variable names. The numbers above were produced by the original version before the rewrite, and the rewrite has not yet been compiled in ProRealTime.

// ============================================================
// TMA Channel Long
// ProRealAlgos Strategy Library  |  prorealalgos.com
// Type: Mean reversion
// Direction: Long only
// Timeframe tested: 15 minutes
// ============================================================

// --- Settings ---
DEFPARAM CumulateOrders = false
DEFPARAM PreloadBars = 10000

// --- Parameters ---
positionSize = 1          // contracts per trade
tmaHalfLength = 141       // half length of the triangular moving average
atrPeriod = 141           // ATR length for the channel width
atrMultiplier = 2.4       // channel width in ATRs
stopLossPct = 3           // protective stop, percent
takeProfitPct = 3         // profit target, percent

// --- Indicators ---
// Triangular average built by hand: weights fall linearly with bar age.
weightedSum = (tmaHalfLength + 1) * close
weightTotal = (tmaHalfLength + 1)
weight = tmaHalfLength

FOR j = 1 TO tmaHalfLength DO
  weight = weight - 1
  weightedSum = weightedSum + (weight * close[j])
  weightTotal = weightTotal + weight
NEXT

bandOffset = AverageTrueRange[atrPeriod](close) * atrMultiplier
midBand = weightedSum / weightTotal
lowerBand = midBand - bandOffset

16 more lines: the entry and exit rules.

Read this first

Known weaknesses

  • Profit factor was not recorded, since all results come from parameter sweeps.
  • The best run on FTSE 100 15 minutes averaged EUR 2.15 per trade over 1,484 trades, a small edge after a 2 point spread.
  • A 77.29% win rate with a stop as wide as the target means a few losses can take back many small wins.
  • It only buys, so falling markets offer no short trades.

Indicators used

TMAATR

How to load it

  1. Copy the code with the copy button above 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.

Questions

About this strategy

Can it run in ProOrder?

Yes, all rules are automatable. The rewritten code was not compile-checked, so run it in ProBacktest first.

Which markets were tested?

FTSE 100, Nikkei 225, Dow Jones, DAX 40, S&P 500 and Brent Crude, and all 7 listed runs were positive. Nikkei 225 15 minutes made USD 14,734.4.

What drawdown came with 1 contract?

The FTSE 100 15 minute run had a max drawdown of EUR 1,261.1 against EUR 3,188.5 net profit.

Why the 15 minute chart?

It gave the best recorded run. The long 141-bar settings keep the channel slow even on intraday bars.

Related

Strategies like this one

ATR Band

Uses the same indicator.

10.31 PF · 53 trades

Bollinger Reversal

Best run on the same market, FTSE 100.

1.74 PF · 117 trades

Monday Dip Buy

Also a mean reversion strategy.

n/a PF · 146 trades

Intraday mean reversion can smooth a portfolio. Join the ProRealAlgos waitlist to see our live setup.

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