OPEN-SOURCE SCRIPT
SSA & Trend - Post Normalized

## SSA Trend with Post-Normalization
This indicator is a modified version of **“End-Pointed SSA of Normalized Price Corridor [Loxx]”** and is based on the original work by Loxx.
The main difference lies in the order of the SSA calculation and normalization.
In the original implementation, the input price is normalized first:
`normalized = (source - ma) / dev`
SSA is then applied to the normalized price series.
However, this normalization method may sometimes produce a misleading trend signal. Even when the actual price is rising, the normalized value may decline if the moving average (`ma`) and standard deviation (`dev`) increase faster than the price itself. As a result, SSA applied to the normalized series may indicate a downward trend while the underlying price trend is still upward.
To reduce this distortion, this version changes the calculation order:
1. Apply SSA directly to the original price series.
2. Reconstruct the smoothed SSA trend.
3. Normalize the reconstructed SSA trend afterward.
In other words:
**Original approach:**
`Price → Normalize → SSA → Trend`
**This version:**
`Price → SSA → Trend → Normalize`
By performing normalization after SSA reconstruction, the indicator aims to preserve the direction of the underlying price trend while still providing a standardized oscillator that can be compared across different markets, price levels, and volatility conditions.
The normalized SSA output can be used to identify:
* The direction of the smoothed trend
* Trend reversals and turning points
* Overextended upward or downward movements
* Momentum weakening after a strong price move
* Potential entry and exit signals based on threshold crossings and trend-color changes
Special thanks to **Loxx** for the original open-source indicator and SSA implementation.
This indicator is intended for research and analytical purposes only and does not constitute financial advice.
This indicator is a modified version of **“End-Pointed SSA of Normalized Price Corridor [Loxx]”** and is based on the original work by Loxx.
The main difference lies in the order of the SSA calculation and normalization.
In the original implementation, the input price is normalized first:
`normalized = (source - ma) / dev`
SSA is then applied to the normalized price series.
However, this normalization method may sometimes produce a misleading trend signal. Even when the actual price is rising, the normalized value may decline if the moving average (`ma`) and standard deviation (`dev`) increase faster than the price itself. As a result, SSA applied to the normalized series may indicate a downward trend while the underlying price trend is still upward.
To reduce this distortion, this version changes the calculation order:
1. Apply SSA directly to the original price series.
2. Reconstruct the smoothed SSA trend.
3. Normalize the reconstructed SSA trend afterward.
In other words:
**Original approach:**
`Price → Normalize → SSA → Trend`
**This version:**
`Price → SSA → Trend → Normalize`
By performing normalization after SSA reconstruction, the indicator aims to preserve the direction of the underlying price trend while still providing a standardized oscillator that can be compared across different markets, price levels, and volatility conditions.
The normalized SSA output can be used to identify:
* The direction of the smoothed trend
* Trend reversals and turning points
* Overextended upward or downward movements
* Momentum weakening after a strong price move
* Potential entry and exit signals based on threshold crossings and trend-color changes
Special thanks to **Loxx** for the original open-source indicator and SSA implementation.
This indicator is intended for research and analytical purposes only and does not constitute financial advice.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.