NomadandTrader

SuperTrend ATR + RSI

SuperTrend ATR + RSI
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?
//Crée par J.Dow
//SuperTrend ATR, Le type ATR calcule la volatilité à partir de l'Average True Range (ATR), il est idéal pour le FOREX
// Le RSI et idéal pour voir la force d'un mouvement
study(title = "SuperTrend ATR + RSI", shorttitle = "SuperTrend ATR + RSI", overlay = true)

//Mode
Factor=input(title="Super Trend", defval=3, minval=1,maxval = 100)
ATR=input(title="ATR", defval=7, minval=1,maxval = 100)
RSI = input(title="RSI", defval=7, minval=1, maxval = 100)

//Super Trend ATR
Up=hl2-(Factor*atr(ATR))
Dn=hl2+(Factor*atr(ATR))

TUp=close[1]>TUp[1]? max(Up,TUp[1]) : Up
TDown=close[1]<TDown[1]? min(Dn,TDown[1]) : Dn

Trend = close > TDown[1] ? 1: close< TUp[1]? -1: nz(Trend[1],1)
Tsl = Trend==1? TUp: TDown

linecolor = Trend == 1 ? green : red

//RSI
src = close,

ep = 2 * RSI - 1
auc = ema( max( src - src[1], 0 ), ep )
adc = ema( max( src[1] - src, 0 ), ep )
x1 = (RSI - 1) * ( adc * 70 / (100-70) - auc)
ub = iff( x1 >= 0, src + x1, src + x1 * (100-70)/70 )
x2 = (RSI - 1) * ( adc * 30 / (100-30) - auc)
lb = iff( x2 >= 0, src + x2, src + x2 * (100-30)/30 )

//Affichage
plot(avg(ub, lb), color=purple, style = line, linewidth=1, title="RSI")
plot(Tsl, color = linecolor , style = line , linewidth = 1,title = "SuperTrend ATR")

Kommentarer

Pls how can I use it ?
+52 Svara
ajmzfx vaicru
@vaicru, vaicru, Hi, where you able to apply it ?
+8 Svara
vaicru ajmzfx
@ajmzfx, boh
+4 Svara
ajmzfx vaicru
@vaicru, ..?? I liked the idea, but just didnt make sense how he made wedges on a dtf.
Svara
ajmzfx ajmzfx
@ajmzfx, well, he did wedges on the other ATR indicator he posted, but still, Im trying to make sense of how to apply it..
+1 Svara
vaicru ajmzfx
@ajmzfx, @ajmzfx, Tradingview admin, scripts have to be published with istruction !
+2 Svara
ajmzfx vaicru
@vaicru, Higher then forecast % !!
Svara
ajmzfx ajmzfx
@ajmzfx, ...sorry, I sent to wrong person
+1 Svara
Can you add an alert to this indicator so that you can set it on TV where it goes green, a buy alert is indicated and when it goes red, a sell alert is indicated?
+19 Svara
@mgoblue, does it really take a genuis to set an alert for when 1 line crosses another? gosh
+3 Svara
Hem Aktie-screener Forex-screener Krypto-screener Ekonomisk kalender Hur det fungerar Diagramfunktioner Priser Tipsa en vän Ordningsregler Hjälpcenter Webbsidor och mäklarlösningar Widgets Diagramlösningar Lightweight Charting Library Blogg och nyheter Twitter
Profil Profilinställningar Konto och fakturering Hänvisade vänner Mynt Mina kölappar Hjälpcenter Privata meddelanden Chatt Logga ut