Williams Percent Range with ThresholdEnhance your trading analysis with the "Williams Percent Range with Threshold" indicator, a powerful modification of the classic Williams %R oscillator. This custom version introduces customizable uptrend and downtrend thresholds, combined with dynamic candlestick coloring to visually highlight market trends. Originally designed to identify overbought and oversold conditions, this script takes it a step further by allowing traders to define specific threshold levels for trend detection, making it a versatile tool for momentum and trend-following strategies.
Key Features:
Customizable Thresholds: Set your own uptrend (default: -16) and downtrend (default: -67) thresholds to adapt the indicator to your trading style.
Dynamic Candlestick Coloring: Candles turn green during uptrends, red during downtrends, and gray in neutral conditions, providing an intuitive visual cue directly on the price chart.
Flexible Length: Adjust the lookback period (default: 50) to fine-tune sensitivity.
Overlay Design: Integrates seamlessly with your price chart, enhancing readability without clutter.
How It Works:
The Williams %R calculates the current closing price's position relative to the highest and lowest prices over a specified period, expressed as a percentage between -100 and 0. This version adds trend detection based on user-defined thresholds, with candlestick colors reflecting the trend state. The indicator plots the %R line with color changes (green for uptrend, red for downtrend) and includes dashed lines for the custom thresholds.
Usage Tips:
Use the uptrend threshold (-16 by default) to identify potential buying opportunities when %R exceeds this level.
Apply the downtrend threshold (-67 by default) to spot selling opportunities when %R falls below.
Combine with other indicators (e.g., moving averages or support/resistance levels) for confirmation signals.
Adjust the length and thresholds based on the asset's volatility and your trading timeframe.
M-oscillator
RV Indicator This Pine Script defines a custom Relative Volatility (RV) Indicator, which measures the ratio of directional price movement to volatility over a specified number of bars. Below is a full explanation of what this script does.
Title:
RV Indicator — Relative Volatility Oscillator
Purpose:
This indicator measures how aggressively price is moving compared to recent volatility, and smooths the result with a signal line. It can be used to gauge momentum shifts and trend strength.
How It Works – Step by Step
1. Measuring Price Momentum (v1)
It calculates the difference between the close and open prices of the last 4 candles.
A weighted average is applied:
The current candle and the one 3 bars ago get weight 1.
The two middle candles (1 and 2 bars ago) get weight 2.
This creates a smoothed momentum measure:
If close > open (bullish), v1 is positive.
If close < open (bearish), v1 is negative.
2. Measuring Volatility (v2)
Similarly, it calculates the high-low range for the last 4 candles.
The same weighting (1, 2, 2, 1) is applied.
This gives a smoothed volatility measure.
3. Combining Momentum and Volatility (RV Ratio)
For the past ti bars (default: 10), it sums up:
All v1 values (momentum sum)
All v2 values (volatility sum)
Then it divides them:
𝑅𝑉= sum of price momentum % sum of volatility
This produces the RV value:
RV > 0: Momentum is bullish (price is generally moving up relative to its volatility).
RV < 0: Momentum is bearish (price is moving down relative to its volatility).
4. Smoothed Signal Line (rvsig)
A smoothed version of the RV is created using a weighted average of the latest 4 RV values.
This acts like a signal line, similar to how MACD uses a signal line.
Crossovers between RV and this signal line can be used to detect shifts in momentum.
5. Visual Output
Orange Line (RV): Shows the raw momentum/volatility ratio.
Blue Line (Signal): A smoother line that follows RV more slowly.
Zero Line: Divides bullish vs. bearish momentum.
How to Use It in Trading
1. Look for Crossovers:
If RV crosses above its signal line → Possible buy signal (momentum turning bullish).
If RV crosses below its signal line → Possible sell signal (momentum turning bearish).
2. Check the Zero Line:
If both RV and Signal are above zero, momentum is bullish.
If both are below zero, momentum is bearish.
3. Filter False Signals:
Combine RV with a trend filter (like a 50 or 200 EMA) to avoid trading against the main trend.
Disclaimer: This script is for informational and educational purposes only. It does not constitute financial advice or a recommendation to buy or sell any asset. All trading decisions are solely your responsibility. Use at your own risk.
RSS-Stochastik [afterworktrading]Hi all,
this is the first script from the series "afterworktrading". The goal is to develop and provide tools for traders with a fulltime job or little time for trading/analyzing charts.
Over time some of the scripts will also be linked to complete trading systems.
Let's start with my favourite one, the "RSS-Stochastik" with alert function.
The RSS-concept (Relative Spread Strength, developed by Ian Copsey) is based on the variance between a "short" and a "long" moving averages (or "slow" and "fast"), here between two EMA.
This variance is calculated and plotted in a RSI-diagram to show "overbought" and "oversold" conditions, helping to identify an ideal entry setup for trend continuation or catching a possible reversal.
Compared to the conventional RSI etc., possible reversal or trend continuation areas are often better represented in terms of quality, as an example see the Amazon-Chart.
The EMA-values, limit value thresholds and background colors can be set in the script. As a special feature, alarms can be set to be notified when a value has reached the extreme range. This reduces the screen time to the minimum.
In my personal trading, this indicator forms the basis for almost all trades, but is not a pure signal indicator on its own.
However, the informative value can be further improved if volume or support/resistance zones etc. are linked to the RSS, see example NASDAQ future with support zone price or 200 EMA.
Example for a possible RSS-Trade-Setup:
- choose an asset with a strong trend
- set alerts for crossing the oversold or overbought condition in direction of the trend
- in case of an alert check possible support/resistance areas on the current chart level (EMA, price zones, volume zones, anchored VWAP etc.)
- trade in the direction of the trend using your preferred entry setup
In my opinion, the system can be used very well, especially in trend phases, in order to obtain optimal entries.
Does it works also on lower timeframes?
Yes, it might work on every timeframe with a strong trend of high quality. Please see attached a 5m-Chart of GPBUSD-pair, notice the signal quality in direction of the trend.
Like every trading system this is not the "holy grail setup" and you will have losing trades. But handling this indicator with care you can have better entries especially in trend direction with less screen time due to the alert function.
Good luck with it! Further indicators will be published in the coming months, some will also be based on the RSS system.
As always: no liability for losing trades, no investment advice etc. Observe the risk limit for every trade!
COT Comm OsciThe COT Ocsillator Indicator is a quantitative analysis tool that uses the positioning of so-called Commercials from the weekly Commitments of Traders (COT) report published by the CFTC. It is designed to detect extreme hedging behavior by institutional participants and translates it into a normalized scale from 0 to 100. The goal is to provide early indication of potential market reversals or overextensions.
What is the "Commercial Index"?
Commercials are market participants with a direct connection to the underlying asset – such as producers, processors, or large-scale users of commodities. They are often referred to as "Smart Money" due to their fundamental market insight and hedging purpose.
The Commercial Index measures where the current net position of Commercials (Long - Short) stands within a user-defined historical lookback window:
Index = 100: the most bullish net position in the selected period.
Index = 0: the most bearish net position.
How does the indicator work?
Data Source: The script uses the latest TradingView/LibraryCOT/4, which provides structured access to official COT data.
Calculation:
Weekly long and short positions of Commercials are requested based on the selected root symbol (e.g., "HG" for Copper).
Net position is calculated as: Net = Long - Short.
This value is normalized within the selected historical range (e.g., 150 weeks) between the highest and lowest net positions.
Result: A smooth oscillator ranging from 0 to 100 is plotted.
How to use the indicator?
Select your target future market (e.g., "GC" for Gold, "CL" for Crude Oil, "HG" for Copper).
Optionally adjust the three time windows to observe short-, mid-, and long-term sentiment (e.g., 125, 250, 500 weeks).
Watch for extreme readings:
Above 80–100: Commercials are heavily net long.
Below 20–0: Commercials are heavily net short.
These extremes are especially relevant when combined with price action, seasonality, or technical signals.
What makes this script unique?
Objective sentiment evaluation based on real institutional positioning.
Three timeframes shown in parallel for multi-horizon analysis.
No smoothing or distortion – raw positioning is visualized cleanly.
Useful in futures markets, where hedging behavior is a major driver.
Tips for Use:
Best viewed on weekly daily or charts (e.g., COMEX:HG1!, NYMEX:CL1!, CBOT:ZW1!).
Combine with technical setups or external sentiment tools for confirmation.
Can be used as a core building block in COT-based strategies or signal generation systems.
This indicator helps you track the footprints of Smart Money – and anticipate where the market might turn.
[Pandora] Laguerre Ultimate Explorations MulticatorIt's time to begin demonstrations differentiating the difference between known and actual feasibility beyond imagination... Welcome to my algorithmic twilight zone .
INTRODUCTION:
Hot off my press, I present this Laguerre multicator employing PSv6.0, originally formulated by John Ehlers for TASC - July 2025 Traders Tips. Basically I transcended Ehlers' notions of transversal filtration with an overhaul of his Laguerre design with my "what if" Pandora notions included. Striving beyond John Ehlers' original intended design. This action packed indicator is a radically revamped version of his original filter using novel techniques. My aim was to explore whether providing even more enhanced responsiveness and lesser lag is possible and how. Presented here is my mind warping results to witness.
EHLERS' LAGUERRE EXPLAINED:
First and foremost, the concept of Ehlers' Laguerre-izing method deserves a comprehensive deep dive. Ehlers' Laguerre filter design, as it functions originally, begins with his Ultimate Smoother (US) followed by a gang of four LERP (jargon for Linear intERPolation) filters. Following a myriad of cascading LERPs is a window-like FIR filter tapped into the LERP delay values to provide extra smoothness via the output.
On a side note, damping factor controlled LERP filters resemble EMAs indeed, but aren't exactly "periodic" filters that would have a period/length parameter and their subsequent calculations. I won't go into fine-grained relationship details, but EMA and LERP are indeed related in approach, being cousins of similar pedigree.
EXAMINING LAGUERRE:
I focused firstly on US initialization obstacles at Pine's bar_index==0 with nz() in abundance. The next primary notion of intrigue I mostly wondered about was, why are there four LERP elements instead of fewer or more. Why not three or why not two LERPs, etc... 1-4-6-4-1, I remember seeing those coefficients before in high pass filters.
Gathering my thoughts from that highpass knowledge base, I devised other tapped configuration modes to inspect their behavior out of curiosity. Eureka! There is actually more to Laguerre than Ehlers' mind provided, now that I had formulated additional modes. Each mode exhibits it's own lag/smoothness characteristics better than the quad LERPed version. I narrowed it down to a total of 5 modes for exploration. Mode 0 is just the raw US by itself.
ANALYZING FILTER BEHAVIORS:
Which option might be possibly superior, and how may I determine that? Fortunately, I have a custom-built analyzer allowing me to thoroughly examine transient responses across multiple periodicities simultaneously, providing remarkable visual insights.
While Ehlers has meagerly touched upon presenting general frequency responses in his books, I have excelled far beyond that. This robust filter analysis capability enables me to observe finer aspects hidden to others, ultimately leading to the deprecation of numerous existing filters. Not only this, but inventing entirely new species of filtration whether lowpass, highpass, or bandpass is already possible with a thorough comprehensive evaluation.
Revealing what's quirky with each filter and having the ability to discover what filters may be lacking in performance, is one of it's implications. I'm just going to explain this: For example US has a little too much overshoot to my liking, along with nonconformant cutoff frequency compliance with the period parameter. Perhaps Ehlers should inspect US coefficients a bit closer... I hope stating this is not received in an ill manner, as it's not my intention here.
What this technically eludes to is that UltimateSmoother can be further improved, analogous to my Laguerre alterations described above. I will also state Laguerre can indeed be reformulated to an even greater extent concerning group delay, from what I have already discussed. Another exciting time though... More investigative research is warranted.
LAGUERRE CONCLUSIONS:
After analyzing Laguerre's frequency compliance, transient responses, amplitudes, lag, symmetry across periodicities, noise rejection, and smoothness... I favor mode 3 for a multitude of reasons over the mode 4 configuration, but mostly superb smoothing with less lag, AND I also appreciated mode 1 & 2 for it's lower lag performance options.
Each mode and lag (phase shift) damping value has it's own unique characteristics at extremes, yet they demonstrate additional finesse in it's new hybrid form without adding too much more complexity. This multicator has a bunch of Laguerre filters in the overlay chart over many periodicities so you can easily witness it's differing periodic symmetries on an input signal while adjusting lag and mode.
LAGUERRE OSCILLATOR:
The oscillator is integrated into the laguerreMulti() function for the intention of posterity only. I performed no evaluation on it, only providing the code in Pine. That wasn't part of my intended exploration adventure, as I'm more TREND oriented for the time being, focusing my efforts there.
Market analysis has two primary aspects in my observations, one cyclic while the other is trending dynamics... There's endless oscillators, but my expectations for trend analysis seems a little lesser explored in my opinion, hence my laborious trend endeavors. Ehlers provided both indicator facets this time around, and I hope you find the filtration aspect more intriguing after absorption of this reading.
FUNCTION MODULES EXPLAINED:
The Ultimate Smoother is an advanced IIR lowpass smoothing filter intended to minimize noise in time series data with minimal group delay, similar to a traditional biquad filter. This calculation helps to create a smoother version of the original signal without the distortions of short-term fluctuations and with minimal lag, adjustable by period.
The Modified Laguerre Lowpass Filter (MLLF) enhances the functionality of US by introducing a Laguerre mode parameter along side the lag parameter to refine control over the amount of additional smoothing/lag applied to the signal. By tethering US with this LERPed lag mechanism, MLLF achieves an effective balance between responsiveness and smoothness, allowing for customizable lag adjustments via multiple inputs. This filter ends with selecting from a choice of weighted averages derived from a gang of up to four cascading LERP calculations, resulting with smoother representations of the data.
The Laguerre Oscillator is a momentum-like indicator derived from the output of US and a singular LERPed lowpass filter. It calculates the difference between the US data and Laguerre filter data, normalizing it by the root mean square (RMS). This quasi-normalization technique helps to assess the intensity of the momentum on any timeframe within an expected bound range centered around 0.0. When the Laguerre Oscillator is positive, it suggests that the smoothed data is trending upward, while a negative value indicates a downward trend. Adjustability is controlled with period, lag, Laguerre mode, and RMS period.
MVRV Altcoins📌 Technical Description of Indicator: MVRV Altcoins
This advanced script calculates the Market Value to Realized Value (MVRV) ratio across multiple cryptocurrencies simultaneously. It offers two analytical modes: Normal and Z-Score, optimized for visual comparison and real-time monitoring of up to 13 predefined assets. If a user applies the indicator to a symbol that is not among the 13 programmed assets, the default behavior displays the Bitcoin chart as a fallback reference.
🔍 What Is MVRV and Why Is It Important?
MVRV is an on-chain metric designed to assess whether a cryptocurrency is overvalued or undervalued by comparing its market capitalization to its realized capitalization.
- Market Cap: The total circulating supply multiplied by the current market price.
- Realized Cap: The sum value of all coins based on the price at the time they last moved on-chain, offering a time-weighted valuation.
Normal Calculation:
MVRV_Normal = Market Cap / Realized Cap
This version reflects investor profitability and identifies potential accumulation or distribution zones.
📊 Z-Score Calculation:
MVRV_ZScore = (Market Cap − Realized Cap) / Standard Deviation of Market Cap
This formula evaluates how extreme the current market conditions are compared to historical norms. It normalizes the difference using statistical dispersion, turning it into a volatility-aware metric that better reflects valuation extremes.
🔎 How Market Cap Is Computed
Unlike conventional indicators relying on consolidated feeds, this script uses modular components from CoinMetrics to construct the active capitalization more accurately, especially for altcoins. Here's the breakdown:
Active Capitalization = MARKETCAPFF + MARKETCAPACTSPLY
Realized Capitalization = MARKETCAPREAL
Component Definitions:
- MARKETCAPFF: Market Cap Free Float — total valuation based only on truly circulating coins.
- MARKETCAPACTSPLY: Capitalization from actively circulating supply — filters dormant or locked coins.
- MARKETCAPREAL: Realized Cap — historical valuation weighted by the last on-chain movement of each coin.
This method offers enhanced precision and compatibility across assets that may lack comprehensive data from centralized providers.
⚙️ User-Configurable Parameters
- MVRV Mode: Choose between Normal and Z-Score.
- Percentage Scale View: If enabled, visual output is scaled using predefined divisors (100 / 3.5 or 100 / 6).
- Thresholds for Analysis:
- Normal mode: Define overbought and oversold levels (default 1.0 and 3.5).
- Z-Score mode: Configure statistical boundaries (default 0.0 and 6.0).
- Table Controls:
- Adjustable position on screen (9 options).
- Font size customization: tiny, small, normal, large.
- Color scheme personalization:
- Header: text and background
- Body: text and background
- Central column separator color
📊 Multicrypto Table Architecture
The indicator renders a high-performance visual table displaying data from up to 13 assets simultaneously. Each asset is represented as a vertical column featuring eigth historical data points plus the most recent value.
- Assets are displayed in two blocks separated by a decorative column.
- Each value is rounded to one decimal place for clarity.
- Cells are styled dynamically based on user settings.
🎨 Decorative Column Separator
Since the entire table is built as a unified structure, a color-configurable empty column is inserted mid-table to act as a visual divider. This approach improves readability and aesthetic balance without duplicating code or splitting table logic.
🔁 Default Behavior on Unsupported Assets
If the active chart is not one of the 13 predefined assets, the indicator will automatically display Bitcoin’s data. This ensures the chart remains functional and informative even outside the target asset group.
🎯 Color Interpretation by Condition
The MVRV value for each asset is highlighted using a traffic light system:
- Green: Undervalued (below oversold threshold)
- Red: Overvalued (above overbought threshold)
- Yellow: Neutral zone
This coding simplifies decision-making and visual scanning across assets.
Final Notes
This indicator is modular and fully adaptable, with well-commented sections designed for efficient customization. Its multiactive architecture makes it a valuable tool for crypto analysts tracking diversified portfolios beyond Bitcoin and Ethereum.
It supports visual storytelling across assets, comparative historical evaluation, and identification of strategic zones — whether for accumulation, distribution, or monitoring on-chain sentiment.
MACD 衰减信号For Max's MACD Decay Signal
A non-repainting signal based on MACD histogram momentum decay combined with price structure divergence. This script helps traders identify potential trend reversal points using multi-wave analysis.
📈 Bullish Signal
Triggered when:
MACD histogram prints three weakening red waves (histogram bars are rising toward zero)
Price makes lower lows, while MACD histogram rises (bullish divergence)
Histogram just turns green
🟢 Label: "MACD多头" appears below the candle
📢 Alert: "MACD 多头信号"
📉 Bearish Signal
Triggered when:
MACD histogram prints three weakening green waves (histogram bars falling toward zero)
Price makes higher highs, while MACD histogram falls (bearish divergence)
Histogram just turns red
🔴 Label: "MACD空头" appears above the candle
📢 Alert: "MACD 空头信号"
⚙️ Features
Adjustable MACD parameters: Fast, Slow, Signal lengths
Uses arrays to track momentum and price shift patterns
Built to avoid repainting, works on all timeframes
Comes with alert conditions for automation or manual notifications
✅ Best For
Catching early trend reversal opportunities
Combining with price action or support/resistance levels
Traders who value momentum + structure-based signals
PRO Investing - Apex EnginePRO Investing - Apex Engine
1. Core Concept: Why Does This Indicator Exist?
Traditional momentum oscillators like RSI or Stochastic use a fixed "lookback period" (e.g., 14). This creates a fundamental problem: a 14-period setting that works well in a fast, trending market will generate constant false signals in a slow, choppy market, and vice-versa. The market's character is dynamic, but most tools are static.
The Apex Engine was built to solve this problem. Its primary innovation is a self-optimizing core that continuously adapts to changing market conditions. Instead of relying on one fixed setting, it actively tests three different momentum profiles (Fast, Mid, and Slow) in real-time and selects the one that is most synchronized with the current price action.
This is not just a random combination of indicators; it's a deliberate synthesis designed to create a more robust momentum tool. It combines:
Volatility analysis (ATR) to generate adaptive lookback periods.
Momentum measurement (ROC) to gauge the speed of price changes.
Statistical analysis (Correlation) to validate which momentum measurement is most effective right now.
Classic trend filters (Moving Average, ADX) to ensure signals are only taken in favorable market conditions.
The result is an oscillator that aims to be more responsive in volatile trends and more stable in quiet periods, providing a more intelligent and adaptive signal.
2. How It Works: The Engine's Three-Stage Process
To be transparent, it's important to understand the step-by-step logic the indicator follows on every bar. It's a process of Adapt -> Validate -> Signal.
Stage 1: Adapt (Dynamic Length Calculation)
The engine first measures market volatility using the Average True Range (ATR) relative to its own long-term average. This creates a volatility_factor. In high-volatility environments, this factor causes the base calculation lengths to shorten. In low-volatility, they lengthen. This produces three potential Rate of Change (ROC) lengths: dynamic_fast_len, dynamic_mid_len, and dynamic_slow_len.
Stage 2: Validate (Self-Optimizing Mode Selection)
This is the core of the engine. It calculates the ROC for all three dynamic lengths. To determine which is best, it uses the ta.correlation() function to measure how well each ROC's movement has correlated with the actual bar-to-bar price changes over the "Optimization Lookback" period. The ROC length with the highest correlation score is chosen as the most effective profile for the current moment. This "active" mode is reflected in the oscillator's color and the dashboard.
Stage 3: Signal (Normalized Velocity Oscillator)
The winning ROC series is then normalized into a consistent oscillator (the Velocity line) that ranges from -100 (extreme oversold) to +100 (extreme overbought). This ensures signals are comparable across any asset or timeframe. Signals are only generated when this Velocity line crosses its signal line and the trend filters (explained below) give a green light.
3. How to Use the Indicator: A Practical Guide
Reading the Visuals:
Velocity Line (Blue/Yellow/Pink): The main oscillator line. Its color indicates which mode is active (Fast, Mid, or Slow).
Signal Line (White): A moving average of the Velocity line. Crossovers generate potential signals.
Buy/Sell Triangles (▲ / ▼): These are your primary entry signals. They are intentionally strict and only appear when momentum, trend, and price action align.
Background Color (Green/Red/Gray): This is your trend context.
Green: Bullish trend confirmed (e.g., price above a rising 200 EMA and ADX > 20). Only Buy signals (▲) can appear.
Red: Bearish trend confirmed. Only Sell signals (▼) can appear.
Gray: No clear trend. The market is likely choppy or consolidating. No signals will appear; it is best to stay out.
Trading Strategy Example:
Wait for a colored background. A green or red background indicates the market is in a tradable trend.
Look for a signal. For a green background, wait for a lime Buy triangle (▲) to appear.
Confirm the trade. Before entering, confirm the signal aligns with your own analysis (e.g., support/resistance levels, chart patterns).
Manage the trade. Set a stop-loss according to your risk management rules. An exit can be considered on a fixed target, a trailing stop, or when an opposing signal appears.
4. Settings and Customization
This script is open-source, and its settings are transparent. You are encouraged to understand them.
Synaptic Engine Group:
Volatility Period: The master control for the adaptive engine. Higher values are slower and more stable.
Optimization Lookback: How many bars to use for the correlation check.
Switch Sensitivity: A buffer to prevent frantic switching between modes.
Advanced Configuration & Filters Group:
Price Source: The data source for momentum calculation (default close).
Trend Filter MA Type & Length: Define your long-term trend.
Filter by MA Slope: A key feature. If ON, allows for "buy the dip" entries below a rising MA. If OFF, it's stricter, requiring price to be above the MA.
ADX Length & Threshold: Filters out non-trending, choppy markets. Signals will not fire if the ADX is below this threshold.
5. Important Disclaimer
This indicator is a decision-support tool for discretionary traders, not an automated trading system or financial advice. Past performance is not indicative of future results. All trading involves substantial risk. You should always use proper risk management, including setting stop-losses, and never risk more than you are prepared to lose. The signals generated by this script should be used as one component of a broader trading plan.
Vortex Indicator with HistogramThis is a simple script showing a standard Vortex Indicator along with a histogram that displays the difference between the Vortex lines.
Momentum and Momentum ChangeThis is a simple script, showing a line for the 14-day momentum (changes in price) along with a histogram that displays the change in momentum (an indicator of price acceleration).
RSI with Williams %R Coloringsimple fusion of RSI to seek divergence and williams % R coloring to see overbought/oversold price.
not my own work, just merely took two standard indicators and infused them.
Cross-Correlation Lead/Lag AnalyzerCross-Correlation Lead/Lag Analyzer (XCorr)
Discover which instrument moves first with advanced cross-correlation analysis.
This indicator analyzes the lead/lag relationship between any two financial instruments using rolling cross-correlation at multiple time offsets. Perfect for pairs trading, market timing, and understanding inter-market relationships.
Key Features:
Universal compatibility - Works with any two symbols (stocks, futures, forex, crypto, commodities)
Multi-timeframe analysis - Automatically adjusts lag periods based on your chart timeframe
Real-time correlation table - Shows current correlation values for all lag scenarios
Visual lead/lag detection - Color-coded plots make it easy to spot which instrument leads
Smart "Best" indicator - Automatically identifies the strongest relationship
How to Use:
Set your symbols in the indicator settings (default: NQ1! vs RTY1!)
Adjust correlation length (default: 20 periods for smooth but responsive analysis)
Watch the colored lines:
• Red/Orange: Symbol 2 leads Symbol 1 by 1-2 periods
• Blue: Instruments move simultaneously
• Green/Purple: Symbol 1 leads Symbol 2 by 1-2 periods
Check the table for exact correlation values and the "Best" relationship
Interpreting Results:
Correlation > 0.7: Strong positive relationship
Correlation 0.3-0.7: Moderate relationship
Correlation < 0.3: Weak/no relationship
Highest line indicates the optimal timing relationship
Popular Use Cases:
Index Futures : NQ vs ES, RTY vs IWM
Sector Rotation : XLF vs XLK, QQQ vs SPY
Commodities : GC vs SI, CL vs NG
Currency Pairs : EURUSD vs GBPUSD
Crypto : BTC vs ETH correlation analysis
Technical Notes:
Cross-correlation measures linear relationships between two time series at different time lags. This implementation uses Pearson correlation with adjustable periods, calculating correlations from -2 to +2 period offsets to detect leading/lagging behavior.
Perfect for quantitative analysts, pairs traders, and anyone studying inter-market relationships.
MCPZ - Meme Coin Price Z-Score [Da_Prof]Meme Coin Price Z-score (MCPZ). Investor preference for meme coin trading may signal irrational exuberance in the crypto market. If a large spike in meme coin price is observed, a top may be near. Similarly, if a long price depression is observed, versus historical prices, that generally corresponds to investor apathy, leading to higher prices. The MEME.C symbol allows us to evaluate the sentiment of meme coin traders. Paired with the Meme Coin Volume (MCV) and Meme Coin Gains (MCG) indicators, the MCPZ helps to identify tops and bottoms in the overall meme coin market. The MCPZ indicator helps identify potential mania phases, which may signal nearing of a top and apathy phases, which may signal nearing a bottom. A moving average of the Z-score is used to smooth the data and help visualize changes in trend. In back testing, I found a 10-day sma of the MCPZ works well to signal tops and bottoms when extreme values of this indicator are reached. The MCPZ seems to spend a large amount of time near the low trigger line and short periods fast increase into mania phases.
Meme coins were not traded heavily prior to 2020, but the indicator still picks a couple of tops prior to 2020. Be aware that the meme coin space also increased massively in 2020, so mania phases may not spike quite as high moving forward and the indicator may need adjusting to catch tops. It is recommended to pair this indicator with the MCG and MCV indicators to create an overall picture.
The indicator grabs data from the MEME.C symbol on the daily such that it can be viewed on other symbols.
Use this indicator at your own risk. I make no claims as to its accuracy in forecasting future trend changes of memes or any other asset.
Hope this is helpful to you.
--Da_Prof
PSX OBV Divergence Labels (1H/4H/1D/1W, Enhanced)This script identifies and labels bullish and bearish OBV divergences on the price chart, specifically optimized for swing trading in the Pakistan Stock Exchange (PSX) but also works well across global equities, indices, and crypto.
🔍 What It Does
📈 Bullish OBV Divergence (Green “BUY” label):
Price makes a new low while OBV forms a higher low — suggesting accumulation and a potential reversal.
📉 Bearish OBV Divergence (Red “SELL” label):
Price makes a new high while OBV forms a lower high — indicating distribution and potential weakness.
All signals are confirmed on candle close and filtered for smart volume and OBV stability, helping reduce noise and false positives.
⚙️ How It Works
OBV Divergence Lookback: Scans the last N bars (default 20) for divergence patterns
Volume Spike Filter: Bullish divergences are only considered valid if volume exceeds a smoothed average × multiplier
OBV Slope Confirmation: Confirms that OBV is moving in the expected direction across recent bars before signaling
Multi-Timeframe Support: Designed for 1H, 4H, 1D, and 1W timeframes — ideal for position and swing traders
📈 Best Use Cases
✅ PSX stocks (KSE100, KMI30)
✅ Crypto, indices, or commodities where volume data is available
✅ Works best when combined with price action, support/resistance, or market structure
📎 Parameters
OBV Divergence Lookback: Length of historical window to evaluate OBV vs. price divergence
Volume Smoothing: Period for volume moving average
Volume Spike Multiplier: Threshold for volume strength (default = 1.0x)
OBV Stability Confirmation Bars: OBV must show consistent direction across this many bars before confirming divergence
🧠 Pro Tip
Use divergence signals in confluence with:
Fair Value Gaps
Market Structure Breaks (BMS)
HTF Order Blocks or key SR levels
… for much stronger trade setups.
PSX OBV Divergence Labels (1D)PSX OBV Divergence Labels (1H/4H/1D/1W, Enhanced)
Description:
This indicator marks bullish and bearish OBV divergences on the price chart for PSX and other markets. Designed specifically for swing traders who operate on 1H, 4H, 1D, and 1W timeframes, it enhances basic divergence detection by incorporating volume spikes and OBV slope confirmation — improving signal reliability and reducing noise.
Key Features:
📈 Bullish Divergence: Marks potential buy zones when price hits a local low while OBV shows upward momentum with volume spike confirmation.
📉 Bearish Divergence: Flags potential sell zones when price hits a local high while OBV trends lower with volume weakness.
✅ Slope Confirmation: Filters signals based on sustained OBV direction over a user-defined number of bars.
🔊 Volume Filter: Detects divergence only when volume exceeds the average by a customizable multiplier (default 1.0).
🔍 Clean Visualization: Green “BUY” and red “SELL” labels show clearly on the chart, synced with candle price movement.
Best Timeframes to Use:
1H, 4H, 1D, and 1W (optimized for PSX stocks, KSE100, and KMI30)
Swing traders aiming for 2–4 week holding windows will find the most utility.
Recommended Settings:
OBV Lookback: 20
Volume Smoothing: 20
Spike Multiplier: 1.0
Slope Confirmation: 3 bars
Strategy Tip:
Use divergences in confluence with key support/resistance levels, price action traps, and market structure for high-probability setups. This tool is best used for trend exhaustion detection and reversal signals.
PSX OBV Divergence Labels (1D)PSX OBV Divergence Labels (1D)
This indicator highlights bullish and bearish OBV (On-Balance Volume) divergences on the price chart, specifically designed for daily timeframe swing trading in PSX (Pakistan Stock Exchange) stocks.
🟢 Green triangle (Bullish Divergence) appears when price makes a new low but OBV does not — suggesting accumulation and potential reversal.
🔴 Red triangle (Bearish Divergence) appears when price makes a new high but OBV does not — indicating weakening momentum and possible distribution.
Volume spike filtering is included to increase reliability. No trade signals or exits — this is a pure visual divergence tool to support manual decision-making. Ideal for spotting shifts in volume pressure ahead of price reversals.
Directional ADX with Dynamic ThresholdThis indicator displays the ADX line, color-coded with a green line indicating a bullish DMI and a red line indicating a bearish DMI. The line turns grey when there is no trend. The trend threshold is determined by ATR. Settings are adjustable. Nothing earth-shattering but this has helped me quite a bit in my trading.
DAO - Directional ATR OscillatorDAO - Directional ATR Oscillator. it combines trenddirection and strength by simply splitting the Average True Range in both directions over an oscilators zeroline with two MAs to make it easier to spot the overall trenddirection together with momentum and strength but it also works great for spotting divergences and possible trendreversals early. have fun with this everything indicator !
RSI, CCI, ADX Panel (Custom TF for Each)RSI, CCI, and ADX Combined – Multi-Timeframe, Fully Customizable Panel Indicator for TradingView
Overview
This Pine Script indicator integrates the Relative Strength Index (RSI), Commodity Channel Index (CCI), and Average Directional Index (ADX) into a single, clean panel for effortless technical analysis. Each indicator operates independently, with customizable length, smoothing, and time frame for maximum flexibility. Traders can now monitor momentum, trend strength, and overbought/oversold conditions across different time frames—all in one place.
Key Features
Independent Controls: Set length, smoothing (ADX), and time frame individually for each indicator via the settings panel.
Multi-Timeframe Support: Each oscillator (RSI, CCI, ADX) can be calculated on its own time frame, enabling nuanced inter-timeframe analysis.
Customizable Visualization: Adjust line color and thickness for each indicator to match your chart style.
Clean, Non-Overlay Display: All three indicators are plotted in a dedicated panel beneath the price chart, reducing clutter.
Reference Levels: Includes standard reference lines for oversold/overbought (RSI, CCI) and trend threshold (ADX) for quick visual cues.
Usage Ideas
Swing Trading: Compare short- and long-term momentum using different time frames for RSI, CCI, and ADX.
Trend Confirmation: Use ADX to filter RSI and CCI signals—only trade overbought/oversold conditions during strong trends.
Divergence Hunting: Spot divergences between time frames for early reversal signals.
Scalping: Set RSI and CCI to lower time frames for entry, while monitoring higher timeframe ADX for trend context.
How to Install
Paste the script into the Pine Editor on TradingView.
Add to chart. Adjust settings as desired.
Save as a template for quick reuse on any chart—all your custom settings will be preserved.
Customization
Edit lengths and time frames in the indicator’s settings dialog.
Toggle reference lines on/off as needed.
Fine-tune line appearance (color, thickness) for clarity.
Note:
This indicator does not provide automated buy/sell signals. It is a customizable analytical tool for manual or semi-automated trading. Use in combination with other technical or fundamental analysis for best results.
Combine Momentum, Trend, and Volatility—Seamlessly and Visually—With One Indicator.
RSI + TSV Kombi📊 RSI + TSV Combo Indicator (Intraday Reversal Tool)
This custom TradingView indicator is designed for intraday traders who want to combine price momentum (via RSI) with volume-based confirmation (via TSV). It’s particularly powerful for spotting short-term reversals around key market zones like VWAP, support/resistance, or options levels.
🧠 What does the Indicator show?
The indicator contains two elements in one pane:
🔹 Top Line – RSI (Relative Strength Index)
Type: RSI(7) – a short-term version of the classic RSI
Color-coded:
🟢 Green when RSI < 30 → potential oversold → bullish bias
🔴 Red when RSI > 70 → potential overbought → bearish bias
⚪ Gray in between → neutral
🔎 Purpose: Identifies overextended price moves — early warning for possible reversal zones.
🔸 Bottom Bars – TSV (Time Segmented Volume)
Formula: EMA(change(close) * volume, 9)
Color-coded histogram:
🟢 Green when TSV > 0 → bullish volume momentum
🔴 Red when TSV < 0 → bearish volume momentum
🔎 Purpose: Confirms whether price moves are supported by actual volume — helps filter false signals from RSI.
⚖️ How to Interpret the Indicator
✅ Long Setup
RSI is below 30 (green line)
TSV bars turn green or cross above 0
Ideally at a support level or near VWAP
➡️ Buy signal confirmed by volume
❌ Short Setup
RSI above 70 (red line)
TSV bars are red or turning red
Ideally at a resistance zone or VWAP deviation
➡️ Sell signal confirmed by selling pressure
⚠️ Avoid trades when...
RSI is oversold/overbought, but TSV disagrees
(e.g. RSI < 30 but TSV is red → weak confirmation)
🧭 Practical Usage in Intraday Trading (e.g. 5-minute chart)
Step What to look for
Setup Zone RSI hits extreme level (under 30 or above 70)
Volume Confirmation TSV bars flip color (red → green or vice versa)
Entry Price breaks candle high/low with volume support
Exit VWAP, volume node, or next support/resistance zone
🔧 Options for Expansion
This script is already running cleanly, but you could easily extend it with:
📍 Buy/Sell Arrows on chart when both RSI + TSV align
🔔 Alerts for instant trade triggers
💡 Overlay version that places symbols directly on the price chart
🔒 Filter to only show signals above/below VWAP
Let me know — I can build any of these for you.
✅ Summary
This RSI + TSV Combo is a simple yet powerful tool to:
Spot momentum reversals
Confirm trades with volume
Stay disciplined and rule-based in fast-moving intraday setups
It’s especially useful when combined with:
VWAP
Volume Profile Zones (HVNs/LVNs)
Key psychological or options levels
Student-t Weighted Acceleration & Velocity⚙️ Student-t Weighted Acceleration & Velocity
Author: © GabrielAmadeusLau
Category: Momentum, Smoothing, Divergence Detection
🔍 Overview
Student-t Weighted Acceleration & Velocity is a precision-engineered momentum indicator designed to analyze the rate of price change (velocity) and rate of change of velocity (acceleration). It leverages Student-t weighted smoothing, bandpass filtering, and divergence detection to reveal underlying momentum trends, shifts, and potential reversals with high sensitivity and low noise.
🧠 Key Features
🌀 1. Student-t Weighted Moving Average
Applies Student-t distribution weights to price data.
Controlled by:
ν (Degrees of Freedom): Lower ν increases weight on recent data, improving sensitivity to fast-moving markets.
Window Length: Sets the lookback period for weighted averaging.
🚀 2. Velocity & Acceleration Calculation
Velocity: Measures how fast price is moving over time.
Acceleration: Measures the change in velocity, revealing turning points.
Both are calculated via:
Butterworth High-pass Filter
Super Smoother Low-pass Filter
Fast Root Mean Square (RMS) normalization
Optionally smoothed using a Super Smoother EMA.
🎯 3. Signal Conditions
Strong Up: When smoothed velocity crosses above the overbought threshold and acceleration is positive.
Strong Down: When smoothed velocity crosses below the oversold threshold and acceleration is negative.
Visual cues:
Green & red triangle shapes for signals.
Colored histogram & column plots.
Optional bar coloring based on A/V behavior.
🔎 4. Divergence Detection Engine
Built-in multi-timeframe divergence system with:
Bullish/Bearish Regular Divergence
Bullish/Bearish Hidden Divergence
Customizable settings:
Pivot detection, confirmation logic, lookback limits.
Heikin Ashi mode for smoothed divergence detection.
Configurable line style, width, and color.
Visual plots of divergence lines on price chart.
⚙️ Custom Inputs
A/V Calculation Parameters:
Lookback period, filter lengths (Butterworth, Super Smoother, RMS), EMA smoothing.
Divergence Settings:
Enable/disable confirmation, show last divergence only.
Adjustable pivot period and max lookback bars.
Heikin Ashi Mode:
Option to use Heikin Ashi candles for divergence detection only (without switching chart type).
Thresholds:
Overbought/Oversold Sigma levels for strong signal detection.
🔔 Alerts Included
Strong Up Alert: Momentum and acceleration aligned bullishly.
Strong Down Alert: Momentum and acceleration aligned bearishly.
All Divergence Types:
Bullish/Bearish Regular Divergence
Bullish/Bearish Hidden Divergence
Aggregated Divergence Alerts
📌 Use Cases
Spot momentum bursts and reversals with confirmation from both velocity and acceleration.
Identify divergence-based signals for early entries/exits.
Apply across multiple timeframes or pair with other trend filters.
OBV Oscillator with Divergence CirclesCredit to original code from the 'PPO Divergence alerts' by Scarf and OBV Oscillator by LazyBear is used as the input.
Replication of Lunndi 'OBV Divergence Alerts (BETA)' script with additional divergence logic implemented.
OBV-based divergence logic adapted from RSI divergence logic added in addition to existing divergence logic.
Modify length and smoothing to suit your trading style. Open source free for use.