OPEN-SOURCE SCRIPT

SuperTrend Oscillator [LuxAlgo]

This oscillator is made of three components, all derived from the SuperTrend indicator. This approach allows the user to easily determine overbought/sold zones, identify whether a retracement is present or if the price is ranging or trending. It also allows for the anticipation of the potential price cross with the SuperTrend.

We provide additional information including whether a signal returned by the SuperTrend was false, as well as the percentage of false signals.

Settings

  • Length: Period of the "average true range" used in the calculation of the SuperTrend
  • Mult: Multiplicative factor for the "average true range"
  • Smooth: Determines the degree of smoothing of the histogram


Misc:
  • Fixed Transparency: Use a fixed transparency for the main oscillator
  • Show Lines: Show the lines displayed by the indicator
  • Show Labels: Show the labels displayed by the indicator


Usage

The indicator is in a range of (-100,100) with values closer to 100/-100 indicating a stronger trend. The main oscillator value above 0 indicates that the price is above the SuperTrend.

It is possible to identify when a retracement is present in a trend. This is often indicated by an oscillator value moving within 50/-50.

快照

Each overbought/oversold level can be used to determine potential exit points.

The indicator also includes two additional oscillators derived from the main oscillator. A smoothed version of the main oscillator (Signal), and a smoothed version of the difference between the Main and Signal oscillators (Histogram), thus making the oscillator part of the indicator more similar to MACD.

One can use the histogram to anticipate when the price might cross the SuperTrend by comparing the sign between the main and histogram. Potential false signals can also be filtered with this method.

快照

Certain crosses between the price and SuperTrend can be filtered out when the histogram and main oscillator have a different sign (here main = 1, histogram = -1).

We include various indications in order to analyze the signals returned by the SuperTrend. The indicator displays symbols indicating whether a signal was false or not.

快照

A cross symbol will be displayed at the top of the displayed lines when the previous Buy signal was false, else a checkmark is displayed. Symbols displayed at the bottom of the lines are referring to sell signals. We also provide a percentage of false signals, calculated over the entire chart history.

快照

Details

The scaling method used is similar to max-min normalization. We first compute the difference between the price and SuperTrend and divide the result by the difference between the upper and lower extremity used to compute the SuperTrend. Values higher than (1,-1) can occur when price crosses the SuperTrend and as such we use the max and min functions to attenuate these.

The filter used to compute the signal line is based on exponential averaging and is fully adaptive. The smoothing factor used for its computation is the squared value of the main oscillator, divided by length. Since higher values of the oscillator are associated with trending markets, the filter will be closer to the main oscillator when the market is ranging.
版本注释
Minor changes.
buyLUXluxalgoMoving AveragesOscillatorsoverboughtoversoldSELLsignalssupertrendtrendTrend Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
更多:

免责声明