RSI Swing Signal Indicator


This is a back-testing and live-trading tool I created for a simple price action strategy created by my mentor, Steven Hart (creator of TheTradingChannel).

The base indicator is essentially just an enhanced RSI oscillator, but it comes with a companion script that also draws signals, stops & targets directly to your chart.

With TradingView your scripts can only draw either to your chart or to an oscillator box, so I had to create two separate indicators to get the best testing and trading experience out of this script.

How It Works

When the RSI gets above 80, the script will begin looking for bearish engulfing candles.

When the RSI gets below 20, the script will begin looking for bullish engulfing candles.

This is essentially a counter-trend or mean-reversion strategy. The concept behind it is simple. We are looking for price to get into an over-extended state (aka. “overbought” or “oversold”, although I find those terms to be misleading in Forex).

Once price is over-extended, then we want to wait for a sign that price is ready to mean-revert or reverse. There are other candlestick patterns that you can use to enter this type of strategy, but I find swing high/low engulfing candles to be very effective. And the bigger the rejection wick the better.

Settings (Oscillator)

Lookback:
This sets how far the script will search back for swing highs/lows.

RSI Overbought Level:
This sets the overbought threshold.

RSI Oversold Level:
This sets the oversold threshold.

RSI Length:
This changes the calculation period of the RSI.

RSI Source:
This changes the source of the RSI calculation (ie. high, low, close).

Draw Signals?
This draws colored signals over the oscillator whenever a valid setup occurs.

Draw Signals On Candles Yet to Close?
If you disable this, the script will not draw signals on the current candle until it closes.

Settings (Chart)

Stop Loss Size (X ATR):
This sets your stop loss size/distance based on an ATR multiplier.

Reward to Risk Ratio (Stop Loss x ?):
This sets your take profit ratio compared to your stop loss. Leaving this at 1 draws signals with a 1:1 RR.

Show B/E Point?
If this is enabled, the script will draw a line to represent a break-even point (optional – useful for risk management of large RR strategies).

Reward To Risk Ratio (B/E):
This sets where your break-even point is drawn. For example, 0.5 would set it half way between your 1:1 take profit and your entry price.

Lookback:
This sets how far back the script will look for swing highs and lows.

RSI Overbought Level:
This sets the RSI overbought threshold.

RSI Oversold Level:
This sets the RSI oversold threshold.

RSI Length:
This changes the RSI calculation period.

RSI Source:
This changes the source of the RSI calculation.

Draw Signals?
If this is disabled the script will not draw signals to your chart.

Draw Signals On Candles Yet to Close?
If this is disabled the script will not draw signals on the current candle until it closes.

Source Code (Oscillator)

Source Code (Chart)

Last Updated: 21st March, 2019


TradingView Charting Platform

Leave a Comment, Question or Suggestion