Double 7 (Mean reversion)
Connors–Alvarez Double 7s: buys when price closes at a 7-bar low while above its 200-bar average, and sells when it closes at a 7-bar high.
How It Works
- Compute a 200-bar SMA (the long-term trend filter) and the highest and lowest close of the last 7 bars.
- Buy when today's close is the lowest of the past 7 bars while price is still above the 200-bar average — a short-term pullback inside a long-term uptrend.
- Sell when today's close is the highest of the past 7 bars — the pullback has fully recovered.
Worked example. Price at 108 is above its 200-bar average of 100, and today's 108 close is the lowest of the past 7 bars — buy the pullback. Four bars later a 111 close is the highest of its last 7 — sell, pocketing the swing.
The Math Behind The Indicators
Everything runs on closing prices of the traded timeframe: P is a close, Pt today's close, and N counts bars — one bar is one candle of that timeframe, so 20 bars on a 1h chart is 20 hours.
- Price Channel (Rolling High / Low)
- The highest and lowest close over the previous N bars — the edges of the recent trading range. Closing above the channel top means price just beat every close in that window (a breakout); the channel bottom marks recent support.
- \[\mathrm{Upper}_N = \max(P_{t-1}, \ldots, P_{t-N}), \quad \mathrm{Lower}_N = \min(P_{t-1}, \ldots, P_{t-N})\]
- Example: If the previous 5 closes were 100, 103, 101, 102, 104, the channel spans 100 to 104. A close at 105 breaks above the top; a close at 99 breaks below the bottom.
- Simple Moving Average (SMA)
- The plain average of the last N closing prices: add them up, divide by N. It smooths out bar-to-bar noise so the underlying direction is easier to see — a rising SMA means recent prices sit above where they used to be.
- \[\mathrm{SMA}_N = \dfrac{P_1 + P_2 + \cdots + P_N}{N}\]
- Example: With N = 3 and closes 100, 102, 104 the SMA is (100 + 102 + 104) / 3 = 102.