Consensus (RichPole)

Consensus draws trend lines for you, the same way every time. Instead of joining two random points, it lets swing points vote: a line is only drawn when at least 4 swing points sit on it. It does this at three swing sizes, shows which lines just broke, and gives a BUY or SELL when a big line breaks on a closed candle. Free and open source.
WHAT YOU SEE
• Green lines = support, red lines = resistance. Thick = Large, thinner = Medium, grey dotted = Small (context only).
• A label on each big line, for example "Large support · 5 touches".
• Orange dashed lines = recently broken lines. Old support often becomes resistance, and the other way round.
• Light blue shade = the range between the nearest support and resistance.
• BUY / SELL labels with a dashed line showing which line broke. Hover a label to see the stop and targets.
• Entry, stop and two targets for the open trade, and the result of each finished trade in R (1R = the distance from entry to stop).
HOW IT WORKS
1. Swing highs and lows are found at three sizes: Small (L candles on each side), Medium (4 × L) and Large (16 × L). A swing is used only after it is confirmed, so it never moves.
2. Every pair of the last 8 swings of a size is a candidate line. Candidates that price has already closed through are thrown away.
3. Each candidate gets one vote for every Small swing that touches it (within 0.25 ATR). Lines with 4 or more votes are kept, and the best 2 per side and size are shown.
4. A line breaks when a candle closes more than 0.5 ATR through it.
SIGNALS AND TRADE (closed candles only)
• BUY: a Medium or Large resistance line breaks upward. SELL: a Medium or Large support line breaks downward.
• Entry: the next candle's open. Stop: the broken line plus 0.5 ATR. Trades with a stop wider than 3 ATR are skipped.
• Target 1: the nearest line on the other side at least 1R away (1.5R if there is none). Half the trade is closed there and the stop moves to entry.
• Target 2: the next line beyond Target 1 (3R if there is none).
• Trend check (Auto: on for 2H and higher): BUY only if the last Large swing low is higher than the one before it. SELL only if the last Large swing high is lower than the one before it.
• One trade at a time. If the stop and a target are hit on the same candle, the stop is counted.
SETTINGS
• Swing size: Auto (tested for each timeframe) or your own number
• Touches needed (4)
• Show Large, Medium and Small lines, line labels, recently broken lines, range shade
• Signals on or off, Trade with the big trend (Auto / On / Off), Signal on breaks of (Large and Medium / Large only)
• Stop and targets, trade result, colour candles in a trade, touch dots
• Colours, plus Advanced settings: touch tolerance, break distance, stop buffer, first target, maximum risk, part closed at Target 1, wicks or bodies
Alerts: BUY, SELL, Target 1 reached, Trade closed, plus one detailed alert with prices ("Any alert() function call").
HOW TO USE
• Use the lines as your map of support and resistance on any timeframe.
• Take signals on 4H and 2H, where the trend check is on. Below 2H, use the lines and treat signals with care.
• Enter after the signal candle closes, place the stop where shown, and risk a small fixed amount per trade.
WHAT IS DIFFERENT
Most trend line tools join the last two pivots, so lines jump around and many are weak. Here a line has to earn its place: it is chosen by votes from many swings, checked so price has not already closed through it, and shown at three sizes so you can see which lines matter most. The stop and targets come from the lines themselves, not from fixed numbers. Written from scratch.
LIMITATIONS
• We tested it on 18 markets (forex, gold, silver, oil, crypto, US and Indian indices, stocks) after trading costs. 4H gave the most consistent results, 1H and 30m were mixed, and 15m lost money. Forex pairs and oil were the weakest.
• More trades lose than win. The method depends on winners being bigger than losers, and losing streaks of 8–10 trades happened in testing.
• Lines show the current picture and update when new swings are confirmed. A swing is confirmed only after enough candles form on its right side (more for Large lines), so new lines appear with a delay. BUY / SELL labels never move once their candle has closed.
• On 4H there are only about one or two signals a month per market.
• Past results do not predict future results. For education only. Not financial advice.
WHAT YOU SEE
• Green lines = support, red lines = resistance. Thick = Large, thinner = Medium, grey dotted = Small (context only).
• A label on each big line, for example "Large support · 5 touches".
• Orange dashed lines = recently broken lines. Old support often becomes resistance, and the other way round.
• Light blue shade = the range between the nearest support and resistance.
• BUY / SELL labels with a dashed line showing which line broke. Hover a label to see the stop and targets.
• Entry, stop and two targets for the open trade, and the result of each finished trade in R (1R = the distance from entry to stop).
HOW IT WORKS
1. Swing highs and lows are found at three sizes: Small (L candles on each side), Medium (4 × L) and Large (16 × L). A swing is used only after it is confirmed, so it never moves.
2. Every pair of the last 8 swings of a size is a candidate line. Candidates that price has already closed through are thrown away.
3. Each candidate gets one vote for every Small swing that touches it (within 0.25 ATR). Lines with 4 or more votes are kept, and the best 2 per side and size are shown.
4. A line breaks when a candle closes more than 0.5 ATR through it.
SIGNALS AND TRADE (closed candles only)
• BUY: a Medium or Large resistance line breaks upward. SELL: a Medium or Large support line breaks downward.
• Entry: the next candle's open. Stop: the broken line plus 0.5 ATR. Trades with a stop wider than 3 ATR are skipped.
• Target 1: the nearest line on the other side at least 1R away (1.5R if there is none). Half the trade is closed there and the stop moves to entry.
• Target 2: the next line beyond Target 1 (3R if there is none).
• Trend check (Auto: on for 2H and higher): BUY only if the last Large swing low is higher than the one before it. SELL only if the last Large swing high is lower than the one before it.
• One trade at a time. If the stop and a target are hit on the same candle, the stop is counted.
SETTINGS
• Swing size: Auto (tested for each timeframe) or your own number
• Touches needed (4)
• Show Large, Medium and Small lines, line labels, recently broken lines, range shade
• Signals on or off, Trade with the big trend (Auto / On / Off), Signal on breaks of (Large and Medium / Large only)
• Stop and targets, trade result, colour candles in a trade, touch dots
• Colours, plus Advanced settings: touch tolerance, break distance, stop buffer, first target, maximum risk, part closed at Target 1, wicks or bodies
Alerts: BUY, SELL, Target 1 reached, Trade closed, plus one detailed alert with prices ("Any alert() function call").
HOW TO USE
• Use the lines as your map of support and resistance on any timeframe.
• Take signals on 4H and 2H, where the trend check is on. Below 2H, use the lines and treat signals with care.
• Enter after the signal candle closes, place the stop where shown, and risk a small fixed amount per trade.
WHAT IS DIFFERENT
Most trend line tools join the last two pivots, so lines jump around and many are weak. Here a line has to earn its place: it is chosen by votes from many swings, checked so price has not already closed through it, and shown at three sizes so you can see which lines matter most. The stop and targets come from the lines themselves, not from fixed numbers. Written from scratch.
LIMITATIONS
• We tested it on 18 markets (forex, gold, silver, oil, crypto, US and Indian indices, stocks) after trading costs. 4H gave the most consistent results, 1H and 30m were mixed, and 15m lost money. Forex pairs and oil were the weakest.
• More trades lose than win. The method depends on winners being bigger than losers, and losing streaks of 8–10 trades happened in testing.
• Lines show the current picture and update when new swings are confirmed. A swing is confirmed only after enough candles form on its right side (more for Large lines), so new lines appear with a delay. BUY / SELL labels never move once their candle has closed.
• On 4H there are only about one or two signals a month per market.
• Past results do not predict future results. For education only. Not financial advice.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.