The rules at a glance
- Market: major pairs on the daily chart; the example uses USDCHF
- Trend: the close is above the 200 EMA
- Entry: the 2-period RSI closes below 10; buy at that close
- Exit: the first close above the 5-day simple moving average
- Protection: a 2.5 × ATR (14) stop, and a time limit of 10 candles
- Shorts: below the 200 EMA, when the 2-period RSI closes above 90; exit on a close below the 5-day average
- Size: risk 0.5% to 1% of the account on the 2.5 × ATR stop
Why a 2-period RSI
The RSI compares recent up moves with recent down moves on a scale of 0 to 100. With the usual 14 periods it moves slowly and rarely goes below 30. With 2 periods it reacts to the last couple of candles only: two or three down closes in a row can push it under 10. That makes it useless for spotting trends; what it does flag is short pullbacks that have gone far, fast.
Where the idea comes from
Larry Connors and Cesar Alvarez made the 2-period RSI well known in their 2008 book Short Term Trading Strategies That Work. Their published version traded US stocks and stock indices: buy when the price is above its 200-day simple moving average and the 2-period RSI closes below 10 (or 5), and sell on a close above the 5-day average. It had no stop loss.
This page adapts the idea for forex and changes three things. It uses an EMA for the trend. It adds a protective stop of 2.5 ATRs and a 10-candle time limit, because a currency pair can trend for months without bouncing. And it's meant for currency pairs, which don't drift upwards over the years the way stock indices have. The short side follows the usual mirror rules: below the 200-day average, sell when the 2-period RSI closes above 90. Results from stocks don't carry over; that's what the free script is for.
The rules, step by step
1. Check the trend
On the daily chart, the price must close above the 200 EMA for a long, or below it for a short.
2. Wait for the 2-period RSI to hit an extreme
For a long, the RSI (2) must close below 10. Usually that means two or three down days in a row. Buy at the close.
3. Sell on the first close above the 5-day average
Exit when the price closes above its 5-day simple moving average. That's often just one to three days later.
4. Keep the safety net
A stop 2.5 times the 14-day ATR below the entry protects against a pullback that keeps going. If neither the exit nor the stop happens within 10 candles, close the trade anyway.
Worked example: USDCHF, daily chart
5 SMA (exit) RSI (2)
USDCHF is above its 200 EMA. After three down closes in a row, the 2-period RSI falls from 88 to 7.1, under 10, with the price at 0.8026. That's the buy. The 14-day ATR is 48 pips, so the protective stop goes 2.5 ATRs below the entry, at 0.7906. Two days later the price closes at 0.8074, above its 5-day average, and the trade is closed.
| USDCHF long | |
|---|---|
| Entry | 0.8026 |
| Protective stop (2.5 × ATR) | 0.7906, 120 pips away |
| Pip value | CHF 10 a lot, about $12.46 at 0.8026 |
| Lot size at 1% of $10,000 | $100 ÷ (120 pips × $12.46) = 0.067, rounded down to 0.06 lots |
| Loss if the stop had been hit | about $90 |
| Exit (close above the 5-day average) | 0.8074 |
| Result | +48 pips, about 0.40R: CHF 28.80, about $35.67 |
A gain of about half the risk looks small next to the 2R targets elsewhere on this site, and that's the point of this example. RSI(2) trades are short and their wins are usually small compared with the safety stop. A strategy like this only works if it wins most of the time: with an average win of 0.40R and an average loss of 1R, you'd need to win 71% of trades (1 ÷ (1 + 0.40)) just to break even before costs. That's the worst case, with every loser hitting the full stop; many losers close on the 5-day average or the time limit for less than 1R. The Strategy Tester's average win and average loss give the real break-even rate, which is why the backtest matters more here than anywhere.
What can go wrong
- A dip that becomes a trend change. The 200 EMA filter is slow. When a long uptrend ends, the first few RSI(2) signals are often losers.
- Costs. Small average wins make the spread and swap a bigger share of each trade. Put your real costs in the Strategy Tester.
- Gaps and news. A central bank surprise can move a pair several ATRs in a day. For USDCHF, that includes the Swiss National Bank.
Risk management
- Size from the protective stop, not from the typical result. A wide stop means a small lot size.
- Watch for losing streaks after a long winning run. High win rate strategies can look perfect for months and then give back a lot in a few trades.
- Check the pip value. On USDCHF one pip on one lot is CHF 10, so the dollar value changes with the exchange rate. The pip value calculator works it out.
Common mistakes
- Using the 14-period RSI. It rarely reaches 10, so the rules almost never trigger.
- Removing the stop because the original didn't have one. The original traded stock indices; currency pairs behave differently.
- Holding for a bigger move. The exit on the 5-day average is part of the system. Changing it changes the system.
- Trading it below the 200 EMA without testing shorts separately. Rallies in a downtrend behave differently from dips in an uptrend.
Backtest it yourself on TradingView
This page doesn't quote a win rate or a profit figure, and you should be wary of anyone who does without showing the test. Results change with the market, the dates, the data feed and the costs you put in. The honest way is to run the test yourself, and the free script below does the work in a couple of minutes.
- Open the chart. On TradingView, open USDCHF on the daily chart.
- Add the script. Open the Pine Editor from the Pine icon in the panel on the right of the chart (older layouts have it as a tab under the chart), delete the code that's already there, paste this strategy's code and click "Add to chart".
- Put in your costs. Open the strategy's settings and go to Properties. Enter your broker's commission and a little slippage. A test without costs flatters every strategy, and short-term ones most of all.
- Read the Strategy Tester. The panel under the chart shows the net profit, the maximum drawdown, the profit factor, the number of trades and a list of every trade. Click a few trades and check on the chart that each one follows the rules. Trade sizes are shown in units rather than lots: 100,000 units is one lot of a forex pair, and 100 ounces is one lot of gold.
- Change one setting at a time. Compare the entry level (5, 10 and 15), the exit average (3, 5 and 10 days), the protective stop at 2, 2.5 and 3 × ATR, the time limit and shorts on and off. On the daily chart the free plan's 5,000 candles cover many years, which a high win rate strategy needs.
As a rough guide, don't trust a result with fewer than 100 trades, a profit factor under 1 once costs are in, or a drawdown you couldn't sit through with real money. Settings tuned to look good on one stretch of history often fail on the next, so check the same settings on dates you didn't tune them on, then demo trade the strategy for a few weeks. How much history you can test depends on your TradingView plan: the free plan loads 5,000 candles, which is a few months of 15-minute candles but years of daily ones.
The script sizes each trade from the stop loss and your risk percentage, starts with $10,000 and assumes 1:100 leverage (a 1% margin setting), so the tester doesn't flag margin calls on normal forex trade sizes. Change these under Properties to match your account. By default TradingView fills orders at the open of the candle after the signal, so the fill can differ a little from the signal candle's close.
Download the free Pine Script and PDF
The script is written in Pine Script version 6 for this guide and follows the rules above. It can't read the economic calendar, so skipping news days is up to you. It's free to use, change and share. The PDF is a one-page cheat sheet with the rules, the RSI(2) idea, a worked example, the break-even sum and a checklist, to keep next to your chart.
Show the code (Pine Script v6, 61 lines)
//@version=6
// EMA + RSI(2) pullback strategy by PipLedger (https://pipledgerfx.com/ema-rsi-strategy)
// In the spirit of Larry Connors' RSI(2) idea: above the 200 EMA, buys at the close when the 2-period RSI drops under 10, and sells when the price closes back above its 5-period average. Shorts are the mirror image. A 2.5 x ATR stop and a 10-candle time limit are added as protection.
// Free to use and change. For education and backtesting only; not financial advice.
strategy("PipLedger: EMA + RSI(2) Pullback", shorttitle="EMA RSI2", overlay=true, initial_capital=10000, pyramiding=0, default_qty_type=strategy.fixed, default_qty_value=1, margin_long=1, margin_short=1, currency=currency.USD)
// ---------- Inputs
emaLen = input.int(200, "Trend EMA", minval=20)
rsiLen = input.int(2, "RSI length", minval=2)
buyLvl = input.float(10.0, "Buy when RSI is below", minval=1.0, maxval=50.0, step=1.0)
sellLvl = input.float(90.0, "Sell short when RSI is above", minval=50.0, maxval=99.0, step=1.0)
exitLen = input.int(5, "Exit average (SMA length)", minval=2)
stopMult = input.float(2.5, "Protective stop (x ATR 14)", minval=0.5, step=0.25)
maxBars = input.int(10, "Close the trade after (candles)", minval=1)
useShort = input.bool(true, "Take short trades too")
riskPct = input.float(1.0, "Risk per trade (% of equity)", minval=0.1, maxval=5.0, step=0.1)
// ---------- Helpers
fx = strategy.convert_to_account(1.0) // one unit of the chart's quote currency in account currency (1 on USD-quoted charts)
calcQty(float entry, float stop) =>
float dist = math.abs(entry - stop)
dist > 0 and not na(fx) ? strategy.equity * riskPct / 100 / (dist * syminfo.pointvalue * fx) : 0.0
ema = ta.ema(close, emaLen)
rsi = ta.rsi(close, rsiLen)
exitA = ta.sma(close, exitLen)
atr = ta.atr(14)
// ---------- Exits first: back above (below) the short average, or out of time
var int entryBar = na
if strategy.position_size > 0 and (close > exitA or bar_index - entryBar >= maxBars)
strategy.close("Long", comment=close > exitA ? "Above the 5 SMA" : "Time limit")
if strategy.position_size < 0 and (close < exitA or bar_index - entryBar >= maxBars)
strategy.close("Short", comment=close < exitA ? "Below the 5 SMA" : "Time limit")
// ---------- Entries at the close
flat = strategy.position_size == 0
longSig = flat and close > ema and rsi < buyLvl
shortSig = flat and useShort and close < ema and rsi > sellLvl
if longSig
float sl = close - stopMult * atr
float q = calcQty(close, sl)
if q > 0
strategy.entry("Long", strategy.long, qty=q)
strategy.exit("Long stop", "Long", stop=sl)
entryBar := bar_index
if shortSig
float sl = close + stopMult * atr
float q = calcQty(close, sl)
if q > 0
strategy.entry("Short", strategy.short, qty=q)
strategy.exit("Short stop", "Short", stop=sl)
entryBar := bar_index
// ---------- Chart (add TradingView's RSI indicator with length 2 to see the oscillator)
plot(ema, "200 EMA", color=color.new(color.orange, 0), linewidth=2)
plot(exitA, "5 SMA (exit)", color=color.new(color.gray, 30))
plotshape(longSig, "RSI(2) dip", shape.triangleup, location.belowbar, color.teal, size=size.small)
plotshape(shortSig, "RSI(2) spike", shape.triangledown, location.abovebar, color.red, size=size.small)Trading this from India
Residents can trade EURUSD, GBPUSD and USDJPY futures and options on NSE and BSE through a SEBI-registered broker. The contracts are quoted the same way as the spot pair, one lot is 1,000 units of the base currency, and they're cash-settled in rupees. They trade only from 9 a.m. to 7:30 p.m. IST, volumes are thin and not every broker offers them, so check the hours and the spread first. USDCHF isn't one of those contracts, so to trade these rules on an Indian exchange, test them on EURUSD, GBPUSD or USDJPY. Trading forex or CFDs with offshore online platforms isn't allowed for residents under FEMA, even if the app is easy to download. Details are in is forex trading legal in India.
Related strategies: ADX trend following, 20 and 50 EMA pullback, ATR trailing stop, RSI divergence, 9 and 21 EMA crossover, MACD and 200 EMA, RSI 60/40. All 34 strategies are compared on one page in forex trading strategies.