Multi-Condition Alert Builder⚡ Multi-Condition Alert Builder — Modular Alert Framework
The Multi-Condition Alert Builder is a powerful, code-free alert engine for TradingView. It allows traders to build complex multi-condition Buy/Sell alerts using simple dropdown menus — no Pine Script experience required.
Combine up to five separate conditions per side and trigger alerts based on your own custom logic.
🧠 How It Works
Each “Buy” and “Sell” side includes up to five configurable slots, where you can define:
Two data sources (indicators, price, or custom inputs)
A comparison or crossover condition
A static value (optional)
Once your slots are defined, the script combines these individual conditions according to your chosen mode:
Any – triggers when any enabled condition is true
All – same bar – triggers only when all enabled conditions occur on the same bar
All – within bars – allows conditions to complete within a user-defined lookback window
This gives traders fine-grained control to design powerful, adaptive alert logic directly in the chart — no coding required.
⚙️ Key Features
🧩 Up to 5 Buy and 5 Sell Slots – Fully customizable condition slots
🧠 Combine Logic Modes – Any / All / Within Bars flexibility
🔔 Custom Alerts – Generates separate Buy, Sell, or combined alert events
⏱️ Close-Bar Confirmation Option – Avoids premature signals on open candles
💡 Visual Signals – Plots arrows on chart for clear alert visualization
🔄 Indicator-Agnostic – Works with any sources or indicators available in your chart
🧮 Combine Logic Modes Explained
Mode Description
Any Triggers an alert if any active condition is met
All – same bar Requires all active slots to confirm on the same candle
All – within bars Conditions may complete within a set lookback window
🧭 Example Use Cases
Combine RSI, MACD, and MA crossovers for precision entries
Create alert triggers for momentum confluence setups
Build “stacked signal” logic (e.g., RSI < 30 and MACD crossover within 3 bars)
Quickly prototype and test multi-factor alert conditions
🧠 Usage Tip
Once your conditions are set, simply add TradingView alerts tied to:
“BUY↟” for long signals
“SELL↡” for short signals
“ANY ALERT” to trigger on either event
The Alert Builder becomes especially powerful when combined with your favorite custom indicators — enabling smart, automated alerts without extra coding.
⚡ In Short
Build. Combine. Alert.
The Multi-Condition Alert Builder gives you total flexibility to design complex alert logic — visually, intuitively, and efficiently — right on your chart.
Indicators and strategies
Bollinger Band Width Oscillator %🧠 Bollinger Band Width Oscillator %
The Bollinger Band Width Oscillator % is a volatility-focused tool that measures the relative width of Bollinger Bands and transforms it into an oscillator format. It helps traders visualize volatility expansions and contractions directly in an indicator pane — a powerful way to anticipate breakout or consolidation phases.
🔍 How It Works
Band Width %: Calculates the percentage distance between the upper and lower Bollinger Bands relative to the basis (SMA).
Smoothed Output: The raw bandwidth is smoothed using a moving average for cleaner, more stable signals.
Dynamic Volatility Zones: The script automatically computes average, high, and low volatility thresholds — each dynamically adapting to market conditions.
User-Adjustable Multipliers: Control how sensitive your high/low zones are with the High Zone Multiplier and Low Zone Multiplier inputs.
⚙️ Key Features
📊 Oscillator Format – Easy-to-read visualization of volatility compression and expansion.
🔥 High/Low Volatility Detection – Automatic labeling and color-coded alerts for shifts in volatility.
🧩 Dynamic Thresholds – Zones adjust automatically with market activity for adaptive sensitivity.
🧠 Hysteresis Logic – Prevents rapid signal flipping, improving clarity and reliability.
🎨 Custom Visuals – Adjustable smoothing and background highlights for quick interpretation.
📈 Trading Applications
Identify Breakouts: Rising bandwidth often precedes price breakouts.
Spot Consolidations: Low bandwidth indicates tightening volatility and potential range trades.
Volatility Regime Analysis: Understand market rhythm and adapt strategies accordingly.
⚡ Inputs
Parameter Description
Band Length Period for Bollinger Band calculation
Band Multiplier Standard deviation multiplier for the bands
Source Price source (default: close)
Smoothing Period for smoothing the oscillator line
High Zone Multiplier Adjusts the high-volatility threshold
Low Zone Multiplier Adjusts the low-volatility threshold
Highlight Volatility Zones Optional background color overlay
🧊 Usage Tip
Combine this indicator with momentum tools or price action analysis to confirm trade setups. Watch for transitions from low to high volatility zones — these often signal the beginning of major market moves.
Ehlers Ultrasmooth Filter (USF)# USF: Ultrasmooth Filter
## Overview and Purpose
The Ultrasmooth Filter (USF) is an advanced signal processing tool that represents the pinnacle of noise reduction technology for financial time series. Developed by John Ehlers, this filter implements a complex algorithm that provides exceptional smoothing capabilities while minimizing the lag typically associated with heavy filtering. USF builds upon the Super Smooth Filter (SSF) with enhanced noise suppression characteristics, making it particularly valuable for identifying clear trends in extremely noisy market conditions where even traditional smoothing techniques struggle to produce clean signals.
## Core Concepts
* **Maximum noise suppression:** Provides the highest level of noise reduction among Ehlers' filter designs
* **Optimized coefficient structure:** Uses carefully designed mathematical relationships to achieve superior filtering performance
* **Market application:** Particularly effective for long-term trend identification and minimizing false signals in highly volatile market conditions
The core innovation of USF is its second-order filter structure with optimized coefficients that create an exceptionally smooth frequency response. By careful mathematical design, USF achieves near-optimal noise suppression characteristics while minimizing the lag and waveform distortion that typically accompany such heavy filtering. This makes it especially valuable for identifying major market trends amid significant short-term volatility.
## Common Settings and Parameters
| Parameter | Default | Function | When to Adjust |
|-----------|---------|----------|---------------|
| Length | 20 | Controls the cutoff period | Increase for smoother signals, decrease for more responsiveness |
| Source | close | Price data used for calculation | Consider using hlc3 for a more balanced price representation |
**Pro Tip:** USF is ideal for defining major market trends - try using it with a length of 40-60 on daily charts to identify dominant market direction and ignoring shorter-term noise completely.
## Calculation and Mathematical Foundation
**Simplified explanation:**
The Ultrasmooth Filter creates an extremely clean price representation by combining current and past price data with previous filter outputs using precisely calculated mathematical relationships. This creates a highly effective "averaging" process that removes virtually all market noise while still maintaining the essential trend information.
**Technical formula:**
USF = (1-c1)X + (2c1-c2)X₁ - (c1+c3)X₂ + c2×USF₁ + c3×USF₂
Where coefficients are calculated as:
- a1 = exp(-1.414π/length)
- b1 = 2a1 × cos(1.414 × 180/length)
- c1 = (1 + c2 - c3)/4
- c2 = b1
- c3 = -a1²
> 🔍 **Technical Note:** The filter combines both feed-forward (X terms) and feedback (USF terms) components in a second-order structure, creating a response with exceptional roll-off characteristics and minimal passband ripple.
## Interpretation Details
The Ultrasmooth Filter can be used in various trading strategies:
* **Major trend identification:** The direction of USF indicates the dominant market trend with minimal noise interference
* **Signal generation:** Crossovers between price and USF generate high-reliability trade signals with minimal false positives
* **Support/resistance levels:** USF can act as strong dynamic support during uptrends and resistance during downtrends
* **Market regime identification:** The slope of USF helps identify whether markets are in trending or consolidation phases
* **Multiple timeframe analysis:** Using USF across different chart timeframes creates a cohesive picture of nested trend structures
## Limitations and Considerations
* **Significant lag:** The extreme smoothing comes with increased lag compared to lighter filters
* **Initialization period:** Requires more bars than simpler filters to stabilize at the start of data
* **Less suitable for short-term trading:** Generally too slow-responding for short-term strategies
* **Parameter sensitivity:** Performance depends on appropriate length selection for the timeframe
* **Complementary tools:** Best used alongside faster-responding indicators for timing signals
## References
* Ehlers, J.F. "Cycle Analytics for Traders," Wiley, 2013
* Ehlers, J.F. "Rocket Science for Traders," Wiley, 2001
Ehlers Even Better Sinewave (EBSW)# EBSW: Ehlers Even Better Sinewave
## Overview and Purpose
The Ehlers Even Better Sinewave (EBSW) indicator, developed by John Ehlers, is an advanced cycle analysis tool. This implementation is based on a common interpretation that uses a cascade of filters: first, a High-Pass Filter (HPF) to detrend price data, followed by a Super Smoother Filter (SSF) to isolate the dominant cycle. The resulting filtered wave is then normalized using an Automatic Gain Control (AGC) mechanism, producing a bounded oscillator that fluctuates between approximately +1 and -1. It aims to provide a clear and responsive measure of market cycles.
## Core Concepts
* **Detrending (High-Pass Filter):** A 1-pole High-Pass Filter removes the longer-term trend component from the price data, allowing the indicator to focus on cyclical movements.
* **Cycle Smoothing (Super Smoother Filter):** Ehlers' Super Smoother Filter is applied to the detrended data to further refine the cycle component, offering effective smoothing with relatively low lag.
* **Wave Generation:** The output of the SSF is averaged over a short period (typically 3 bars) to create the primary "wave".
* **Automatic Gain Control (AGC):** The wave's amplitude is normalized by dividing it by the square root of its recent power (average of squared values). This keeps the oscillator bounded and responsive to changes in volatility.
* **Normalized Oscillator:** The final output is a single sinewave-like oscillator.
## Common Settings and Parameters
| Parameter | Default | Function | When to Adjust |
| ----------- | ------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Source | close | Price data used for calculation. | Typically `close`, but `hlc3` or `ohlc4` can be used for a more comprehensive price representation. |
| HP Length | 40 | Lookback period for the 1-pole High-Pass Filter used for detrending. | Shorter periods make the filter more responsive to shorter cycles; longer periods focus on longer-term cycles. Adjust based on observed cycle characteristics. |
| SSF Length | 10 | Lookback period for the Super Smoother Filter used for smoothing the detrended cycle component. | Shorter periods result in a more responsive (but potentially noisier) wave; longer periods provide more smoothing. |
**Pro Tip:** The `HP Length` and `SSF Length` parameters should be tuned based on the typical cycle lengths observed in the market and the desired responsiveness of the indicator.
## Calculation and Mathematical Foundation
**Simplified explanation:**
1. Remove the trend from the price data using a 1-pole High-Pass Filter.
2. Smooth the detrended data using a Super Smoother Filter to get a clean cycle component.
3. Average the output of the Super Smoother Filter over the last 3 bars to create a "Wave".
4. Calculate the average "Power" of the Super Smoother Filter output over the last 3 bars.
5. Normalize the "Wave" by dividing it by the square root of the "Power" to get the final EBSW value.
**Technical formula (conceptual):**
1. **High-Pass Filter (HPF - 1-pole):**
`angle_hp = 2 * PI / hpLength`
`alpha1_hp = (1 - sin(angle_hp)) / cos(angle_hp)`
`HP = (0.5 * (1 + alpha1_hp) * (src - src )) + alpha1_hp * HP `
2. **Super Smoother Filter (SSF):**
`angle_ssf = sqrt(2) * PI / ssfLength`
`alpha2_ssf = exp(-angle_ssf)`
`beta_ssf = 2 * alpha2_ssf * cos(angle_ssf)`
`c2 = beta_ssf`
`c3 = -alpha2_ssf^2`
`c1 = 1 - c2 - c3`
`Filt = c1 * (HP + HP )/2 + c2*Filt + c3*Filt `
3. **Wave Generation:**
`WaveVal = (Filt + Filt + Filt ) / 3`
4. **Power & Automatic Gain Control (AGC):**
`Pwr = (Filt^2 + Filt ^2 + Filt ^2) / 3`
`EBSW_SineWave = WaveVal / sqrt(Pwr)` (with check for Pwr == 0)
> 🔍 **Technical Note:** The combination of HPF and SSF creates a form of band-pass filter. The AGC mechanism ensures the output remains scaled, typically between -1 and +1, making it behave like a normalized oscillator.
## Interpretation Details
* **Cycle Identification:** The EBSW wave shows the current phase and strength of the dominant market cycle as filtered by the indicator. Peaks suggest cycle tops, and troughs suggest cycle bottoms.
* **Trend Reversals/Momentum Shifts:** When the EBSW wave crosses the zero line, it can indicate a potential shift in the short-term cyclical momentum.
* Crossing up through zero: Potential start of a bullish cyclical phase.
* Crossing down through zero: Potential start of a bearish cyclical phase.
* **Overbought/Oversold Levels:** While normalized, traders often establish subjective or statistically derived overbought/oversold levels (e.g., +0.85 and -0.85, or other values like +0.7, +0.9).
* Reaching above the overbought level and turning down may signal a potential cyclical peak.
* Falling below the oversold level and turning up may signal a potential cyclical trough.
## Limitations and Considerations
* **Parameter Sensitivity:** The indicator's performance depends on tuning `hpLength` and `ssfLength` to prevailing market conditions.
* **Non-Stationary Markets:** In strongly trending markets with weak cyclical components, or in very choppy non-cyclical conditions, the EBSW may produce less reliable signals.
* **Lag:** All filtering introduces some lag. The Super Smoother Filter is designed to minimize this for its degree of smoothing, but lag is still present.
* **Whipsaws:** Rapid oscillations around the zero line can occur in volatile or directionless markets.
* **Requires Confirmation:** Signals from EBSW are often best confirmed with other forms of technical analysis (e.g., price action, volume, other non-correlated indicators).
## References
* Ehlers, J. F. (2002). *Rocket Science for Traders: Digital Signal Processing Applications*. John Wiley & Sons.
* Ehlers, J. F. (2013). *Cycle Analytics for Traders: Advanced Technical Trading Concepts*. John Wiley & Sons.
Buy And Hold Performance Screener - [JTCAPITAL]Buy And Hold Performance Screener – is a script designed to track and display multi-asset “buy and hold” performance curves and performance statistics over defined timeframes for selected symbols. It doesn’t attempt to time entries or exits; rather, it shows what would happen if one simply bought the asset at the defined start date and held it.
The indicator works by calculating in the following steps:
Start Date Definition
The script begins by reading an input for the start date. This defines the bar from which the equity curves begin.
Symbol Definitions & Close Price Retrieval
The script allows the user to specify up to ten tickers. For each ticker it uses request.security() on the “1D” timeframe to retrieve the daily close price of that symbol.
Plot Enable Inputs
For each ticker there is an input boolean controlling whether the equity curve for that ticker should be plotted.
Asset Name Cleaning
The helper function clean_name(string asset) => … takes the asset string (e.g., “CRYPTO:SOLUSD”) and manipulates it (via string splitting and replacements) to derive a cleaned short name (e.g., “SOL”). This name is used for visuals (labels, table headers).
Equity Curve Calculation (“HODL”)
The helper function f_HODL(closez) defines a variable equity that assumes a starting equity of 1 unit at the start date and then multiplies by the ratio of each bar’s close to the prior bar’s close: i.e. daily compounding of returns.
Performance Metrics Calculation
The helper function f_performance(closez) calculates, for each symbol’s close series, the percentage change of the current close relative to its close 30 days ago, 90 days ago, 180 days ago, 1 year ago (365 days), 2 years ago (730 days) and 3 years ago (1095 days).
Equity Curve Plots
For each ticker, if the corresponding plot input is true, the script assigns a plotted variable equal to the equity curve value. Its then drawing each selected equity curve on the chart, each in a distinct color.
Table Construction
If the plottable input is true, the script constructs a table and populates it with rows and column corresponding to the assigned tickers and the set 6 timeframes used for display.
Buy and Sell Conditions:
Since this is strictly a “buy-and-hold” performance screener, there are no explicit buy or sell signals generated or plotted. The script assumes: buy at the defined start_date, hold continuously to present. There are no filters, no exit logic, no take-profit or stop-loss. The benefit of this approach is to provide a clean benchmark of how selected assets would have performed if one simply adopted a passive “buy & hold” approach from a given start date.
Features and Parameters:
start_date (input.time) : Defines the date from which performance and equity curves begin.
ticker1 … ticker10 (input.symbol) : User-selectable asset symbols to include in the screener.
plot1 … plot10 (input.bool) : Boolean flags to enable/disable plotting of each asset’s equity curve.
plottable (input.bool) : Flag to enable/disable drawing the performance table.
Colored plotting + Labels for identifying each asset curve on the chart.
Specifications:
Here is a detailed breakdown of every calculation/variable/function used in the script and what each part means:
start_date
This is defined via input.time(timestamp("1 Jan 2025"), title = "Start Date"). It allows the user to pick a specific calendar date from which the equity curves and performance calculations will start.
ticker1 … ticker10
These inputs allow the user to select up to ten different assets (symbols) to monitor. The script uses each of these to fetch daily close prices.
plot1 … plot10
Boolean inputs controlling which of the ten asset equity curves are plotted. If plotX is true, the equity curve for ticker X will be visible; otherwise it will be not plotted. This gives the user flexibility to include or exclude specific assets on the chart.
Returns the cleaned asset short name.
This provides friendly text labels like “BTC”, “ETH”, “SOL”, etc., instead of full symbol codes.
The choice of distinct colours for each asset helps differentiate curves visually when multiple assets are overlaid.
Colour definitions
Variables color1…color10 are explicitly defined via color.rgb(r,g,b) to give each asset a unique colour (e.g., red, orange, yellow, green, cyan, blue, purple, pink, etc.).
What are the benefits of combining these calculations?
By computing equity curves for multiple assets from the same start date and overlaying them, you can visualise comparative performance of different assets under a uniform “buy & hold” assumption.
The performance table adds multi-horizon returns (30 D, 90 D, 180 D, 1 Y, 2 Y, 3 Y) which helps the user see both short-term and longer-term performance without having to manually compute returns.
The use of daily close data via request.security(..., "1D") removes dependency on the chart’s timeframe, thereby standardising the comparison across assets.
The equity curve and table together provide both visual (curve) and numerical (table) summaries of performance, making it easier to spot trends, divergences, and cross-asset comparisons at a glance.
Because it uses compounding (equity := equity * (closez / closez )), the curves reflect the real growth of a 1-unit investment held over time, rather than only simple returns.
The labelling of curves and the color-coding make the multi-asset overlay easier to interpret.
Using a clean start date ensures that all curves begin at the same point (1 unit at start_date), making relative performance intuitive.
Because of this, the script is useful as a benchmarking tool: rather than trying to pick entries or exit points, you can simply compare “what if I had held these assets since Jan 1 2025” (or your chosen date), and see which assets out-/under-performed in that period. It helps an investor or trader evaluate the long-term benefits of passive vs. active management, or of allocation decisions.
Please note:
The script assumes continuous daily data and does not account for dividends, fees, slippage, or tax implications.
It does not attempt to optimise timing or provide trading signals.
Returns prior to the start date are ignored (equity only begins once time >= start_date).
For newly listed assets with fewer than 365 or 730 or 1095 days of history, the longer-horizon returns may return na or misleading values.
Because it uses request.security() without specifying lookahead, and on “1D” timeframe, it complies with standard usage but you should verify there is no look-ahead bias in your particular setup.
ENJOY!
Ehlers Phasor Analysis (PHASOR)# PHASOR: Phasor Analysis (Ehlers)
## Overview and Purpose
The Phasor Analysis indicator, developed by John Ehlers, represents an advanced cycle analysis tool that identifies the phase of the dominant cycle component in a time series through complex signal processing techniques. This sophisticated indicator uses correlation-based methods to determine the real and imaginary components of the signal, converting them to a continuous phase angle that reveals market cycle progression. Unlike traditional oscillators, the Phasor provides unwrapped phase measurements that accumulate continuously, offering unique insights into market timing and cycle behavior.
## Core Concepts
* **Complex Signal Analysis** — Uses real and imaginary components to determine cycle phase
* **Correlation-Based Detection** — Employs Ehlers' correlation method for robust phase estimation
* **Unwrapped Phase Tracking** — Provides continuous phase accumulation without discontinuities
* **Anti-Regression Logic** — Prevents phase angle from moving backward under specific conditions
Market Applications:
* **Cycle Timing** — Precise identification of cycle peaks and troughs
* **Market Regime Analysis** — Distinguishes between trending and cycling market conditions
* **Turning Point Detection** — Advanced warning system for potential market reversals
## Common Settings and Parameters
| Parameter | Default | Function | When to Adjust |
|-----------|---------|----------|----------------|
| Period | 28 | Fixed cycle period for correlation analysis | Match to expected dominant cycle length |
| Source | Close | Price series for phase calculation | Use typical price or other smoothed series |
| Show Derived Period | false | Display calculated period from phase rate | Enable for adaptive period analysis |
| Show Trend State | false | Display trend/cycle state variable | Enable for regime identification |
## Calculation and Mathematical Foundation
**Technical Formula:**
**Stage 1: Correlation Analysis**
For period $n$ and source $x_t$:
Real component correlation with cosine wave:
$$R = \frac{n \sum x_t \cos\left(\frac{2\pi t}{n}\right) - \sum x_t \sum \cos\left(\frac{2\pi t}{n}\right)}{\sqrt{D_{cos}}}$$
Imaginary component correlation with negative sine wave:
$$I = \frac{n \sum x_t \left(-\sin\left(\frac{2\pi t}{n}\right)\right) - \sum x_t \sum \left(-\sin\left(\frac{2\pi t}{n}\right)\right)}{\sqrt{D_{sin}}}$$
where $D_{cos}$ and $D_{sin}$ are normalization denominators.
**Stage 2: Phase Angle Conversion**
$$\theta_{raw} = \begin{cases}
90° - \arctan\left(\frac{I}{R}\right) \cdot \frac{180°}{\pi} & \text{if } R eq 0 \\
0° & \text{if } R = 0, I > 0 \\
180° & \text{if } R = 0, I \leq 0
\end{cases}$$
**Stage 3: Phase Unwrapping**
$$\theta_{unwrapped}(t) = \theta_{unwrapped}(t-1) + \Delta\theta$$
where $\Delta\theta$ is the normalized phase difference.
**Stage 4: Ehlers' Anti-Regression Condition**
$$\theta_{final}(t) = \begin{cases}
\theta_{final}(t-1) & \text{if regression conditions met} \\
\theta_{unwrapped}(t) & \text{otherwise}
\end{cases}$$
**Derived Calculations:**
Derived Period: $P_{derived} = \frac{360°}{\Delta\theta_{final}}$ (clamped to )
Trend State:
$$S_{trend} = \begin{cases}
1 & \text{if } \Delta\theta \leq 6° \text{ and } |\theta| \geq 90° \\
-1 & \text{if } \Delta\theta \leq 6° \text{ and } |\theta| < 90° \\
0 & \text{if } \Delta\theta > 6°
\end{cases}$$
> 🔍 **Technical Note:** The correlation-based approach provides robust phase estimation even in noisy market conditions, while the unwrapping mechanism ensures continuous phase tracking across cycle boundaries.
## Interpretation Details
* **Phasor Angle (Primary Output):**
- **+90°**: Potential cycle peak region
- **0°**: Mid-cycle ascending phase
- **-90°**: Potential cycle trough region
- **±180°**: Mid-cycle descending phase
* **Phase Progression:**
- Continuous upward movement → Normal cycle progression
- Phase stalling → Potential cycle extension or trend development
- Rapid phase changes → Cycle compression or volatility spike
* **Derived Period Analysis:**
- Period < 10 → High-frequency cycle dominance
- Period 15-40 → Typical swing trading cycles
- Period > 50 → Trending market conditions
* **Trend State Variable:**
- **+1**: Long trend conditions (slow phase change in extreme zones)
- **-1**: Short trend or consolidation (slow phase change in neutral zones)
- **0**: Active cycling (normal phase change rate)
## Applications
* **Cycle-Based Trading:**
- Enter long positions near -90° crossings (cycle troughs)
- Enter short positions near +90° crossings (cycle peaks)
- Exit positions during mid-cycle phases (0°, ±180°)
* **Market Timing:**
- Use phase acceleration for early trend detection
- Monitor derived period for cycle length changes
- Combine with trend state for regime-appropriate strategies
* **Risk Management:**
- Adjust position sizes based on cycle clarity (derived period stability)
- Implement different risk parameters for trending vs. cycling regimes
- Use phase velocity for stop-loss placement timing
## Limitations and Considerations
* **Parameter Sensitivity:**
- Fixed period assumption may not match actual market cycles
- Requires cycle period optimization for different markets and timeframes
- Performance degrades when multiple cycles interfere
* **Computational Complexity:**
- Correlation calculations over full period windows
- Multiple mathematical transformations increase processing requirements
- Real-time implementation requires efficient algorithms
* **Market Conditions:**
- Most effective in markets with clear cyclical behavior
- May provide false signals during strong trending periods
- Requires sufficient historical data for correlation analysis
Complementary Indicators:
* MESA Adaptive Moving Average (cycle-based smoothing)
* Dominant Cycle Period indicators
* Detrended Price Oscillator (cycle identification)
## References
1. Ehlers, J.F. "Cycle Analytics for Traders." Wiley, 2013.
2. Ehlers, J.F. "Cybernetic Analysis for Stocks and Futures." Wiley, 2004.
Ehlers Autocorrelation Periodogram (EACP)# EACP: Ehlers Autocorrelation Periodogram
## Overview and Purpose
Developed by John F. Ehlers (Technical Analysis of Stocks & Commodities, Sep 2016), the Ehlers Autocorrelation Periodogram (EACP) estimates the dominant market cycle by projecting normalized autocorrelation coefficients onto Fourier basis functions. The indicator blends a roofing filter (high-pass + Super Smoother) with a compact periodogram, yielding low-latency dominant cycle detection suitable for adaptive trading systems. Compared with Hilbert-based methods, the autocorrelation approach resists aliasing and maintains stability in noisy price data.
EACP answers a central question in cycle analysis: “What period currently dominates the market?” It prioritizes spectral power concentration, enabling downstream tools (adaptive moving averages, oscillators) to adjust responsively without the lag present in sliding-window techniques.
## Core Concepts
* **Roofing Filter:** High-pass plus Super Smoother combination removes low-frequency drift while limiting aliasing.
* **Pearson Autocorrelation:** Computes normalized lag correlation to remove amplitude bias.
* **Fourier Projection:** Sums cosine and sine terms of autocorrelation to approximate spectral energy.
* **Gain Normalization:** Automatic gain control prevents stale peaks from dominating power estimates.
* **Warmup Compensation:** Exponential correction guarantees valid output from the very first bar.
## Implementation Notes
**This is not a strict implementation of the TASC September 2016 specification.** It is a more advanced evolution combining the core 2016 concept with techniques Ehlers introduced later. The fundamental Wiener-Khinchin theorem (power spectral density = Fourier transform of autocorrelation) is correctly implemented, but key implementation details differ:
### Differences from Original 2016 TASC Article
1. **Dominant Cycle Calculation:**
- **2016 TASC:** Uses peak-finding to identify the period with maximum power
- **This Implementation:** Uses Center of Gravity (COG) weighted average over bins where power ≥ 0.5
- **Rationale:** COG provides smoother transitions and reduces susceptibility to noise spikes
2. **Roofing Filter:**
- **2016 TASC:** Simple first-order high-pass filter
- **This Implementation:** Canonical 2-pole high-pass with √2 factor followed by Super Smoother bandpass
- **Formula:** `hp := (1-α/2)²·(p-2p +p ) + 2(1-α)·hp - (1-α)²·hp `
- **Rationale:** Evolved filtering provides better attenuation and phase characteristics
3. **Normalized Power Reporting:**
- **2016 TASC:** Reports peak power across all periods
- **This Implementation:** Reports power specifically at the dominant period
- **Rationale:** Provides more meaningful correlation between dominant cycle strength and normalized power
4. **Automatic Gain Control (AGC):**
- Uses decay factor `K = 10^(-0.15/diff)` where `diff = maxPeriod - minPeriod`
- Ensures K < 1 for proper exponential decay of historical peaks
- Prevents stale peaks from dominating current power estimates
### Performance Characteristics
- **Complexity:** O(N²) where N = (maxPeriod - minPeriod)
- **Implementation:** Uses `var` arrays with native PineScript historical operator ` `
- **Warmup:** Exponential compensation (§2 pattern) ensures valid output from bar 1
### Related Implementations
This refined approach aligns with:
- TradingView TASC 2025.02 implementation by blackcat1402
- Modern Ehlers cycle analysis techniques post-2016
- Evolved filtering methods from *Cycle Analytics for Traders*
The code is mathematically sound and production-ready, representing a refined version of the autocorrelation periodogram concept rather than a literal translation of the 2016 article.
## Common Settings and Parameters
| Parameter | Default | Function | When to Adjust |
|-----------|---------|----------|---------------|
| Min Period | 8 | Lower bound of candidate cycles | Increase to ignore microstructure noise; decrease for scalping. |
| Max Period | 48 | Upper bound of candidate cycles | Increase for swing analysis; decrease for intraday focus. |
| Autocorrelation Length | 3 | Averaging window for Pearson correlation | Set to 0 to match lag, or enlarge for smoother spectra. |
| Enhance Resolution | true | Cubic emphasis to highlight peaks | Disable when a flatter spectrum is desired for diagnostics. |
**Pro Tip:** Keep `(maxPeriod - minPeriod)` ≤ 64 to control $O(n^2)$ inner loops and maintain responsiveness on lower timeframes.
## Calculation and Mathematical Foundation
**Explanation:**
1. Apply roofing filter to `source` using coefficients $\alpha_1$, $a_1$, $b_1$, $c_1$, $c_2$, $c_3$.
2. For each lag $L$ compute Pearson correlation $r_L$ over window $M$ (default $L$).
3. For each period $p$, project onto Fourier basis:
$C_p=\sum_{n=2}^{N} r_n \cos\left(\frac{2\pi n}{p}\right)$ and $S_p=\sum_{n=2}^{N} r_n \sin\left(\frac{2\pi n}{p}\right)$.
4. Power $P_p=C_p^2+S_p^2$, smoothed then normalized via adaptive peak tracking.
5. Dominant cycle $D=\frac{\sum p\,\tilde P_p}{\sum \tilde P_p}$ over bins where $\tilde P_p≥0.5$, warmup-compensated.
**Technical formula:**
```
Step 1: hp_t = ((1-α₁)/2)(src_t - src_{t-1}) + α₁ hp_{t-1}
Step 2: filt_t = c₁(hp_t + hp_{t-1})/2 + c₂ filt_{t-1} + c₃ filt_{t-2}
Step 3: r_L = (M Σxy - Σx Σy) / √
Step 4: P_p = (Σ_{n=2}^{N} r_n cos(2πn/p))² + (Σ_{n=2}^{N} r_n sin(2πn/p))²
Step 5: D = Σ_{p∈Ω} p · ĤP_p / Σ_{p∈Ω} ĤP_p with warmup compensation
```
> 🔍 **Technical Note:** Warmup uses $c = 1 / (1 - (1 - \alpha)^{k})$ to scale early-cycle estimates, preventing low values during initial bars.
## Interpretation Details
- **Primary Dominant Cycle:**
- High $D$ (e.g., > 30) implies slow regime; adaptive MAs should lengthen.
- Low $D$ (e.g., < 15) signals rapid oscillations; shorten lookback windows.
- **Normalized Power:**
- Values > 0.8 indicate strong cycle confidence; consider cyclical strategies.
- Values < 0.3 warn of flat spectra; favor trend or volatility approaches.
- **Regime Shifts:**
- Rapid drop in $D$ alongside rising power often precedes volatility expansion.
- Divergence between $D$ and price swings may highlight upcoming breakouts.
## Limitations and Considerations
- **Spectral Leakage:** Limited lag range can smear peaks during abrupt volatility shifts.
- **O(n²) Segment:** Although constrained (≤ 60 loops), wide period spans increase computation.
- **Stationarity Assumption:** Autocorrelation presumes quasi-stationary cycles; regime changes reduce accuracy.
- **Latency in Noise:** Even with roofing, extremely noisy assets may require higher `avgLength`.
- **Downtrend Bias:** Negative trends may clip high-pass output; ensure preprocessing retains signal.
## References
* Ehlers, J. F. (2016). “Past Market Cycles.” *Technical Analysis of Stocks & Commodities*, 34(9), 52-55.
* Thinkorswim Learning Center. “Ehlers Autocorrelation Periodogram.”
* Fab MacCallini. “autocorrPeriodogram.R.” GitHub repository.
* QuantStrat TradeR Blog. “Autocorrelation Periodogram for Adaptive Lookbacks.”
* TradingView Script by blackcat1402. “Ehlers Autocorrelation Periodogram (Updated).”
NY Midnight High/Low Arrows (Auto-Show)🇺🇸 English Explanation
This indicator automatically marks the daily high and low of the New York session.
It draws arrows (▼▲) at the highest and lowest prices after New York midnight (00:00),
and can optionally display small horizontal dotted lines at those levels.
It helps traders identify daily liquidity zones and key turning points in price action.
🇸🇦 الشرح بالعربية
هذا المؤشر يحدد القمة والقاع اليومية لجلسة نيويورك بشكل تلقائي.
يرسم أسهماً (▼▲) عند أعلى وأدنى سعر بعد منتصف الليل بتوقيت نيويورك (00:00)،
ويمكنه أيضًا عرض خطوط أفقية منقطة صغيرة عند تلك المستويات.
يساعد المتداول في معرفة مناطق السيولة اليومية ونقاط الانعكاس المهمة في حركة السعر.
Strong PivotsThis finds pivots based on your inputs (number of candles back and forward that are above or below the range of the potential pivot points) and then optionally changes the color to help you visually identify the pivot. You can also specify pivots as strong pivots if they reverse in 1 time segment beyond a certain percentage (wick % of full candle range).
For example, if the pivot is at a high point but has a green body candle and a wick > 35% of the candle, it will change the body color to red to help visually understand that the candle can be considered a strong part of the downtrend, regardless of it closing green. This will help your mind interpret the top pivot candle as part of the potential trend reversal for the following candles and could even be used as part of your strategy ruleset.
Devils Mark Plus Volume Imbalance Multi TimeframeFollowing the success of the devil marks multi timeframe indicator I decided to add volume imbalance. Devils mark code remains unchanged here.
Functionality of the Devils mark remains the same as in when a candle prints without a wick at either end it indicates an area of price imbalance and it is assumed that the market will want to re-balance this level at some point in the future.
The same can be said for volume imbalances where 2 adjacent candles bodies don't meet. Again it it assumed the market will come back at some point to readdress this imbalance. Once mitigated the volume imbalance will be removed by the indicator.
These areas are best used to add confluence to trade ideas and shouldn't be used to formulate trade ideas on their own.
A table is included for easy reference.
Please note that data for timeframes lower than the current timeframe will not be shown. It is also worth noting that data on much higher timeframes than the current chart timeframe may not be shown due to data restrictions. If in doubt go up a timeframe !
I hope you find this indicator useful.
FDF — EMAs+VWAP with setup & entry (stable scale)the 9 and 21, vwap - and support an restianst, marking each entry when it pulling in our out to the 21. used 90% of the candle over the 21
BullishBuzz ORB – CALL/PUT with Chart Alerts (Final)⚙️ The Bullish BuzzBot System
1️⃣ Data Feeds (Input Layer)
BuzzBot connects to live market data through TradingView’s chart engine (or via API for more advanced builds).
It continuously pulls:
Price data (open, high, low, close per bar)
Volume
RSI, MACD, VWAP, EMA 9/21 values
Timestamps & bar intervals (1m, 5m, 15m)
That’s the raw fuel — the same data you’d use for charting.
2️⃣ Indicator Engine (Signal Layer)
This is where the logic lives — it calculates conditions in real time.
BuzzBot checks for patterns like:
EMA 9/21 Cross: detects momentum shift
VWAP Reclaim or Reject: confirms intraday bias
RSI < 50 or > 70: momentum confirmation
MACD Cross: trend continuation signal
Volume > 2x average: validates conviction
Reactive Curvature Smoother Moving Average IndicatorSummary in one paragraph
RCS MA is a reactive curvature smoother for any liquid instrument on intraday through swing timeframes. It helps you act only when context strengthens by adapting its window length with a normalized path energy score and by smoothing with robust residual weights over a quadratic fit, then optionally blending a capped one step forecast. Add it to a clean chart and watch the single colored line. Shapes can shift while a bar forms and settle on close. For conservative use, judge on bar close.
Scope and intent
• Markets: major FX pairs, index futures, large cap equities, liquid crypto
• Timeframes: one minute to daily
• Purpose: reduce lag in trends while resisting chop and outliers
• Limits: indicator only, no orders
Originality and usefulness
• Novelty: adaptive window selection by minimizing normalized path energy with directionality bias, plus Huber weighted residuals and curvature aware penalty, finished with a mintick capped forecast blend
• Failure modes addressed: whipsaws from fixed length MAs and outlier spikes that pull means
• Testable: Inputs expose all components and optional diagnostics show chosen length, directionality, and energy
• Portable yardstick: forecast cap uses mintick to stay symbol aware
Method overview in plain language
Base measures
• Range span of the tested window and a path energy defined as the sum of squared price increments, normalized by span
Components
Adaptive window chooser: scans L between Min and Max using an energy over trend score and picks the lowest score
Robust smoother: fits a quadratic to the last L bars, computes residuals, applies Huber weights and an exponential residual penalty scaled down when curvature is high
Forecast blend: projects one step ahead from the quadratic, caps displacement by a multiple of mintick, blends by user weight
Fusion rule
• Final line equals robust mean plus optional capped forecast blend
Signal rule
• Visual bias only: color turns lime when close is above the line, red otherwise
What you will see on the chart
• One colored line that tightens in trends and relaxes in chop
• Optional debug overlays for core value, chosen L, directionality, and energy
• Optional last bar label with L, directionality, and energy
• Reminder: drawings can move intrabar and settle on close
Inputs with guidance
Setup
• Source: price series to smooth
Logic
• Min window l_min. Typical 5 to 21. Higher increases stability, adds lag
• Max window l_max. Typical 40 to 128. Higher reduces noise, adds lag ceiling
• Length step grid_step. Typical 1 to 8. Smaller is finer and heavier
• Trend bias trend_bias. Typical 0.50 to 0.80. Higher favors trend persistence
• Residual penalty lambda_base. Typical 0.8 to 2.0. Higher downweights large residuals more
• Huber threshold huber_k. Typical 1.5 to 3.0. Higher admits more outliers
• Curvature guard curv_guard. Typical 0.3 to 1.0. Higher reduces influence when curve is tight
• Forecast blend lead_blend. 0 disables. Typical 0.10 to 0.40
• Forecast cap lead_limit. Typical 1 to 5 minticks
• Show chosen L and metrics show_debug. Diagnostics toggle
Optional: enable diagnostics to see length, direction, and energy
Realism and responsible publication
• No performance claims. Past results never guarantee future outcomes
• Shapes can move while bars are open and settle on close
• Use on standard candles for analysis and combine with your own risk process
Honest limitations and failure modes
• Very quiet regimes can reduce energy contrast, length selection may hover near the bounds
• Gap heavy symbols can disrupt quadratic fit on the window edges
• Excessive forecast blend may look anticipatory; use low values and the cap
COT Index Indicator 1) One‑liner
My version of the OTC COT Index indicator: a 0–120 oscillator built from CFTC COT data that shows where Commercial, Noncommercial, and Nonreportable net positions sit relative to recent extremes.
2) Short paragraph
This is my version of the OTC COT Index indicator. It converts CFTC Commitments of Traders (COT) net positions into a normalized 0–120 oscillator for each trader group—Commercials, Noncommercials, and Nonreportables—so you can quickly see when positioning is near recent highs or lows. Data comes from TradingView’s official COT library and supports both “Futures Only” and “Futures and Options” reports.
3) Compact bullets
What: My version of the OTC COT Index indicator
Why: Quickly spot when trader groups are near positioning extremes
Data: CFTC COT via TradingView/LibraryCOT/2; Futures Only or Futures & Options
How: Index = 120 × (Current − Min) ÷ (Max − Min) over a configurable lookback
Plots: Commercials (blue), Noncommercials (orange), Nonreportables (red)
Lines: Overbought, Midline, Oversold, optional 0/100, upper/lower bounds
Note: Values are relative to the chosen window; not trading advice
4) Publication‑ready (sections)
Overview
My version of the OTC COT Index indicator. It turns CFTC COT positioning into a 0–120 oscillator per trader group (Commercials, Noncommercials, Nonreportables) to highlight relative extremes.
Data source
CFTC Commitments of Traders via TradingView’s official library (TradingView/LibraryCOT/2).
Supports “Futures Only” and “Futures and Options.”
Method
Net positions = Longs − Shorts.
Index = 120 × (Current Net − Min(Net, Lookback)) ÷ (Max(Net, Lookback) − Min(Net, Lookback)).
Inputs
Weeks Look Back (normalization window)
Weeks Look Back for Historical Hi/Los (longer reference)
Report Type selection
Visuals
Three indexes by trader group, plus reference levels (OB/OS, Midline, optional 0/100).
Notes
Some symbols map to specific CFTC codes for reliability.
If no relevant COT data exists for the symbol, the script reports it clearly.
If you want this adapted to a specific platform’s character limits (e.g., TradingView’s publish dialog), tell me the target length and I’ll trim it to fit.
8 Médias Exponenciais (Config.)This indicator provides a highly flexible system of eight fully customizable moving averages (MAs), allowing traders to visualize short-, medium-, and long-term market trends with precision and adaptability. Each of the eight moving averages can be independently configured by the user, both in period length and type — supporting either Simple Moving Average (SMA) or Exponential Moving Average (EMA).
Fixed Dollar Risk LinesFixed Dollar Risk Lines is a utility indicator that converts a user-defined dollar risk into price distance and plots risk lines above and below the current price for popular futures contracts. It helps you place stops or entries at a consistent dollar risk per trade, regardless of the market’s tick value or tick size.
What it does:
-You choose a dollar amount to risk (e.g., $100) and a futures contract (ES, NQ, GC, YM, RTY, PL, SI, CL, BTC).
The script automatically:
-Looks up the contract’s tick value and tick size
-Converts your dollar risk into number of ticks
-Converts ticks into price distance
Plots:
-Long Risk line below current price
-Short Risk line above current price
-Optional labels show exact price levels and an information table summarizes your settings.
Key features
-Consistent dollar risk across instruments
-Supports major futures contracts with built‑in tick values and sizes
-Toggle Long and Short risk lines independently
-Customizable line width and colors (lines and labels)
-Right‑axis price level display for quick reading
-Compact info table with contract, risk, and computed prices
Typical use
-Long setups: use the green line as a stop level below entry to match your chosen dollar risk.
-Short setups: use the red line as a stop level above entry to match your chosen dollar risk.
-Quickly compare how the same dollar risk translates to distance on different contracts.
Inputs
-Risk Amount (USD)
-Futures Contract (ES, NQ, GC, YM, RTY, PL, SI, CL, BTC)
-Show Long/Short lines (toggles)
-Line Width
-Colors for lines and labels
Notes
-Designed for futures symbols that match the listed contracts’ tick specs. If your symbol has different tick value/size than the defaults, results will differ.
-Intended for educational/informational use; not financial advice.
-This tool streamlines risk placement so you can focus on execution while keeping dollar risk consistent across markets.
F & W SMC Alerthis script is a custom TradingView indicator designed to combine elements of a trend‑following VWAP approach (inspired by the “Fabio” strategy) with a smart‑money‑concepts framework (inspired by Waqar Asim). Here’s what it does:
* **Directional bias:** It calculates a 15‑minute VWAP and compares the current 15‑minute close to it. When price is above the 15‑minute VWAP, the script assumes a long bias; when below, a short bias. This reflects the trend‑following aspect of the Fabio strategy.
* **Liquidity sweeps:** Using recent pivot highs and lows on the current timeframe, it identifies when price takes out a recent high (for potential longs) or low (for potential shorts). This represents a “liquidity sweep” — a fake breakout that collects stops and signals a possible reversal or continuation.
* **Break of structure (BOS):** After a sweep, the script confirms that price is breaking away from the swept level (i.e., higher than recent highs for longs or lower than recent lows for shorts). This BOS confirmation helps avoid false signals.
* **Entry filters:** For a long setup, the bias must be long, there must be a liquidity sweep followed by a BOS, and price must reclaim the current‑timeframe VWAP. For a short setup, the opposite conditions apply (short bias, sweep + BOS to the downside, and price rejecting the VWAP).
* **Alerts and plot:** It provides two alert conditions (“Fabio‑Waqar Long Setup” and “Fabio‑Waqar Short Setup”) that you can attach to notifications. It also plots the intraday VWAP on your chart for visual reference.
In short, this script watches for a confluence of trend direction, liquidity sweeps, structural shifts, and VWAP reclaim/rejection, and then notifies you when those conditions align. You can use it as an alerting tool to identify high‑probability setups based on these combined strategies.
Relative Valuation OscillatorThis is a Relative Valuation Oscillator (RVO) this is attempt of replication OTC Valuation - a sophisticated multi-asset comparison indicator designed to measure whether the current asset is overvalued or undervalued relative to up to three reference assets.
Overview
The RVO compares the current chart's asset against reference assets (default: 30-Year Treasury Bonds, Gold, and US Dollar Index) to determine relative strength and valuation extremes. It outputs normalized oscillator values ranging from -100 (undervalued) to +100 (overvalued).
Key Features
Multiple Calculation Methods
The indicator offers 5 different calculation approaches:
Simple Ratio - Normalized ratio deviation from average
Percentage Difference - Percentage change comparison
Ratio Z-Score - Standard deviation-based comparison
Rate of Change Comparison - Momentum differential analysis (default)
Normalized Ratio - Min-max normalized ratio
Configurable Reference Assets
Asset 1: Default ZB (30-Year Treasury Bond Futures) - tracks interest rate sensitivity
Asset 2: Default GC (Gold Futures) - tracks safe-haven and inflation dynamics
Asset 3: Default DXY (US Dollar Index) - tracks currency strength
Each asset can be enabled/disabled independently
Fully customizable symbols
Visual Components
Multiple oscillator lines - One for each active reference asset (color-coded)
Average line - Combined signal from all active assets
Overbought/Oversold zones - Configurable threshold levels (default: ±80)
Zero line - Neutral valuation reference
Background coloring - Visual zones for extreme conditions
Signal line - Optional smoothed average
Entry markers - Long/short signals at key reversals
Signal Generation
Crossover alerts - When crossing overbought/oversold levels
Entry signals - Reversals from extreme zones
Divergence detection - Bullish/bearish divergences between price and oscillator
Zero-line crosses - Trend strength changes
Customization Options
Lookback period (10-500): Controls statistical calculation window
Normalization period (50-1000): Determines scaling sensitivity
Smoothing toggle: Optional EMA/SMA smoothing with adjustable period
Visual customization: Colors, levels, and display options
Information Table
Real-time dashboard showing:
Average oscillator value
Current status (Overvalued/Undervalued/Neutral)
Current asset price
Individual values for each active reference asset
Use Cases
Mean reversion trading - Identify extreme relative valuations for reversal trades
Sector rotation - Compare assets within similar categories
Hedging strategies - Understand correlation dynamics
Multi-asset analysis - Simultaneously compare against bonds, commodities, and currencies
Divergence trading - Spot price/oscillator divergences
Trading Strategy Applications
Long signals: When oscillator crosses above oversold level (asset recovering from undervaluation)
Short signals: When oscillator crosses below overbought level (asset declining from overvaluation)
Confirmation: Use multiple reference assets for stronger signals
Risk management: Avoid trading when all assets show neutral readings
This indicator is particularly useful for traders who want to incorporate inter-market analysis and relative strength concepts into their trading decisions, especially in OTC (Over-The-Counter) and futures markets.
Fabio + Waqar SMC AlertThis script is a custom TradingView indicator designed to combine elements of a trend‑following VWAP approach (inspired by the “Fabio” strategy) with a smart‑money‑concepts framework (inspired by Waqar Asim). Here’s what it does:
* **Directional bias:** It calculates a 15‑minute VWAP and compares the current 15‑minute close to it. When price is above the 15‑minute VWAP, the script assumes a long bias; when below, a short bias. This reflects the trend‑following aspect of the Fabio strategy.
* **Liquidity sweeps:** Using recent pivot highs and lows on the current timeframe, it identifies when price takes out a recent high (for potential longs) or low (for potential shorts). This represents a “liquidity sweep” — a fake breakout that collects stops and signals a possible reversal or continuation.
* **Break of structure (BOS):** After a sweep, the script confirms that price is breaking away from the swept level (i.e., higher than recent highs for longs or lower than recent lows for shorts). This BOS confirmation helps avoid false signals.
* **Entry filters:** For a long setup, the bias must be long, there must be a liquidity sweep followed by a BOS, and price must reclaim the current‑timeframe VWAP. For a short setup, the opposite conditions apply (short bias, sweep + BOS to the downside, and price rejecting the VWAP).
* **Alerts and plot:** It provides two alert conditions (“Fabio‑Waqar Long Setup” and “Fabio‑Waqar Short Setup”) that you can attach to notifications. It also plots the intraday VWAP on your chart for visual reference.
In short, this script watches for a confluence of trend direction, liquidity sweeps, structural shifts, and VWAP reclaim/rejection, and then notifies you when those conditions align. You can use it as an alerting tool to identify high‑probability setups based on these combined strategies.
Directional EMA - For Loop | Lyro RSDirectional EMA - For Loop | Lyro RS
Introduction
This indicator combines multi-type moving averages, loop-based momentum scoring, and divergence detection for adaptive trend and reversal analysis.
Key Features:
Multiple Moving Average Selection System: Choose from 16 different MA types - HMA, ALMA and JMA etc. To match your style best.
For Loop Based Scoring: Uses a From / To system to calculate cumulative buying/selling pressure across recent price action.
Signal Threshold: Long / Short threshold levels to control the sensitivity for different market conditions.
Divergence Detection: Regular bullish / bearish with clear labels for potential reversal points.
Clean Visuals: Multiple color themes with table and color based indicator line for easy reading.
How It Works:
Core Calculation: The indicator first creates a directional signal by comparing price to your selected moving average, normalized for current volatility.
Loop Analysis: This signal feeds into a for-loop that scores recent price history, generating a cumulative momentum value.
Signal Generation:
Bullish signals trigger when the score crosses above the Upper Threshold
Bearish signals trigger when the score crosses below the Lower Threshold
Divergence Alerts: Automatically detects when price makes new highs/lows that aren't confirmed by the oscillator.
Practical Use:
Trend Identification: The color-coded oscillator and signal table help confirm trend direction.
Reversal Warning: Divergence labels highlight potential trend exhaustion points for careful watch.
Customization:
Adjust MA type and length for sensitivity tuning
Modify loop parameters (From/To) to change analysis depth
Fine-tune threshold levels for signal frequency
Enable/disable divergence detection as needed
⚠️ Disclaimer
This tool is for technical analysis education only. It does not guarantee results or constitute financial advice. Always use proper risk management and combine with other analysis methods. Past performance doesn't predict future results.
Bollinger Band Spread (Dunk)Bollinger Band Width measures the distance between the upper and lower Bollinger Bands. It reflects market volatility—wider bands mean higher volatility, narrower bands mean lower volatility.
When the width contracts to low levels, it can signal price consolidation and potential breakouts. When the width expands, it indicates active markets or strong trends.
Traders use it to spot volatility squeezes, confirm breakouts, and compare relative volatility across assets or timeframes.
Custom MA & VWAP Crossover SignalsCrossover logic:
Buy = MA1 crosses above MA2.
Sell = MA1 crosses below MA2.
Labels show at the bar where crossover happens:
Green “Buy” label at bar high.
Red “Sell” label at bar low.






















