PGS - Pareto-Gaussian Skew [Zofesu]PGS - Pareto-Gaussian Skew is a trend gravity indicator built on two mathematical principles: the Gaussian distribution for detecting statistically significant price moves, and the Pareto principle for isolating the minority of moves that drive the majority of directional displacement.
The result is a single adaptive line that acts as a gravitational center — pulling toward institutional price displacement while filtering out the noise that makes standard moving averages lag or whipsaw.
─────────────────────────────────────
01 — What is PGS?
─────────────────────────────────────
PGS plots a gravity line that tracks where price is being pulled by significant institutional moves. Unlike a standard moving average, it does not react to all price movement equally. It reacts only when price moves beyond one standard deviation from its mean — the threshold where statistically normal noise ends and directional displacement begins.
Below that threshold, the line stays anchored to the mean. Above it, the Pareto Skew Factor shifts the gravity line toward the extreme, capturing the 20% of moves that drive 80% of the trend.
─────────────────────────────────────
02 — How it works
─────────────────────────────────────
The engine runs in three steps:
Step 1 — Mean and standard deviation
SMA and standard deviation are calculated over the lookback window (default 100 bars). This defines the Gaussian baseline — the statistical center of recent price behavior.
Step 2 — Extreme detection
The distance between current close and the mean is measured. If that distance exceeds 1x standard deviation, the move is classified as extreme. Moves within 1 standard deviation are treated as noise and ignored.
Step 3 — Pareto displacement
Extreme moves are multiplied by the Pareto Skew Factor (default 0.8). This skewed value is then smoothed with an EMA over a quarter of the lookback period and added back to the mean — producing the final gravity line.
Formula:
gravity = SMA(close, n) + EMA(d × extreme × skew, n/4)
where d = close − SMA(close, n), extreme = 1 if |d| > StDev else 0
─────────────────────────────────────
03 — Visuals
─────────────────────────────────────
Blue line — Pareto-Gaussian gravity line
Tension Cloud — fill between price and the gravity line.
Green fill = price above gravity line (bullish tension).
Pink fill = price below gravity line (bearish tension).
Note: Price Reference and PGS Reference appear in the indicator's plot list but are invisible on the chart. They are internal anchors required by Pine Script's fill() function and serve no visual or analytical purpose for the user.
─────────────────────────────────────
04 — Settings
─────────────────────────────────────
Smith's Memory (Lookback) — default 100
Number of candles used for the Gaussian baseline. Higher = slower, more stable line. Lower = faster, more reactive.
Pareto Skew Factor — default 0.8
Weight applied to extreme moves. Higher = gravity line shifts more aggressively toward institutional displacement. Lower = more conservative, stays closer to the mean.
─────────────────────────────────────
05 — How To Use
─────────────────────────────────────
Step 1 — Read the Tension Cloud
Green fill = price is above the gravity line. Bullish context — look for longs or hold existing positions.
Pink fill = price is below the gravity line. Bearish context — look for shorts or avoid longs.
Step 2 — Watch for gravity line crossings
Price crossing the gravity line from below = potential bullish shift.
Price crossing from above = potential bearish shift.
Step 3 — Use as dynamic support and resistance
In trending markets the gravity line acts as a dynamic S/R level. Price pulling back to the line in a green cloud = potential long entry zone.
Step 4 — Combine with higher timeframe context
PGS works best as a trend context filter alongside entry tools. It defines the direction — your entry indicator defines the moment.
Works on all asset classes: Indices, Forex, Gold, Oil, Crypto.
Best timeframes: H1, H4, D1.
Pine Script® indicator






















