Strategy · Pine Script v4 · Own pane

RSI powerzone

by kat3samsin

The RSI powerzone strategy plots the 4-period RSI in a separate pane along with horizontal levels at 30 and 55.

View on GitHub

GitHub stars2on the repository
Pine versionv4older, still runs
Lines of code31
Settings3inputs
LicenceMIT
Last update5 years ago17 Mar 2021

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

31 lines of Pine Script v4 from scripts/rsipowerzone.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

rsipowerzone.pine
//@version=4
//Author: https://github.com/kat3samsin

strategy("RSI powerzone", overlay=false, process_orders_on_close=true)

// Conditions:
// Uptrend: close > 50sma and 50sma > 100sma > 200sma
// Entry: RSI(4) <= 30
// Exit: RSI(4) >= 55

longSMA = sma(close, 200)  // 200-day moving average
closeSMA = sma(close, 20)

// entry/exit
RSIEntry = input(30, "RSI Entry")
RSIExit = input(55, "RSI Exit")
RSILength = input(4, "RSI Length")

// testPeriod() =>
//     time >= testPeriodStart and time <= testPeriodStop ? true : false

_rsi = rsi(close, RSILength)  // relative strength indicator with custom length
uptrend = close > sma(close, 50) and sma(close, 50) > sma(close, 100) and sma(close, 100) > sma(close, 200)


strategy.entry("RSI", strategy.long, 100, when=uptrend and _rsi <= RSIEntry)
strategy.close("RSI", when=_rsi <= RSIExit)
    
plot(_rsi, color=color.red, linewidth=1)
plot(30, color=color.gray)
plot(55, color=color.gray)

Overview

RSI powerzone identifies an uptrend using a series of simple moving averages on the close price. The strategy enters long positions when the uptrend condition is met and the RSI is at or below the entry threshold of 30. Positions are closed when the RSI is at or below the exit threshold of 55. The main inputs allow adjustment of the RSI entry and exit values as well as the length of the RSI calculation. It draws in a separate pane and does not include a stop loss by default.

Details

Published by

kat3samsin on GitHub

Type

Strategy, Pine Script v4

Draws

Separate pane below the chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • The strategy enters trades without a stop loss

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
RSI Entryint30RSIEntry
RSI Exitint55RSIExit
RSI Lengthint4RSILength
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

This strategy overlays the price chart and looks for VWAP pullbacks. It goes long when a short SMA crosses above VWAP after RSI has been oversold within ten bars, and short on the opposite cross after RSI has been overbought. Optional Minervini-style moving-av

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced VWAP-Momentum Pullback Trend Qualifier

This strategy trades 1-minute futures contracts on Binance. It plots pivot high and low resistance and support levels on the price chart, along with an EMA and a custom Cto indicator. Long and short entries trigger on EMA and Cto crossovers combined with price

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Binancash Futures Strategy 1M Candles

Optimizer v1

by QuantGeekDev
7 stars

This strategy generates long signals on the price chart using multiple technical indicators. It computes EMA 70 and 100, SMA 70, ADX with DMI, CCI, and MACD values. A long entry occurs when EMA crossover condition, SMA condition, ADX above 15, CCI above 30, an

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Optimizer v1

This strategy combines MACD momentum signals with support and resistance levels from pivot points and an EMA100 trend filter for long positions. It plots the 100-period EMA on the price chart and signals when price breaks above the EMA or forms bullish pivot p

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of MACD + Support / Resistance Long Strategy

This overlay strategy combines swing price structure with MACD structure and two higher-timeframe exponential moving averages. It finds pivot highs and lows over ten bars, labels higher highs, lower highs, higher lows and lower lows, and builds matching states

Strategy v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Price Action Candles with MACD Signals Strategy

More Oscillators & momentum scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers