OPEN-SOURCE SCRIPT

SMAST Oscillator [point algo]

402
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
  • 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.

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.