OPEN-SOURCE SCRIPT
Gaussian Channel System [GCS]

## DESCRIPTION

Gaussian Ribbon Engine (GRE) is a multi-layer trend analysis system built on the Arnaud Legoux Moving Average (ALMA), which applies a Gaussian (bell curve) weighting function to price data instead of the linear or exponential weights used by traditional moving averages.
**Mathematical Foundation**

ALMA uses a Gaussian kernel — the same bell-curve distribution found in statistics and physics — to weight the prices in its lookback window. The Gaussian function is parameterized by two values: offset (which shifts the bell curve left or right, controlling responsiveness vs. smoothness) and sigma (which controls the width of the bell curve, determining how sharply weights decay from the center). The formula applies: w(i) = exp(-((i - offset * (N-1))^2) / (2 * sigma^2 * N^2)), where each price bar receives a weight according to its position on the Gaussian curve. This produces a moving average with mathematically optimal noise filtering properties.
GRE constructs five ALMA layers with increasing periods (default 9, 21, 55, 100, 200), creating a visual ribbon. When all five layers align in order (fastest on top for bullish, fastest on bottom for bearish), the market is in full directional agreement. The spread between the outermost layers, measured as a percentage and compared to its own historical average, identifies squeeze (convergence) and expansion (divergence) conditions.
**9-Point Confluence Scoring**
The scoring matrix evaluates: price vs. Layer 1, Layer 1 vs. 2, Layer 2 vs. 3, Layer 3 vs. 4, Layer 4 vs. 5 alignment, Layer 1 slope direction, Layer 3 slope direction, RSI above/below 50, and DI+/DI- directional movement. Signals fire when the score crosses the configurable threshold with ADX confirmation.
**Features**
- Five-layer ALMA ribbon with Gaussian kernel weighting
- Adjustable offset (0-1) and sigma parameters for fine-tuning the Gaussian bell shape
- Ribbon spread analysis with squeeze and expansion detection
- 9-point confluence scoring with visual dot notation in dashboard
- ATR-based dual take-profit levels (TP1 and TP2)
- Squeeze breakout signals when ribbon compresses then expands
- ADX and volume confirmation filters
- Full color-coded dashboard with regime classification
- Multiple alert conditions

---
Gaussian Ribbon Engine (GRE) is a multi-layer trend analysis system built on the Arnaud Legoux Moving Average (ALMA), which applies a Gaussian (bell curve) weighting function to price data instead of the linear or exponential weights used by traditional moving averages.
**Mathematical Foundation**
ALMA uses a Gaussian kernel — the same bell-curve distribution found in statistics and physics — to weight the prices in its lookback window. The Gaussian function is parameterized by two values: offset (which shifts the bell curve left or right, controlling responsiveness vs. smoothness) and sigma (which controls the width of the bell curve, determining how sharply weights decay from the center). The formula applies: w(i) = exp(-((i - offset * (N-1))^2) / (2 * sigma^2 * N^2)), where each price bar receives a weight according to its position on the Gaussian curve. This produces a moving average with mathematically optimal noise filtering properties.
GRE constructs five ALMA layers with increasing periods (default 9, 21, 55, 100, 200), creating a visual ribbon. When all five layers align in order (fastest on top for bullish, fastest on bottom for bearish), the market is in full directional agreement. The spread between the outermost layers, measured as a percentage and compared to its own historical average, identifies squeeze (convergence) and expansion (divergence) conditions.
**9-Point Confluence Scoring**
The scoring matrix evaluates: price vs. Layer 1, Layer 1 vs. 2, Layer 2 vs. 3, Layer 3 vs. 4, Layer 4 vs. 5 alignment, Layer 1 slope direction, Layer 3 slope direction, RSI above/below 50, and DI+/DI- directional movement. Signals fire when the score crosses the configurable threshold with ADX confirmation.
**Features**
- Five-layer ALMA ribbon with Gaussian kernel weighting
- Adjustable offset (0-1) and sigma parameters for fine-tuning the Gaussian bell shape
- Ribbon spread analysis with squeeze and expansion detection
- 9-point confluence scoring with visual dot notation in dashboard
- ATR-based dual take-profit levels (TP1 and TP2)
- Squeeze breakout signals when ribbon compresses then expands
- ADX and volume confirmation filters
- Full color-coded dashboard with regime classification
- Multiple alert conditions
---
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.