SuperTrend Oscillator [LUX]

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.


  • 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

  • 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


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.


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.
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?
Get instant access to our premium indicators:

Full guides & documentation:

Join our Discord: