Standardized SuperTrend Oscillator

EliCobra 업데이트됨   

The Standardized SuperTrend Oscillator (SSO) is a versatile tool that transforms the SuperTrend indicator into an oscillator, offering both trend-following and mean reversion capabilities. It provides deeper insights into trends by standardizing the SuperTrend with respect to its upper and lower bounds, allowing traders to identify potential reversals and contrarian signals.

Lets begin with describing the SuperTrend indicator, which is the fundamental tool this script is based on.

The SuperTrend is calculated based on the average true range (ATR) and multiplier. It identifies the trend direction by placing a line above or below the price. In an uptrend, the line is below the price; in a downtrend, it's above the price.

pine_st(float src = hl2, float factor = 3., simple int len = 10) =>
    float atr = ta.atr(len)
    float up  = src + factor * atr
    up       := up < nz(up[1]) or close[1] > nz(up[1]) ? up : nz(up[1])
    float lo  = src - factor * atr
    lo       := lo > nz(lo[1]) or close[1] < nz(lo[1]) ? lo : nz(lo[1])

    int   dir = na
    float st  = na

    if na(atr[1])
        dir := 1
    else if st[1] == nz(up[1])
        dir := close > up ? -1 : 1
        dir := close < lo ? 1 : -1

    st := dir == -1 ? lo : up

    [st, dir]

SSO Oscillator:
The SSO is derived from the SuperTrend and the source price. It calculates the standardized difference between the SuperTrend and the source price. The standardization is achieved by dividing this difference by the distance between the upper and lower bounds of the SuperTrend.

float sso = (src - st) / (up - lo)

Components and Features:
  1. SuperTrend of Oscillator - An additional SuperTrend based on the direction and volatility of the oscillator, behaving as the SuperTrend OF the SuperTrend. This provides further trend analysis of the underlying broad trend regime.

  2. Reversion Tracer - The RSI of the direction of the original SuperTrend, providing a dynamic threshold for premium and discount price areas.
    float rvt = ta.rsi(dir, len)

  3. Heikin Ashi Transform - An option to apply the Heikin Ashi transform to the source price of the oscillator, providing a smoother visual representation of trends.

  4. Display Modes - Choose between Line mode for a standard oscillator view or Candle mode, displaying the oscillator as Heikin Ashi candles for more in-depth trend analysis.

Contrarian and Reversion Signals:
  • Contrarian Signals - Based on the SuperTrend of the oscillator, these signals can act as potential buy or sell indications, highlighting potential trend exhaustion or premature reversals.

  • Reversion Signals - Generated when the oscillator crosses above or below the Reversion Tracer, signaling potential mean reversion opportunities or trend breakouts.

Utility and Use Cases:
  1. Trend Analysis - Utilize the SSO as a trend-following tool with the added benefits of the oscillator's SuperTrend and Heikin Ashi transform.

  2. Valuation Analysis - Leverage the oscillator's reversion signals for identifying potential mean reversion opportunities in the market.

The Standardized SuperTrend Oscillator enhances the capabilities of the SuperTrend indicator, offering a balanced approach to both trend-following and mean reversion strategies. Its customizable options and contrarian signals make it a valuable instrument for traders seeking comprehensive trend analysis and potential reversal signals.
릴리즈 노트:
Improved mothodology
릴리즈 노트:
Added alerts, tweaked code.
릴리즈 노트:
Added option for any alert call.

오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.


이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?