OPEN-SOURCE SCRIPT
SMAST Oscillator [point algo]

The SMAST Oscillator combines a Simple Moving Average (SMA) with the Supertrend indicator to measure the distance between them as a momentum oscillator.
Instead of displaying the SMA and Supertrend directly on the price chart, this indicator plots the difference between the two values around a zero line, making it easier to identify trend strength, momentum shifts, and potential reversals.
How it works
The oscillator is calculated as:
Oscillator = SMA − Supertrend
Positive values indicate the SMA is above the Supertrend.
Negative values indicate the SMA is below the Supertrend.
The farther the oscillator moves away from zero, the greater the separation between the two indicators.
The histogram-style fill changes color automatically based on whether the oscillator is above or below the zero line.
Interpretation
Bullish Momentum
Bearish Momentum
Zero Line Cross
A cross above or below zero may indicate that the relationship between the SMA and Supertrend has changed.
Many traders use these transitions as an additional confirmation alongside their existing trading strategy.
Inputs
SMA Length
Supertrend ATR Length
Supertrend Multiplier
Best Use Cases
Notes
Disclaimer
This script is provided for educational and analytical purposes only. It does not constitute financial or investment advice. Always perform your own analysis and manage risk appropriately before making trading decisions.
Instead of displaying the SMA and Supertrend directly on the price chart, this indicator plots the difference between the two values around a zero line, making it easier to identify trend strength, momentum shifts, and potential reversals.
How it works
The oscillator is calculated as:
Oscillator = SMA − Supertrend
Positive values indicate the SMA is above the Supertrend.
Negative values indicate the SMA is below the Supertrend.
The farther the oscillator moves away from zero, the greater the separation between the two indicators.
The histogram-style fill changes color automatically based on whether the oscillator is above or below the zero line.
Interpretation
Bullish Momentum
- Oscillator is above zero.
- Green color.
- SMA is positioned above the Supertrend.
- Suggests bullish market structure.
Bearish Momentum
- Oscillator is below zero.
- Red color.
- SMA is positioned below the Supertrend.
- Suggests bearish market structure.
Zero Line Cross
A cross above or below zero may indicate that the relationship between the SMA and Supertrend has changed.
Many traders use these transitions as an additional confirmation alongside their existing trading strategy.
Inputs
SMA Length
- Period used for the Simple Moving Average.
Supertrend ATR Length
- ATR period used in the Supertrend calculation.
Supertrend Multiplier
- Controls the sensitivity of the Supertrend.
- Lower values react faster.
- Higher values reduce noise but react more slowly.
Best Use Cases
- Trend confirmation
- Momentum analysis
- Identifying trend transitions
- Multi-timeframe confirmation
- Swing trading
- Intraday trend filtering
Notes
- This indicator is based on the built-in TradingView Supertrend function.
- It is designed as a momentum and trend-strength visualization.
- It should not be used as a standalone buy or sell signal.
- Consider combining it with price action, volume analysis, support/resistance, or other confirmation tools.
Disclaimer
This script is provided for educational and analytical purposes only. It does not constitute financial or investment advice. Always perform your own analysis and manage risk appropriately before making trading decisions.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Unlock powerful tools & indicators → pointalgo.com
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Unlock powerful tools & indicators → pointalgo.com
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.