ZenAndTheArtOfTrading

RSI Swing Signal

This indicator is a tool designed to be used with Steven Hart's RSI Exhaustion strategy. For more information google TheTradingChannel or look him up on YouTube :)

The default RSI settings for this strategy are:

RSI Overbought: 80
RSI Oversold: 20
Length: 7

When the RSI gets above 80, the line will turn red and the script will begin looking for a specific type of engulfing candle to go short. The same is true when the RSI gets below 20, but the line will turn green and look for longs. It is best used as a back-testing aid, but it can also be used to send emails or SMS alerts whenever the conditions are met. It can also be used as an alternative colored RSI indicator by removing the signals in the settings menu and changing the RSI parameters to whatever you normally use. This can aid in RSI divergence and overbought/sold strategies.

Entries:

The bright green and bright red lines represent the first type of engulfing candle.
The dark green and red lines represent the second type of engulfing candle.

Some pairs perform best with only one of these entries, while others work fine with both.

This is a counter-trend or consolidation strategy, and is best used in combination with trend-continuation or trend-following strategies. As always, make sure you back-test it before you use it to trade as it works better on some pairs than others.
Sürüm Notları: Fixed script picking up some invalid engulfing candles.
Sürüm Notları: Added alert functionality.
Sürüm Notları: Added strategy back-testing results.
Sürüm Notları: Here is a companion indicator I made for this oscillator which plots your entry, SL and TP to the chart:

CLICK HERE TO SEE COMPANION INDICATOR
Sürüm Notları: Minor improvements.
Sürüm Notları: Minor improvements
Sürüm Notları: Minor improvements
Sürüm Notları: Updated to Pine Script version 4
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu komut dosyasının yazarı açık kaynak olarak yayınladı, böylece yatırımcılar bunu anlayabilir ve doğrulayabilir. Yazara tebrikler! Ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları tarafından belirlenmektedir. Bir grafikte kullanmak için favorilerinize ekleyebilirsiniz.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?
If you want to master Pine Script coding, watch my free YouTube lessons or get the source code to my scripts then check out my Pine Script Mastery Course website: https://www.pinescriptmastery.com

Yorumlar

any way to create alerts based on this?
+2 Cevap Gönder
@FlyAngler, Yes :) if you click the Add Alert button and select the script name (RSI Swing Signal) in the condition box, you will get alerts whenever a long or short signal is detected :) hope you enjoy using the script!
Cevap Gönder
Hello do you have a list of pairs where it works better? thank you so much for sharing the indicator
+2 Cevap Gönder
Amazing! Absolutely Amazing.
Cevap Gönder
One of the best and great indicator on tradingview.....
use following setting for best result

Lookback : 7
RSI Overbought Level : 60
RSI Oversold Level : 30
RSI Length : 7
RSI Source : Close

Enjoy
Cevap Gönder
How to backtest this strategy
Cevap Gönder
ZenAndTheArtOfTrading indrajitkaman244
@indrajitkaman244, here's a youtube video I made explaining the backtesting process: https://youtu.be/W_EECZtRBE8
+3 Cevap Gönder
@ZenAndTheArtOfTrading so to turn this into a strategy this should work or am I missing something?

////////////////////////////LONG + SHORT FILTER//////////////////////////////////////////

// STEP 1 - LONG - SHORT
// Make input option to configure trade direction
tradeDirection = input(title="Trade Direction", type=string,
options=, defval="Long")

// STEP 2 - LONG / SHORT
// Translate input into trading conditions
longOK = (tradeDirection == "Long") or (tradeDirection == "Both")
shortOK = (tradeDirection == "Short") or (tradeDirection == "Both")

//////////////////////////////////////////// ENTRY AND EXIT ORDERS ///////////////////////////////////////////////

// Step 6) Submit entry orders
if ( buysignal1 and validLong and longOK)
strategy.entry(id="buysignal1", long=true, qty=longEntrySize)

if (buysignal2 and validLong and longOK)
strategy.entry(id="buysignal2", long=true, qty=longEntrySize)

if (sellsignal1 and validShort and shortOK )
strategy.entry(id="sellsignal1", long=false, qty=shortEntrySize)

if (sellsignal2 and validShort and shortOK)
strategy.entry(id="sellsignal2 ", long=false, qty=shortEntrySize)

// Step 7) Submit exit orders
if (strategy.position_size > 0)
strategy.exit(id="XL", from_entry="buysignal1", stop=tradeStopPrice, limit=tradeTargetPrice)

if (strategy.position_size > 0)
strategy.exit(id="XL", from_entry="buysignal2", stop=tradeStopPrice, limit=tradeTargetPrice)

if (strategy.position_size > 0)
strategy.exit(id="XL", from_entry="buysignal1", stop=tradeStopPrice, limit=tradeTargetPrice)

if (strategy.position_size > 0)
strategy.exit(id="XL", from_entry="buysignal2", stop=tradeStopPrice, limit=tradeTargetPrice)
Cevap Gönder
does this repaint?
Cevap Gönder
@alechi91, Hi! Yes unfortunately all pine script indicators that calculate their values based on closing prices repaint. This is only an issue if you trade based on tick data instead of candle close data. All my scripts are intended to be traded systematically and rules-based so this shouldn't be an issue. Here's an article explaining how repainting affects indicators and what to look out for: https://backtest-rookies.com/2017/11/29/tradingview-indicator-repainting/

I've personally never had an issue with repainting except for when I've tried to create indicators that rely on other timeframe data. Let me know if you run into any issues and I'll look into it :)
+2 Cevap Gönder
Ana Sayfa Hisse Senedi Takipçisi Forex Takipçisi Kripto Takipçisi Ekonomik Takvim Hakkında Grafik Özellikleri Ücretlendirme Tanıdık yönlendirme Kurallarımız Destek Merkezi Web Sitesi & Aracı Kurum Çözümleri Görsel Bileşenler(Widget) Grafik Çözümleri Hafif Grafik Kitaplığı Blog ve Haberler Twitter