Prices go up Friday 27 Nov · 00:00 New York 5d 00:34:00

Open-source

Deviation Trend Profile

A statistical trend analysis tool that combines moving average dynamics with standard deviation zones and trend-specific price distribution. This is an exp...

Deviation Trend Profile preview
Published Jun 16, 2025
11,747215,340

What this TradingView script does

A statistical trend analysis tool that combines moving average dynamics with standard deviation zones and trend-specific price distribution. This is an experimental indicator designed for educational and learning purposes only.

🔵 CONCEPTS

- Trend Detection via SMA Slope: Detects trend shifts when the slope of the SMA exceeds a ±0.1 threshold.

- Standard Deviation Zones: Calculates ±1, ±2, and ±3 levels from the SMA using ATR, forming dynamic envelopes around the mean.

- Trend Distribution Profile: Builds a histogram that shows how often price closed within each deviation zone during the active trend phase.

🔵 FEATURES

- Trend Signals: Immediate shift markers using colored circles at trend reversals.

- SMA Gradient Coloring: The SMA line dynamically changes color based on its directional slope.

- Trend Duration Label: A label above the histogram shows how many bars the current trend has lasted.

- Trend Distribution Histogram: Visual bin-based profile showing frequency of price closes within deviation bands during trend lookback period.

How traders can use it

Use Deviation Trend Profile as a chart context layer inside TradingView: read the structure it highlights, compare it with your market bias, and let the script narrow which moves deserve attention.

The strongest workflow is to combine the script with higher timeframe structure, volume context, and a repeatable execution plan instead of treating any single label as a standalone trade.

Ready to level up your trading?

Get advanced indicators, backtesting and the BigBeluga community in one plan.

Get Access