Most trading ideas start with a question: is the market going up, going down or going nowhere? Swing points give you a precise, testable way to answer that, instead of relying on how a chart feels at a glance.
Swing highs and swing lows
A swing high is a candle whose high is higher than the highs of a chosen number of candles on each side of it. A swing low is the mirror image: its low is lower than the lows of the neighbouring candles. With two candles on each side, for instance, a high must be above the two candles before it and the two after it.
The number of candles on each side is a setting you choose. A small number finds many small swings, while a larger number finds fewer and more significant ones. Note that a swing is only confirmed after the candles on its right have closed, so it is always known with a delay.
Trends: higher highs and lower lows
An uptrend is a sequence of higher highs and higher lows: each rally goes further than the last and each pullback stops above the previous low. A downtrend is the reverse, with lower highs and lower lows. These definitions are simple on purpose, because a rule you can state precisely is a rule you can test.
Ranges and broken structure
When neither side makes progress, highs and lows stay at roughly the same levels. This is a range, also called a sideways market or consolidation. It is bounded by a top and a bottom that price keeps returning to.
A trend is considered intact while its structure holds. In an uptrend, the most recent higher low is the line to watch. If price closes below it, the sequence of higher lows is broken. That does not prove a downtrend has begun, only that the uptrend definition no longer holds.
Worked example
Classifying a sequence of swing points
- Price makes a swing high at 1.0900, then a swing low at 1.0850.
- The next swing high is 1.0930, which is above 1.0900: a higher high (30 pips higher).
- The next swing low is 1.0875, which is above 1.0850: a higher low (25 pips higher).
- Another swing high at 1.0960 is above 1.0930, and a swing low at 1.0905 is above 1.0875. Both are higher again.
- Price then falls to 1.0890, below the last higher low of 1.0905.
Three higher highs and three higher lows describe an uptrend, and the fall to 1.0890 breaks the higher-low sequence by 15 pips (1.0905 - 1.0890).
| Structure | Highs | Lows |
|---|---|---|
| Uptrend | Higher | Higher |
| Downtrend | Lower | Lower |
| Range | About equal | About equal |
You can express these ideas in a strategy graph. A SlidingWindow holds the last N highs, and Max returns the highest value in that window and its Position. Comparing the current Close with such a level with GreaterThan is one common way to detect a breakout from a range.
Key takeaways
- A swing high or low is a candle that is more extreme than a chosen number of candles on each side, and it is only confirmed with a delay.
- An uptrend is a run of higher highs and higher lows; a downtrend is lower highs and lower lows.
- A range has roughly equal highs and lows, and a trend is in question when price breaks its latest swing low (uptrend) or swing high (downtrend).
- Writing structure as precise rules makes it testable, which is the first step to using it in a strategy.