Volume Profile Skew [BackQuant]Volume Profile Skew
Overview
Volume Profile Skew is a market-structure indicator that answers a specific question most volume profiles do not:
“Is volume concentrating toward lower prices (accumulation) or higher prices (distribution) inside the current profile range?”
A standard volume profile shows where volume traded, but it does not quantify the shape of that distribution in a single number. This script builds a volume profile over a rolling lookback window, extracts the key profile levels (POC, VAH, VAL, and a volume-weighted mean), then computes the skewness of the volume distribution across price bins. That skewness becomes an oscillator, smoothed into a regime signal and paired with visual profile plotting, key level lines, and historical POC tracking.
This gives you two layers at once:
A full profile and its important levels (where volume is).
A skew metric (how volume is leaning within that range).
What this indicator is based on
The foundation comes from classical “volume at price” concepts used in Market Profile and Volume Profile analysis:
POC (Point of Control): the price level with the highest traded volume.
Value Area (VAH/VAL): the zone containing the bulk of activity, commonly 70% of total volume.
Volume-weighted mean (VWMP in this script): the average price weighted by volume, a “center of mass” for traded activity.
Where this indicator extends the idea is by treating the volume profile as a statistical distribution across price. Once you treat “volume by price bin” as a probability distribution (weights sum to 1), you can compute distribution moments:
Mean: where the mass is centered.
Standard deviation: how spread-out it is.
Skewness: whether the distribution has a heavier tail toward higher or lower prices.
This is not a gimmick. Skewness is a standard statistic in probability theory. Here it is applied to “volume concentration across price”, not to returns.
Core concept: what “skew” means in a volume profile
Imagine a profile range from Low to High, split into bins. Each bin has some volume. You can get these shapes:
Balanced profile: volume is fairly symmetric around the mean, skew near 0.
Bottom-heavy profile: more volume at lower prices, with a tail toward higher prices, skew tends to be positive.
Top-heavy profile: more volume at higher prices, with a tail toward lower prices, skew tends to be negative.
In this script:
Positive skew is labeled as ACCUMULATION.
Negative skew is labeled as DISTRIBUTION.
Near-zero skew is NEUTRAL.
Important: accumulation here does not mean “buying will immediately pump price.” It means the profile shape suggests more participation at lower prices inside the current lookback range. Distribution means participation is heavier at higher prices.
How the volume profile is built
1) Define the analysis window
The profile is computed on a rolling window:
Lookback Period: number of bars included (capped by available history).
Profile Resolution (bins): number of price bins used to discretize the high-low range.
The script finds the highest high and lowest low in the lookback window to define the price range:
rangeHigh = highest high in window
rangeLow = lowest low in window
binSize = (rangeHigh - rangeLow) / bins
2) Create bin midpoints
Each bin gets a midpoint “price” used for calculations:
price = rangeLow + binSize * (b + 0.5)
These midpoints are what the mean, variance, and skewness are computed on.
3) Distribute each candle’s volume into bins
This is a key implementation detail. Real volume profiles require tick-level data, but Pine does not provide that. So the script approximates volume-at-price using candle ranges:
For each bar in the lookback:
Determine which bins its low-to-high range touches.
Split that candle’s total volume evenly across the touched bins.
So if a candle spans 6 bins, each bin gets volume/6 from that bar. This is a practical, consistent approximation for “where trading could have occurred” inside the bar.
This approach has tradeoffs:
It does not know where within the candle the volume truly traded.
It assumes uniform distribution across the candle range.
It becomes more meaningful with larger samples (bigger lookback) and/or higher timeframes.
But it is still useful because the purpose here is the shape of the distribution across the whole window, not exact microstructure.
Key profile levels: POC, VAH, VAL, VWMP
POC (Point of Control)
POC is found by scanning bins and selecting the bin with maximum volume. The script stores:
pocIndex: which bin has max volume
poc price: midpoint price of that bin
Value Area (VAH/VAL) using 70% volume
The script builds the value area around the POC outward until it captures 70% of total volume:
Start with the POC bin.
Expand one bin at a time to the side with more volume.
Stop when accumulated volume >= 70% of total profile volume.
Then:
VAL = rangeLow + binSize * lowerIdx
VAH = rangeLow + binSize * (upperIdx + 1)
This produces a classic “where most business happened” zone.
VWMP (Volume-Weighted Mean Price)
This is essentially the center of mass of the profile:
VWMP = sum(price * volume ) / totalVolume
It is similar in spirit to VWAP, but it is computed over the profile bins, not from bar-by-bar typical price.
Skewness calculation: turning the profile into an oscillator
This is the main feature.
1) Treat volumes as weights
For each bin:
weight = volume / totalVolume
Now weights sum to 1.
2) Compute weighted mean
Mean price:
mean = sum(weight * price )
3) Compute weighted variance and std deviation
Variance:
variance = sum(weight * (price - mean)^2)
stdDev = sqrt(variance)
4) Compute weighted third central moment
Third moment:
m3 = sum(weight * (price - mean)^3)
5) Standardize to skewness
Skewness:
rawSkew = m3 / (stdDev^3)
This standardization matters. Without it, the value would explode or shrink based on profile scale. Standardized skewness is dimensionless and comparable.
Smoothing and regime rules
Raw skewness can be jumpy because:
profile bins change as rangeHigh/rangeLow shift,
one high-volume candle can reshape the distribution,
volume regimes change quickly in crypto.
So the indicator applies EMA smoothing:
smoothedSkew = EMA(rawSkew, smooth)
Then it classifies regime using fixed thresholds:
Bullish (ACCUMULATION): smoothedSkew > +0.25
Bearish (DISTRIBUTION): smoothedSkew < -0.25
Neutral: between those values
Signals are generated on threshold cross events:
Bull signal when smoothedSkew crosses above +0.25
Bear signal when smoothedSkew crosses below -0.25
This makes the skew act like a regime oscillator rather than a constantly flipping color.
Volume Profile plotting modes
The script draws the profile on the last bar, using boxes for each bin, anchored to the right with a configurable offset. The width of each profile bar is normalized by max bin volume:
volRatio = binVol / maxVol
barWidth = volRatio * width
Three style modes exist:
1) Gradient
Uses a “jet-like” gradient based on volRatio (blue → red). Higher-volume bins stand out naturally. Transparency increases as volume decreases, so low-volume bins fade.
2) Solid
Uses the current regime color (bull/bear/neutral) for all bins, with transparency. This makes the profile read as “structure + regime.”
3) Skew Highlight
Highlights bins that match the skew bias:
If skew bullish, emphasize lower portion of profile.
If skew bearish, emphasize higher portion of profile.
Else, keep most bins neutral.
This is a visual “where the skew is coming from” mode.
Historical POC tracking and Naked POCs
This script also treats POCs as meaningful levels over time, similar to how traders track old VA levels.
What is a “naked POC”?
A “naked POC” is a previously formed POC that has not been revisited (retested) by price since it was recorded. Many traders watch these as potential reaction zones because they represent prior “maximum traded interest” that the market has not re-engaged with.
How this script records POCs
It stores a new historical POC when:
At least updatebars have passed since the last stored POC, and
The POC has changed by at least pochangethres (%) from the last stored value.
New stored POCs are flagged as naked by default.
How naked becomes tested
On each update, the script checks whether price has entered a small zone around a naked POC:
zoneSize = POC * 0.002 (about 0.2%)
If bar range overlaps that zone, mark it as tested (not naked).
Display controls:
Highlight Naked POCs: draws and labels untested POCs.
Show Tested POCs: optionally draw tested ones in a muted color.
To avoid clutter, the script limits stored POCs to the most recent 20 and avoids drawing ones too close to the current POC.
On-chart key levels and what they mean
When enabled, the script draws the current lookback profile levels on the price chart:
POC (solid): the “most traded” price.
VAH/VAL (dashed): boundaries of the 70% value area.
VWMP (dotted): volume-weighted mean of the profile distribution.
Interpretation framework (practical, not mystical):
POC often behaves like a magnet in balanced conditions.
VAH/VAL define the “accepted” area, breaks can signal auction continuation.
VWMP is a fair-value reference, useful as a mean anchor when skew is neutralizing.
Oscillator panel and histogram
The skew oscillator is plotted in a separate pane:
Line: smoothedSkew, colored by regime.
Histogram: smoothedSkew as bars, colored by sign.
Fill: subtle shading above/below 0 to reinforce bias.
This makes it easy to read:
Direction of bias (positive vs negative).
Strength (distance from 0 and from thresholds).
Transitions (crosses of ±0.25).
Info table: what it summarizes
On the last bar, a table prints key diagnostics:
Current skew value (smoothed).
Regime label (ACCUMULATION / DISTRIBUTION / NEUTRAL).
Current POC, VAH, VAL, VWMP.
Count of naked POCs still active.
A simple “volume location” hint (lower/higher/balanced).
This is designed for quick scanning without reading the entire profile.
Alerts
The indicator includes alerts for:
Skew regime shifts (cross above +0.25, cross below -0.25).
Price crossing above/below current POC.
Approaching a naked POC (within 1% of any active naked POC).
The “approaching naked POC” alert is useful as a heads-up that price is entering a historically important volume magnet/reaction zone.
How to use it properly
1) Regime filter
Use skew regime to decide what type of trades you should prioritize:
ACCUMULATION (positive skew): market activity is heavier at lower prices, pullbacks into value or below VWMP often matter more.
DISTRIBUTION (negative skew): activity is heavier at higher prices, rallies into value or above VWMP often matter more.
NEUTRAL: mean-reversion and POC magnet behavior tends to dominate.
This is not “buy when green.” It is context for what the auction is doing.
2) Level-based execution
Combine skew with VA/POC levels:
In neutral regimes, expect rotations around POC and inside VA.
In strong skew regimes, watch for acceptance away from POC and reactions at VA edges.
3) Naked POCs as targets and reaction zones
Naked POCs can act like unfinished business. Common workflows:
As targets in rotations.
As areas to reduce risk when price is approaching.
As “if it breaks cleanly, trend continuation” markers when price returns with force.
Parameter tuning guidance
Lookback
Controls how “local” the profile is.
Shorter: reacts faster, more sensitive to recent moves.
Longer: more stable, better for swing context.
Bins
Controls resolution of the profile.
Higher bins: more detail, more computation, more sensitive profile shape.
Lower bins: smoother, less detail, more stable skew.
Smoothing
Controls how noisy the skew oscillator is.
Higher smoothing: fewer regime flips, slower response.
Lower smoothing: more responsive, more false transitions.
POC tracking settings
Update interval and threshold decide how many historical POCs you store and how different they must be. If you set them too loose, you will spam levels. If too strict, you will miss meaningful shifts.
Limitations and what not to assume
This indicator uses candle-range volume distribution because Pine cannot see tick-level volume-at-price. That means:
The profile is an approximation of where volume could have traded, not exact tape data.
Skew is best treated as a structural bias, not a precise signal generator.
Extreme single-bar events can distort the distribution briefly, smoothing helps but cannot remove reality.
Summary
Volume Profile Skew takes standard volume profile structure (POC, Value Area, volume-weighted mean) and adds a statistically grounded measure of profile shape using skewness. The result is a regime oscillator that quantifies whether volume concentration is leaning toward lower prices (accumulation) or higher prices (distribution), while also plotting the full profile, key levels, and historical naked POCs for actionable context.
Statistics
Pattern Atlas Smart Panel Alerts Toni Ventura MaltaThe Pattern Atlas in 1 Indicator
Not fool proof but helps understanding what the discord traders are talking about ;)
SPY 200SMA +4% Entry -3% Exit TQQQ/QLD/GLDM THREE PHASE STRATEGYWanted to take a look at all of the individual trades and provide a series of options to balance performance and risk. This post is expanding on my previous one - www.reddit.com
Here is the data and the backtesting splitting the strategy into three primary phases with multiple options and exact trade dates to help people easily backtest other combinations - docs.google.com (Three Tabs with the three phases)
If you just want my personal recommendations this would be what I will be using -
PHASE 1 (Strategy BUY signal triggers when SPY price crosses +4% over the SPY 200SMA) = 100% TQQQ
If trade lasts 366 days (Long Term Cap Gains) go to PHASE 2
If SPY price crosses below -3% SPY 200SMA go to PHASE 3
PHASE 2 (PHASE 1 lasts 366 days) = Deleverage and diversify into 50% QLD & 50% GLDM
PHASE 3 (Strategy SELL signal triggers when SPY price crosses -3% below the SPY 200SMA) = Defensive posture with 50% SGOV & 50% GLDM
As market degrades start selling SGOV and buying QQQ until 50% QQQ & 50% GLDM
TradingView Script for the THREE PHASE STRATEGY (imgur.com):
//
@version=
5
strategy("SPY 200SMA +4% Entry -3% Exit Strategy",
overlay=true,
default_qty_type=strategy.percent_of_equity,
default_qty_value=100)
// === Inputs ===
smaLength = input.int(200, title="SMA Period", minval=1)
entryThreshold = input.float(0.04, title="Entry Threshold (%)", step=0.01)
exitThreshold = input.float(0.03, title="Exit Threshold (%)", step=0.01)
startYear = input.int(1995, "Start Year")
startMonth = input.int(1, "Start Month")
startDay = input.int(1, "Start Day")
// === Time filter ===
startTime = timestamp(startYear, startMonth, startDay, 0, 0)
isAfterStart = time >= startTime
// === Calculations ===
sma200 = ta.sma(close, smaLength)
upperThreshold = sma200 * (1 + entryThreshold)
lowerThreshold = sma200 * (1 - exitThreshold)
// === Strategy Logic ===
enterLong = close > upperThreshold
exitLong = close < lowerThreshold
if isAfterStart
if enterLong and strategy.position_size == 0
strategy.entry("Buy", strategy.long)
if exitLong and strategy.position_size > 0
strategy.close("Buy")
// === 366-Day Marker Logic (Uninterrupted) ===
var
int
targetTime = na
// 1. Capture entry time only when a brand new position starts
if strategy.position_size > 0 and strategy.position_size == 0
targetTime := time + (366 * 24 * 60 * 60 * 1000)
// 2. IMPORTANT: If position is closed or a sell signal hits, reset the timer to "na"
if strategy.position_size == 0
targetTime := na
// 3. Trigger only if we are still in the trade and hit the timestamp
isAnniversary = not na(targetTime) and time >= targetTime and time < targetTime
// === Visuals ===
p_sma = plot(sma200, title="200 SMA", color=color.rgb(255, 0, 242))
p_upper = plot(upperThreshold, title="Entry Threshold (+4%)", color=color.rgb(0, 200, 0))
p_lower = plot(lowerThreshold, title="Exit Threshold (-3%)", color=color.rgb(255, 0, 0))
fill(p_sma, p_upper, color=color.new(color.green, 80), title="Entry Zone")
// Draw marker only if 366 days passed without a sell
if isAnniversary
label.new(bar_index, high, "366 DAYS - PHASE 2", style=label.style_label_down, color=color.yellow, textcolor=color.black, size=size.small)
// === Entry/Exit Labels ===
newOpen = strategy.position_size > 0 and strategy.position_size == 0
newClose = strategy.position_size == 0 and strategy.position_size > 0
if newOpen
label.new(x=bar_index, y=low * 0.97, text="BUY - PHASE 1", xloc=xloc.bar_index, yloc=yloc.price, color=color.lime, style=label.style_label_up, textcolor=color.black, size=size.small)
if newClose
label.new(x=bar_index, y=high * 1.03, text="SELL - PHASE 3", xloc=xloc.bar_index, yloc=yloc.price, color=color.red, style=label.style_label_down, textcolor=color.white, size=size.small)
200 SMA SPY Trading Range Bands Script:
//
@version=
5
indicator("200 SMA SPY Trading Range Bands", overlay=true)
// === Settings ===
smaLength = input.int(200, title="SMA Length")
mult1 = input.float(1.09, title="Multiplier 1 (9% Over)")
mult2 = input.float(1.15, title="Multiplier 2 (15% Over)")
// === Calculations ===
smaValue = ta.sma(close, smaLength)
line9Over = smaValue * mult1
line15Over = smaValue * mult2
// === Plotting ===
plot(smaValue, title="200 SMA", color=color.gray, linewidth=1, style=plot.style_linebr)
plot(line9Over, title="9% Over 200 SMA", color=color.rgb(255, 145, 0), linewidth=1)
plot(line15Over, title="15% Over 200 SMA", color=color.rgb(38, 1, 1), linewidth=2)
Dual Bollinger Band Zones (20,2 & 20,0.7)To Indentify Zone 1, Zone 2, Zone 3 and Zone 4
Tradeable zone: Zone 1 for Long and Zone 4 for Short
No Trade Zone: Zond 2 and Zone 3
MJ amd tableAsia, Londong and New york table showing each session what goes to happen depending on the movement of AMD
TSM: Time-Series Momentum & Volatility Targeting [Moskowitz]TSM: Institutional Time-Series Momentum & Volatility Targeting (Moskowitz)
SUMMARY
TSM is a trend and risk-sizing indicator designed to convert price movement into a risk-adjusted regime signal and a single Recommended Exposure output. It addresses a common trend problem: direction can be correct while sizing is wrong during volatility expansions.
Recommended Exposure is a signed value where positive indicates bullish bias and negative indicates bearish bias. The magnitude reflects confidence after the volatility and quality filters are applied.
The engine combines volatility-scaled time-series momentum across multiple horizons with optional volatility targeting and an optional efficiency filter to reduce noise sensitivity and improve sizing discipline.
WHAT THIS INDICATOR GIVES YOU
A risk-adjusted momentum signal that is scaled by realized volatility rather than raw returns, so high-volatility noise is less likely to look like strong trend.
An optional volatility targeting layer that mechanically scales Recommended Exposure down when realized volatility rises and up when it falls, capped by Max Leverage.
An ensemble approach using fast, medium, and slow horizons with configurable weights, reducing dependence on a single lookback and lowering curve-fitting risk.
An optional R-squared efficiency filter that reduces exposure in choppy, low-quality trends, with a floor to avoid over-suppressing exposure.
Optional workflow features including a dashboard, trend cloud bands, threshold-based signals with cooldown, and alerts.
SCIENTIFIC FOUNDATION (PLAIN ENGLISH)
Time-Series Momentum (Moskowitz, Ooi, Pedersen 2012) describes the empirical tendency for an asset’s own past returns to predict its future returns in expectation, distinct from cross-sectional momentum which compares assets to each other.
Volatility clustering means markets alternate between calm and violent regimes; many traditional trend tools misread volatility shocks as sustainable trend. This indicator normalizes momentum by realized volatility to express trend significance relative to the regime.
Volatility targeting (Harvey et al. 2018) scales exposure inversely to realized volatility to stabilize risk. When volatility rises, recommended exposure is reduced mechanically; when volatility falls, exposure can increase, subject to a max leverage cap.
DATA AND SOURCES
This indicator uses only the chart symbol’s OHLC data. No external feeds, no COT libraries, and no third-party data sources are required.
It supports multi-timeframe calculation. You can compute the signal on the current chart timeframe, or use a fixed timeframe such as Daily to keep volatility math consistent when viewing intraday charts.
HOW THE ENGINE WORKS (HIGH LEVEL)
Step 1 estimates realized volatility from log returns over a chosen lookback. Step 2 computes a volatility-scaled momentum statistic for three horizons (fast, medium, slow) to measure how meaningful the move is relative to volatility. Step 3 clamps extreme values so outliers do not dominate. Step 4 combines the horizons into a weighted ensemble. Step 5 optionally applies an efficiency filter to reduce exposure in choppy trends. Step 6 optionally applies volatility targeting to scale exposure inversely with realized annualized volatility, capped by Max Leverage. The final output is Recommended Exposure as the combined result of direction, risk scaling, and quality filtering.
OUTPUTS AND HOW USERS SHOULD APPLY THEM
Recommended Exposure is the primary output. Positive values indicate bullish regime bias, negative values indicate bearish regime bias, and larger magnitude indicates higher risk-adjusted conviction after filters.
Typical use is as a position-sizing overlay: keep your own entry method and use Recommended Exposure to decide how aggressive or defensive sizing should be in the current regime.
Signals are optional and trigger when Recommended Exposure crosses user-defined thresholds. A cooldown reduces repeated triggers during consolidations, and direction can be restricted to long only, short only, or both.
The dashboard is optional and displays realized volatility versus target, ensemble momentum, the efficiency metric, the volatility scalar, the quality multiplier, and final Recommended Exposure, including the fast/medium/slow breakdown.
Trend cloud bands are optional and provide range context; they are not the signal and are intended as visual regime support.
SETTINGS GUIDE (WHAT MATTERS MOST)
Fixed Timeframe mode is recommended for consistent volatility math across chart timeframes; Current Chart mode is more sensitive to the displayed timeframe.
Momentum horizons control responsiveness versus stability. Shorter lookbacks react faster but whipsaw more; longer lookbacks are smoother but slower. Weights allow emphasizing fast responsiveness or slow regime confirmation.
Volatility targeting turns the tool into a sizing engine by scaling exposure inversely to realized volatility. Target annualized volatility sets the risk budget, and the annualization basis (365 vs 252) aligns conventions for crypto versus traditional markets. Max Leverage caps the scalar in very low-volatility regimes.
The efficiency filter reduces exposure in choppy conditions; the floor controls how harshly exposure is reduced. Threshold and cooldown control how selective discrete signals are.
LIMITATIONS (IMPORTANT FOR USERS)
This is a trend-following framework, so it will lag turning points by design. Sideways markets can still cause whipsaws; cooldown and the efficiency filter may reduce but cannot eliminate this. Volatility targeting can reduce drawdowns during volatility expansions but may reduce participation during sharp V-shaped reversals after volatility increases. The efficiency metric is a practical proxy for trend straightness and can misclassify certain price paths.
REFERENCES
Moskowitz, T. J., Ooi, Y. H., and Pedersen, L. H. (2012). Time series momentum. Journal of Financial Economics, 104(2), 228-250.
Harvey, C. R., Rattray, S., Sinclair, A., and Van Hemert, O. (2018). The impact of volatility targeting. Journal of Portfolio Management, 45(1), 14-33.
Hurst, B., Ooi, Y. H., and Pedersen, L. H. (2017). A century of evidence on trend-following investing. Journal of Portfolio Management, 44(1), 15-29.
DISCLAIMER
Educational and informational purposes only. Not financial advice. Trading involves risk. Past performance is not indicative of future results.
SPX & VIX Overnight Gap and Gap % w/VIX Open
Displays SPX and VIX Overnight gaps in points and percentage with VIX open value. Display boxes change color depending on gap up (green) or gap down (red) Optional vertical line which changes color depending on the gap direction placed at the first bar.
LDEF SENS Loss Dependent Error Filter Dominance Regime SwitchCAPITALCOM:GOLD
LDEF SENS stands for Loss Dependent Error Filter. This indicator is a dominance regime filter with an adaptive switch boundary. It separates the market into two main states.
Directional tradeable tape (trend and impulse conditions)
Balanced noisy tape (higher fakeout probability)
It also provides a dominance direction bias (bull vs bear) and an adaptive boundary you can use as a market switch signal.
What you see in the indicator pane (bottom panel)
Main line (0 to 100): dominance sensitivity score
Line color meaning
Green: bullish dominance (L greater than R)
Red: bearish dominance (R greater than L)
Gray: low strength or mixed tape
Purple line: adaptive regime boundary (moving threshold)
Violet shading: regime ON (tradeable conditions)
Key idea: height equals strength, color equals direction, violet shading equals regime state.
How to read the three images
Image A - Regime ON in a trending environment
Where to look
Price panel: left to middle shows a clean up move
Indicator panel: directly below the same time window
Violet band is present for a sustained stretch
Main line stays high and mostly green
What it means
When the violet band stays ON, the tape is directional enough for trend following setups to have higher quality. This is not an entry signal. It is an environment filter.
Image B - Switch boundary and state changes
Where to look
Indicator panel: focus on the purple adaptive line and the main line crossing relative to it
Watch the moment the main line moves above the purple line. In the same region, violet shading turns ON.
What it means
The purple line is the adaptive regime boundary.
Cross above: regime switches toward directional tape (state change confirmation)
Cross below: regime fades and chop risk returns
Image C - Direction semantics inside a regime
Where to look
Indicator panel: inside violet shaded regions
Main line is green during bullish dominance (L greater than R)
Main line is red during bearish dominance (R greater than L)
What it means
Violet answers: is this a tradeable regime
Green or red answers: which side is dominating
Together, they provide a filter plus bias framework.
Practical usage
Regime filter
Prefer setups only when the violet band is ON
Reduce size or tighten criteria when the violet band is OFF
Direction bias
Prefer longs when the line is green
Prefer shorts when the line is red
Treat gray as no edge or mixed tape
Switch boundary analysis
Cross above purple: treat as regime shift confirmation
Cross below purple: treat as regime cooling off and higher chop risk
Limitations
This is a regime and dominance tool, not a standalone entry generator. Regime confirmation can be late by design, especially after shocks. Use it with structure, liquidity, and risk management.
KRXNameMapperLibrary "KRXNameMapper"
TODO: add library description here
getCompanyName(code)
TODO: add function description here
Parameters:
code (string)
Returns: TODO: add what function returns
Volume Weighted Intra Bar LR KurtosisThis indicator analyzes market character by decomposing total
Excess Kurtosis ("Fat Tails") of a SINGLE BAR into four distinct,
interpretable components based on a Linear Regression model.
Key Features:
1. **Intra-Bar LR Kurtosis Decomposition:** For each bar on the chart,
the indicator analyzes the underlying price action on a smaller
timeframe ('Intra-Bar Timeframe'). It fits a Linear Regression
line through the intra-bar data to decompose the 4th Moment:
- **Trend Kurtosis (Gold):** Peakedness of the regression line
itself. High values indicate the price path within the bar
moves in sudden jumps, steps, or gaps (discontinuous path).
- **Residual Kurtosis (Red):** Excess Kurtosis of the noise
around the regression line. Captures "Hidden Tail Risk" or
extreme outliers within the bar relative to the trend.
- **Within-Bar Kurtosis (Blue):** Fat tails derived from the
microstructure of individual intra-bar candles.
- **Interaction Variance (Dark Grey):** The comovement of variance
and mean deviations (volatility clustering relative to trend).
- **Interaction Skewness (Darker Grey):** The comovement of skewness
and mean deviations (asymmetry relative to trend).
2. **Visual Decomposition Logic:** Total Excess Kurtosis is the
primary metric displayed. Since statistical moments are additive,
this indicator calculates the *exact* Total Kurtosis and partitions
the columns based on the Law of Total Moments.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Plots the *total* kurtosis as a
stacked column chart. Stacking logic groups components to
ensure visual clarity of the magnitude.
- **Relative Mode:** Plots the direct *contribution ratio*
(proportion) of each component relative to the total sum,
ideal for identifying the dominant driver (Trend vs. Noise).
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
kurtosis of *returns* rather than absolute prices.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and moment calculations,
emphasizing high-participation moves.
5. **Kurtosis Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* kurtosis line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Analysis Lines:** The entire intra-bar analysis can be
run on a higher timeframe (using the `Timeframe` input),
with standard options to handle gaps (`Fill Gaps`) and
prevent repainting (`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Kurtosis magnitude (High Positive / High Negative).
- Character changes (Trend Jumps vs. Noise Outliers).
- Total Kurtosis pivot (High/Low) detection.
**Caution: Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This behavior is
normal and necessary for this type of analysis. Signals should only
be considered final **after the main chart bar has closed.**
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Volume Weighted KurtosisThis indicator analyzes market sentiment by decomposing total
Excess Kurtosis ("Fat Tails") into distinct, interpretable components:
"Between-Bar" (Trend Path) and "Within-Bar" (Microstructure).
Key Features:
1. **Moment-Based Kurtosis Decomposition:** The indicator
separates kurtosis based on the 'Estimate Bar Statistics' option.
It leverages the additive property of the Fourth Central Moment
(Cumulants) to ensure mathematical rigor:
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
simple kurtosis of the selected `Source`.
- **Decomposition Mode (`Estimate Bar Statistics` = ON):** The
indicator uses a statistical model ('Estimator') to
calculate *within-bar* kurtosis.
This separates the tail risk into:
- **Between-Bar Kurtosis (Gold):** Peakedness of the price
path itself. High values indicate the trend moves in jumps
or gaps rather than a smooth progression.
- **Within-Bar Kurtosis (Blue):** Fat tails within the
microstructure. High values imply significant outliers
inside the bars (e.g., extreme wicks).
- **Interaction Variance (Dark Grey):** The comovement of variance
and mean deviations (volatility clustering relative to trend).
- **Interaction Skewness (Darker Grey):** The comovement of skewness
and mean deviations (asymmetry relative to trend).
2. **Visual Decomposition Logic:** Total Excess Kurtosis is the
primary metric displayed. Since Kurtosis coefficients are not
linearly additive, this indicator calculates the *exact* Total
Kurtosis and partitions the area/ratios based on the additive
Fourth Moment Decomposition (`M4Tot = M4Btw + M4Wtn + M4Int`). This
ensures the displayed total kurtosis remains mathematically accurate.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Displays the *Total Kurtosis* as the main
line, with the background filled by the stacked components.
Shows the *magnitude* of the tail risk.
- **Relative Mode:** Displays the **Contribution Ratios**
of each component (-1.0 to 1.0). This isolates the
*structure/quality* of the risk (e.g., "Is the risk
driven by the trend jumps or by the candle instability?").
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
kurtosis of *returns* rather than absolute prices.
(Essential for correct statistical properties).
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all moment calculations, emphasizing
high-participation moves.
5. **Kurtosis Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *Total Kurtosis* line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Kurtosis Lines:** The kurtosis lines can be
calculated on a higher timeframe, with standard options
to handle gaps (`Fill Gaps`) and prevent repainting
(`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Kurtosis magnitude (High Positive / High Negative).
- Character changes (Inter-Bar vs. Intra-Bar dominance).
- Total Kurtosis pivot (High/Low) detection.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Wick Statistics (Intra-Day)Data box that shows smallest, largest, and average wick point size during specified time ranges.
Entropy Divergence (No Repaint) [PhenLabs]📊 Entropy Divergence (No Repaint)
Version: PineScript™ v6
📌 Description
The Entropy Divergence Scalper (EDS) is a sophisticated trading indicator that applies information theory to market analysis. By calculating Shannon Entropy on price returns, it identifies periods when market behavior becomes more predictable and orderly—the ideal conditions for divergence-based trading.
Traditional divergence indicators generate signals regardless of market conditions, leading to many false signals during chaotic, high-entropy periods. EDS solves this by acting as an intelligent filter: it only triggers signals when entropy drops below your specified threshold, indicating that the market has entered a more structured, tradeable state.
This indicator is built with a strict non-repainting guarantee. All signals use barstate.isconfirmed and only appear after bar close, giving you reliable signals you can trust for live trading.
🚀 Points of Innovation
Shannon Entropy integration measures market randomness using information theory mathematics
Dual divergence engine detects both RSI and Volume divergences simultaneously
Entropy-filtered signals eliminate noise by only triggering in low-entropy (predictable) market conditions
100% non-repainting architecture ensures all signals are confirmed and historically accurate
Multi-layer confirmation combines entropy state, RSI divergence, and volume divergence for higher probability setups
Dynamic color visualization provides instant visual feedback on current market entropy state
🔧 Core Components
Shannon Entropy Calculator: Bins price returns into histograms and calculates entropy using H(X) = -Σ p(x) × log₂(p(x))
RSI Divergence Detector: Identifies when price makes lower lows while RSI makes higher lows (bullish) or price makes higher highs while RSI makes lower highs (bearish)
Volume Divergence Detector: Spots increasing volume interest at price lows (bullish) or decreasing conviction at price highs (bearish)
Pivot Detection System: Uses configurable lookback periods to identify and track price, RSI, and volume pivots
Signal Classification Engine: Labels signals as RSI, VOL, or RSI+VOL based on which divergences triggered
🔥 Key Features
Entropy Threshold Control: Set your preferred entropy level (default 2.5) to filter out signals during chaotic market periods
Configurable Smoothing: EMA smoothing on entropy values reduces noise while maintaining signal responsiveness
Flexible Pivot Detection: Adjust left/right lookback bars to tune sensitivity for different trading styles
Divergence Search Range: Control how far back the indicator looks for divergence patterns (20-200 bars)
Minimum Pivot Distance: Prevents false signals from pivots that are too close together
Complete Alert System: Four alert conditions for bullish signals, bearish signals, any signal, and low entropy zone entry
🎨 Visualization
Dynamic Entropy Line: Color gradient shifts from green (low entropy/tradeable) to orange (high entropy/chaotic)
Entropy Threshold Line: Dashed reference line shows your configured entropy threshold
Low Entropy Zone Fill: Background highlighting indicates when market is in tradeable low-entropy state
Scaled RSI Plot: RSI overlay scaled to fit the entropy pane for easy correlation analysis
Normalized Volume Bars: Volume displayed as columns normalized against 20-period average
Signal Labels: Clear LONG/SHORT labels with divergence type (RSI, VOL, or RSI+VOL)
Information Table: Real-time display of entropy value, state, RSI, and current signal status
📖 Usage Guidelines
Entropy Lookback Period — Default: 20, Range: 5-100 — Controls how many bars are used for entropy calculation; higher values provide smoother readings but slower response
Histogram Bins — Default: 10, Range: 5-50 — Number of bins for probability distribution; more bins provide finer granularity
Low Entropy Threshold — Default: 2.5, Range: 0.5-4.0 — Signals only trigger when entropy drops below this value; lower settings are more selective
Entropy Smoothing — Default: 3, Range: 1-10 — EMA smoothing applied to raw entropy values for noise reduction
RSI Length — Default: 14, Range: 5-50 — Standard RSI calculation period
Pivot Lookback Left — Default: 5, Range: 2-20 — Bars to the left for pivot detection
Pivot Lookback Right — Default: 2, Range: 1-10 — Bars to the right for pivot confirmation; lower values produce faster signals
Divergence Search Range — Default: 60, Range: 20-200 — Maximum bars to look back for divergence comparison
Min Bars Between Pivots — Default: 5, Range: 3-30 — Minimum distance between pivots for valid divergence detection
✅ Best Use Cases
Scalping during low-volatility consolidation periods when entropy drops and price becomes more predictable
Swing trade entry timing by waiting for divergence signals in low-entropy market conditions
Trend reversal identification when both RSI and Volume divergences align with low entropy readings
Multi-timeframe confirmation by checking entropy state on higher timeframes before taking signals
Filtering existing strategies by adding entropy as a confirmation layer to reduce false signals
⚠️ Limitations
Signals appear with a delay due to pivot confirmation requirements (pivotLookbackRight bars after pivot forms)
May generate fewer signals during strongly trending markets where entropy remains elevated
Entropy threshold requires optimization for different instruments and timeframes
Not designed for high-frequency trading due to bar-close confirmation requirement
Divergences can fail in extremely strong trends where momentum overwhelms the signal
💡 What Makes This Unique
First indicator to combine Shannon Entropy filtering with multi-factor divergence detection
Information theory approach provides mathematical foundation for identifying tradeable market states
Triple confirmation requirement (low entropy + divergence + bar close) significantly reduces false signals
Non-repainting guarantee makes it suitable for strategy backtesting and live trading
Open-source PineScript v6 code allows traders to understand and customize the methodology
🔬 How It Works
Step 1 — Entropy Calculation: The indicator calculates logarithmic returns, bins them into a histogram, and computes Shannon Entropy to measure market randomness
Step 2 — Entropy Filtering: When smoothed entropy drops below the threshold, the market is considered to be in a tradeable low-entropy state
Step 3 — Pivot Detection: The system continuously tracks price, RSI, and volume pivots using configurable lookback parameters
Step 4 — Divergence Analysis: When a new pivot is confirmed, the indicator compares it against previous pivots to detect bullish or bearish divergences
Step 5 — Signal Generation: A final signal only triggers when low entropy conditions coincide with a confirmed divergence pattern on a closed bar
💡 Note:
This indicator is designed for educational purposes and technical analysis. Always use proper risk management and never risk more than you can afford to lose. The non-repainting guarantee means signals will only appear after bar close—watch the indicator in real-time to verify this behavior. For optimal results, consider combining EDS signals with support/resistance levels and overall market context.
Spectre -Candles Spectre -Candles MEANS SPECTRE CANDLES -
2 candle closing main 2 candle closing main
Session Open/Close Labels - SimpleSimple and Minimal Label that shows Tokyo and EU open and close times on the chart
Volume Weighted Intra Bar KurtosisThis indicator analyzes market sentiment by providing a detailed
view of Excess Kurtosis ("Fat Tails"). It uses data from a lower,
intra-bar timeframe to separate the total kurtosis of a single bar
into distinct, interpretable components.
Key Features:
1. **Intra-Bar Kurtosis Decomposition:** For each bar on the chart,
the indicator analyzes the underlying price action on a smaller
timeframe ('Intra-Bar Timeframe'). Unlike Variance, the Fourth
Central Moment (Kurtosis) decomposes into three parts:
- **Between-Bar Kurtosis (Gold):** Peakedness of the price
path *between* the intra-bar candles. High values indicate
that the macro movement happened in jumps or gaps rather
than a smooth progression.
- **Within-Bar Kurtosis (Blue):** Fat tails derived from the
microstructure (extreme wicks) *inside* the intra-bar candles.
- **Interaction Variance (Dark Grey):** The comovement of variance
and mean deviations (volatility clustering relative to trend).
- **Interaction Skewness (Darker Grey):** The comovement of skewness
and mean deviations (asymmetry relative to trend).
2. **Visual Decomposition Logic:** Total Excess Kurtosis is the
primary metric displayed. Since Kurtosis coefficients are not
linearly additive, this indicator calculates the *exact* Total
Kurtosis and partitions the columns based on the additive
Fourth Moment Decomposition (`M4Tot = M4Btw + M4Wtn + M4Int`).
3. **Dual Display Modes:** The indicator offers two modes to
visualize this information:
- **Absolute Mode:** Plots the *total* kurtosis as a
stacked column chart, showing the *absolute magnitude* of
tail risk and the contribution of each component.
- **Relative Mode:** Plots the components as a 100% stacked
column chart (scaled from 0 to 1), focusing purely on the
*energy ratio* of the components.
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
calculates an **Exponential Regression Curve** (log-space),
making the analysis suitable for comparing assets with
different scales (e.g., BTC vs EURUSD).
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all mean and moment calculations.
5. **Kurtosis Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* kurtosis line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Analysis Lines:** The entire intra-bar analysis can be
run on a higher timeframe (using the `Timeframe` input),
with standard options to handle gaps (`Fill Gaps`) and
prevent repainting (`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes alerts for:
- Kurtosis magnitude (High Positive / High Negative).
- Kurtosis character changes/emerging/fading.
- Total Kurtosis pivot (High/Low) detection.
**Caution: Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This behavior is
normal and necessary for this type of analysis. Signals should only
be considered final **after the main chart bar has closed.**
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Volume Weighted LR KurtosisThis indicator analyzes market character by decomposing total
Excess Kurtosis ("Fat Tails") into four distinct, interpretable
components based on a Linear Regression model.
Key Features:
1. **Four-Component Kurtosis Decomposition:** The indicator
separates market tail risk based on the 'Estimate Bar Statistics' option.
It leverages the Law of Total Moments to provide an additive
breakdown of the 4th Statistical Moment:
- **Trend Kurtosis (Gold):** Peakedness of the regression line
itself. High values indicate the trend moves in sudden jumps,
steps, or gaps (discontinuous path).
- **Residual Kurtosis (Red):** Excess Kurtosis of the noise
around the regression line. This captures the "Hidden Tail Risk"
(extreme outliers relative to the trend).
- **Within-Bar Kurtosis (Blue):** Fat tails derived from the
microstructure of individual bars (requires 'Estimate Bar Statistics').
- **Interaction Variance (Dark Grey):** The comovement of variance
and mean deviations (volatility clustering relative to trend).
- **Interaction Skewness (Darker Grey):** The comovement of skewness
and mean deviations (asymmetry relative to trend).
2. **Visual Decomposition Logic:** Total Excess Kurtosis is the
primary metric displayed. Since statistical moments are additive,
this indicator calculates the *exact* Total Kurtosis and partitions
the area to visualize the contribution (weight) of each
structural source to the overall tail risk.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Displays the *total* kurtosis as a
stacked area chart, allowing to see the magnitude of tail risk.
Stacking logic groups components to ensure visual clarity.
- **Relative Mode:** Displays the direct *contribution ratio*
(proportion) of each component relative to the total sum,
ideal for identifying the dominant driver of the risk.
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
kurtosis of *returns* rather than absolute prices.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and moment calculations,
emphasizing high-participation moves.
5. **Kurtosis Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* kurtosis line. This helps identify extremes in
market fragility or structural changes.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Kurtosis Lines:** The kurtosis lines can be
calculated on a higher timeframe, with standard options
to handle gaps (`Fill Gaps`) and prevent repainting
(`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Kurtosis magnitude (High Positive / High Negative).
- Kurtosis character changes/emerging/fading.
- Total Kurtosis pivot (High/Low) detection.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Volume Weighted Intra Bar LR SkewnessThis indicator analyzes market character by decomposing total
skewness (asymmetry) of a SINGLE BAR into four distinct,
interpretable components based on a Linear Regression model.
Key Features:
1. **Intra-Bar LR Skewness Decomposition:** For each bar on the chart,
the indicator analyzes the underlying price action on a smaller
timeframe ('Intra-Bar Timeframe'). It fits a Linear Regression
line through the intra-bar data to decompose the 3rd Moment:
- **Trend Skewness (Green/Red):** Asymmetry originating from
the slope of the intra-bar regression line. Indicates if the
price path within the bar is geometrically trend-driven.
- **Residual Skewness (Yellow):** Asymmetry of the noise
around the regression line. Captures "Tail Risk" or sudden
shocks within the bar that deviate from the main path.
- **Within-Bar Skewness (Blue):** Asymmetry derived from the
microstructure of individual intra-bar candles.
- **Interaction Skewness (Dark Grey):** Asymmetry caused by
the correlation between price levels and volatility within
the bar (e.g., volatility expanding as price drops).
2. **Visual Decomposition Logic:** Total Skewness is the
primary metric displayed. Since statistical moments are additive,
this indicator calculates the *exact* Total Skewness and partitions
the columns based on the Law of Total Moments.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Plots the *total* skewness as a
stacked column chart. Stacking logic groups components with
the same sign to ensure visual clarity.
- **Relative Mode:** Plots the direct *contribution ratio*
(proportion) of each component relative to the total sum,
ideal for identifying the dominant driver (Trend vs. Noise).
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
skewness of *returns* rather than absolute prices.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and moment calculations,
emphasizing high-participation moves.
5. **Skewness Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* skewness line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Analysis Lines:** The entire intra-bar analysis can be
run on a higher timeframe (using the `Timeframe` input),
with standard options to handle gaps (`Fill Gaps`) and
prevent repainting (`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Skewness magnitude (High Positive / High Negative).
- Character changes (Trend vs. Noise dominance).
- Total Skewness pivot (High/Low) detection.
**Caution: Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This behavior is
normal and necessary for this type of analysis. Signals should only
be considered final **after the main chart bar has closed.**
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Volume Weighted Intra Bar SkewnessThis indicator analyzes market sentiment by providing a detailed
view of skewness (asymmetry). It uses data from a lower, intra-bar
timeframe to separate the total skewness of a single bar into
distinct, interpretable components.
Key Features:
1. **Intra-Bar Skewness Decomposition:** For each bar on the chart,
the indicator analyzes the underlying price action on a smaller
timeframe ('Intra-Bar Timeframe'). Unlike Variance, the Third
Central Moment (Skewness) decomposes into three parts:
- **Between-Bar Skewness (Gold):** Asymmetry of the price
path *between* the intra-bar candles. Indicates if the macro
movements within the bar accelerated in one direction.
- **Within-Bar Skewness (Blue):** Asymmetry of the
microstructure (wicks vs. tails) *inside* the intra-bar candles.
- **Interaction Skewness (Grey):** The component arising from
the comovement of local means and local variances (e.g.,
does volatility increase when price drops?).
2. **Visual Decomposition Logic:** Total Skewness is the
primary metric displayed. Since Skewness coefficients are not
linearly additive, this indicator calculates the *exact* Total
Skewness and partitions the columns based on the additive
Third Moment Decomposition (`M3Tot = M3Btw + M3Wtn + M3Int`).
3. **Dual Display Modes:** The indicator offers two modes to
visualize this information:
- **Absolute Mode:** Plots the *total* skewness as a
stacked column chart, showing the *absolute magnitude* of
asymmetry and the contribution of each component.
- **Relative Mode:** Plots the components as a 100% stacked
column chart (scaled from 0 to 1), focusing purely on the
*energy ratio* of the components.
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
calculates an **Exponential Regression Curve** (log-space),
making the analysis suitable for comparing assets with
different scales (e.g., BTC vs EURUSD).
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all mean and moment calculations.
5. **Skewness Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (highs and lows) in
the *total* skewness line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Analysis Lines:** The entire intra-bar analysis can be
run on a higher timeframe (using the `Timeframe` input),
with standard options to handle gaps (`Fill Gaps`) and
prevent repainting (`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes alerts for:
- Skewness magnitude (High Positive / High Negative).
- Skewness character changes/emerging/fading.
- Total Skewness pivot (High/Low) detection.
**Caution: Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This behavior is
normal and necessary for this type of analysis. Signals should only
be considered final **after the main chart bar has closed.**
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Volume Weighted LR SkewnessThis indicator analyzes market character by decomposing total
skewness (asymmetry) into four distinct, interpretable components
based on a Linear Regression model.
Key Features:
1. **Four-Component Skewness Decomposition:** The indicator
separates market asymmetry based on the 'Estimate Bar Statistics' option.
It leverages the Law of Total Moments to provide an additive
breakdown of the 3rd Statistical Moment:
- **Trend Skewness (Green/Red):** Asymmetry originating from
the slope of the regression line itself. Indicates if the
trend path is geometrically skewed.
- **Residual Skewness (Yellow):** Asymmetry of the noise
around the regression line. Captures "Tail Risk" (e.g.,
sudden spikes against the trend).
- **Within-Bar Skewness (Blue):** Asymmetry derived from the
microstructure of individual bars (requires 'Estimate Bar Statistics').
- **Interaction Skewness (Dark Grey):** Asymmetry caused by the
correlation between price levels and volatility (e.g.,
volatility expanding as price moves in one direction).
*Dominance of this component indicates an unstable, emotional market.*
2. **Visual Decomposition Logic:** Total Skewness is the
primary metric displayed. Since statistical moments are additive,
this indicator calculates the *exact* Total Skewness and partitions
the area to visualize the contribution (weight) of each
structural source to the overall market bias.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Displays the *total* skewness as a
stacked area chart, allowing to see the magnitude of tail risk.
Stacking logic groups components with the same sign to ensure
visual clarity.
- **Relative Mode:** Displays the direct *contribution ratio*
(proportion) of each component relative to the total sum,
ideal for identifying the dominant driver of asymmetry.
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
skewness of *returns* rather than absolute prices.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and moment calculations,
emphasizing high-participation moves.
5. **Skewness Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *total* skewness line. This helps identify extremes in
market sentiment or structural bias.
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Skewness Lines:** The skewness lines can be
calculated on a higher timeframe, with standard options
to handle gaps (`Fill Gaps`) and prevent repainting
(`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Skewness magnitude (High Positive / High Negative).
- Skewness character changes/emerging/fading.
- Total Skewness pivot (High/Low) detection.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Volume Weighted SkewnessThis indicator analyzes market sentiment by decomposing total
skewness (asymmetry) into two distinct, interpretable components:
"Between-Bar" (Inter-Bar) and "Within-Bar" (Intra-Bar) skewness.
Key Features:
1. **Moment-Based Skewness decomposition:** The indicator
separates skewness based on the 'Estimate Bar Statistics' option.
It leverages the additive property of the Third Central Moment
to ensure mathematical rigor:
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
simple skewness of the selected `Source`.
- **Decomposition Mode (`Estimate Bar Statistics` = ON):** The
indicator uses a statistical model ('Estimator') to
calculate *within-bar* skewness.
This separates the asymmetry into:
- **Between-Bar Skewness (Gold):** Asymmetry of the price
path itself. A positive value indicates that the trend
moves more aggressively upwards than downwards.
- **Within-Bar Skewness (Blue):** Asymmetry of the
microstructure (wicks vs. tails). A positive value implies
strong buying pressure within the bars (long tails).
2. **Visual Decomposition Logic:** Total Skewness is the
primary metric displayed. Since Skewness coefficients are not
linearly additive, this indicator calculates the *exact* Total
Skewness and partitions the area/ratios based on the additive
Third Moment Decomposition (`M3Tot = M3Btw + M3Wtn`). This
ensures the displayed total skewness remains mathematically accurate.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Displays the *Total Skewness* as the main
line, with the background filled by the stacked components.
Shows the *magnitude* and direction of the tail risk.
- **Relative Mode:** Displays the **Contribution Ratios**
of each component (-1.0 to 1.0). This isolates the
*structure/quality* of the asymmetry (e.g., "Is the skewness
driven by the trend or by the candle shapes?").
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
transforms inputs into logarithmic space, analyzing the
skewness of *returns* rather than absolute prices.
(Essential for correct statistical properties).
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all moment calculations, emphasizing
high-participation moves.
5. **Skewness Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (peaks/valleys) in
the *Total Skewness* line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Skewness Lines:** The skewness lines can be
calculated on a higher timeframe, with standard options
to handle gaps (`Fill Gaps`) and prevent repainting
(`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Skewness magnitude (High Positive / High Negative).
- Character changes (Inter-Bar vs. Intra-Bar dominance).
- Total Skewness pivot (High/Low) detection.
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.
Volume Weighted Intra Bar LR CorrelationThis indicator analyzes market character by providing a detailed
view of correlation. It applies a Linear Regression model to
intra-bar price action, dissecting the total correlation of
each bar into three distinct components.
Key Features:
1. **Three-Component Correlation Decomposition:** The indicator
separates correlation based on the 'Estimate Bar Statistics' option.
- **Standard Mode (`Estimate Bar Statistics` = OFF):** Calculates
correlation based on the selected `Source` (this results
mainly in 'Trend' and 'Residual' correlation).
- **Decomposition Mode (`Estimate Bar Statistics` = ON):** The
indicator uses a statistical model ('Estimator') to
calculate *within-bar* correlation.
(Assumption: In this mode, the `Source` input is
**ignored**, and an estimated mean for each bar is used
instead).
This separates correlation into:
- **Trend Correlation (Green/Red):** Correlation explained by the
regression's slope (Directional Alignment).
- **Residual Correlation (Yellow):** Correlation from price
oscillating around the regression line (Mean-Reversion/Cointegration).
- **Within-Bar Correlation (Blue):** Correlation from the
high-low range of each bar (Microstructure/Noise).
2. **Visual Decomposition Logic:** Total Correlation is the
primary metric displayed. Since Correlation Coefficients are not
linearly additive, this indicator plots the *exact* Total
Correlation and partitions the area underneath based on the
Covariance Ratio. This ensures the displayed total correlation
remains mathematically accurate while showing relative composition.
3. **Dual Display Modes:** The indicator offers two modes to
visualize this decomposition:
- **Absolute Mode:** Displays the *total* correlation as a
stacked area chart, partitioned by the ratio of
the three components.
- **Relative Mode:** Displays the direct *energy ratio*
(proportion) of each component relative to the total (0-1),
ideal for identifying the dominant market character.
4. **Calculation Options:**
- **Normalization:** An optional 'Normalize' setting
calculates an **Exponential Regression Curve** (log-space),
making the analysis suitable for growth assets.
- **Volume Weighting:** An option (`Volume weighted`) applies
volume weighting to all regression and correlation calculations.
5. **Correlation Cycle Analysis:**
- **Pivot Detection:** Includes a built-in pivot detector
that identifies significant turning points (highs and lows) in
the *total* correlation line. (Note: This is only visible
in 'Absolute Mode').
- **Flexible Pivot Algorithms:** Supports various underlying
mathematical models for pivot detection provided by the
core library.
6. **Note on Confirmation (Lag):** Pivot signals are confirmed
using a lookback method. A pivot is only plotted *after*
the `Pivot Right Bars` input has passed, which introduces
an inherent lag.
7. **Multi-Timeframe (MTF) Capability:**
- **MTF Correlation Lines:** The correlation lines can be
calculated on a higher timeframe, with standard options
to handle gaps (`Fill Gaps`) and prevent repainting
(`Wait for...`).
- **Limitation:** The Pivot detection (`Calculate Pivots`) is
**disabled** if a Higher Timeframe (HTF) is selected.
8. **Integrated Alerts:** Includes comprehensive alerts for:
- Correlation magnitude (High Positive / High Inverse).
- Correlation character changes/emerging/fading.
- Total Correlation pivot (High/Low) detection.
**Caution! Real-Time Data Behavior (Intra-Bar Repainting)**
This indicator uses high-resolution intra-bar data. As a result, the
values on the **current, unclosed bar** (the real-time bar) will
update dynamically as new intra-bar data arrives. This behavior is
normal and necessary for this type of analysis. Signals should only
be considered final **after the main chart bar has closed.**
---
**DISCLAIMER**
1. **For Informational/Educational Use Only:** This indicator is
provided for informational and educational purposes only. It does
not constitute financial, investment, or trading advice, nor is
it a recommendation to buy or sell any asset.
2. **Use at Your Own Risk:** All trading decisions you make based on
the information or signals generated by this indicator are made
solely at your own risk.
3. **No Guarantee of Performance:** Past performance is not an
indicator of future results. The author makes no guarantee
regarding the accuracy of the signals or future profitability.
4. **No Liability:** The author shall not be held liable for any
financial losses or damages incurred directly or indirectly from
the use of this indicator.
5. **Signals Are Not Recommendations:** The alerts and visual signals
(e.g., crossovers) generated by this tool are not direct
recommendations to buy or sell. They are technical observations
for your own analysis and consideration.






















