Indicators
Swing High/Low Detector: Trading Market Structure
How the swing high/low detector finds structural turning points, how bots trade structure breaks, and how to use it in Setup.Cash.
Featured image placeholder
/og/setup-cash-og.svg
Before indicators, there was structure: markets move in swings, and the sequence of swing highs and swing lows is the trend. The Swing High/Low Detector automates what price-action traders do by eye, it finds each local turning point and tracks the latest confirmed swing levels as tradeable lines.
How It Works
With a lookback of 3 (the default), a swing high is a bar whose high exceeds the 3 bars on each side; a swing low is the mirror. The indicator maintains:
- Swing High series: the most recent confirmed swing high level.
- Swing Low series: the most recent confirmed swing low level.
- New Swing High / New Swing Low events that fire the moment a new point confirms.
Why Structure Beats Lines on a Chart
- Uptrend = higher swing highs and higher swing lows.
- Downtrend = lower highs and lower lows.
- Break of structure, price closing beyond the last swing level against the trend, is often the earliest objective sign a trend is turning, well before a moving average crosses.
How to Trade It
1. Structure breakout. Go long when price closes above the last swing high; the market has printed a new higher high.
2. Trend-following stops. Trail your stop under each new higher swing low, you stay in until the structure that justified the trade is actually broken.
3. Range definition. The latest swing high and low frame the current range; trade the break or fade the edges depending on your regime filter.
Building It in Setup.Cash
Add the Swing High/Low Detector in the strategy builder and condition on price crossing the Swing High/Low series, or trigger on the New Swing events. It combines naturally with Fractals (a fixed-width version of the same concept) and Support/Resistance Zones, which cluster swings into zones.
Tuning
- Lookback 3: balanced sensitivity.
- Smaller (1–2): every minor wiggle counts, scalping structure.
- Larger (5–10): only significant swings, swing trading structure.
Structure is the skeleton every other signal hangs on. Backtest a structure-break entry against your current entry and compare.
Related Posts
View allIndicators
Automated Support & Resistance Zones for Trading Bots
How the Support/Resistance Zones indicator builds zones from swing pivots and ATR, and how to trade zone bounces and breaks in Setup.Cash.
2 min read · 298 words
Indicators
Market Structure Tools: Smart Money Concepts, ZigZag & More
How the SMC, ZigZag, Variable Heat Map, and Archer MA Trends indicators automate market structure analysis in Setup.Cash trading bots.
2 min read · 309 words
Indicators
Smart Money Concepts (SMC) Indicator Explained
How the SMC indicator automates break of structure, change of character, and order blocks for bots in Setup.Cash.
2 min read · 205 words
Indicators
Variable Heat Map (VHM) Indicator Explained
How the Variable Heat Map scores how hot each price area has been, grading zones for structure trades in Setup.Cash.
1 min read · 195 words
Start here
Build your trading bot workflow with structure
Use Setup.Cash to create, backtest, and paper trade rule-based strategies without relying on guesswork. Not financial advice. Trading involves risk.