OPEN-SOURCE SCRIPT
Atualizado

Trend Counter

265
TREND COUNTER is a Trend Exhaustion Indicator that tracks the persistence of price movements over a series of bars, helping traders identify potential trend exhaustion and reversals.
It compares each bar's value (typically the closing price) to a previous bar from a set lookback period (the lookback bar), counting consecutive bullish or bearish price movements.
The count resets when the trend reverses, signaling a potential shift in momentum.

• Price movement is considered bullish if the current price exceeds the lookback bar's price, incrementing the bullish count with each consecutive occurrence.
• Price movement is considered bearish if the current price is lower than the lookback bar's price, incrementing the bearish count with each consecutive occurrence.
• The count resets when the trend reverses.
• The user sets the threshold for sequence resets by defining the maximum number of consecutive occurrences.
• The count may reset before a trend reversal if it surpasses the user-defined threshold.

This type of indicator is useful for detecting trends, trend exhaustion, overbought or oversold conditions, and potential reversal points, helping traders anticipate market turns.

• Sequential occurrences gauge trend strength.
A long sequence of bullish bars suggests strong upward momentum, while consecutive bearish bars indicate sustained downward pressure.
This helps traders assess whether a trend is likely to continue or weaken.

• Identify thresholds for potential reversal points.
Counting consecutive bullish or bearish price movements can highlight overextended trends.
A trend reaching a predefined threshold may signal an upcoming reversal or momentum slowdown.

• Identify potential entry or exit points.
If trends are showing signs of exhaustion after a certain number of consecutive price movements, traders may use this for timing adjustments to their position.

• Assess risk.
Understanding trend strength helps traders better adjust stop-loss or take-profit levels.
Sequential counting provides a structured approach to trade management.

Visualization & Customization
The Sequential Momentum indicator visually represents consecutive bullish or bearish price movements to define trends and highlight key shifts.

• The bullish/bearish bar sequences are based on user-defined thresholds.
• Customizable bar coloring, labels, and plot shapes enhanced trend visualization.
• Dynamic color transitions make trend shifts easily identifiable.

Tracking consecutive bullish or bearish price movements can be effective when combined with other indicators or applied in specific market conditions (e.g., trending or volatile markets).
However, its reliability depends on market conditions and the trader’s interpretation.
This indicator is best used as a complementary tool rather than a standalone signal, helping traders visualize and quantify market momentum within a broader strategy.
Notas de Lançamento
Added:
1) Volume Surge Labels
2) Manual Count Reset
Notas de Lançamento
Fixed typo.
Notas de Lançamento
Fixed code error.
Notas de Lançamento
Repaired an error in the volume surge section of code.
Notas de Lançamento
1. Added improved management of neutral conditions (source == source[lookback]).
2. Add a tolerance to sustain or hinder trend continuation.
Notas de Lançamento
1. Added signals for days above/below a specified moving average, for example, days above the 10-day EMA.

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.