Strategy · Pine Script v6 · On the chart

BTC RSI Momentum v20

by Dnayaka

A Pine v6 strategy for 15-minute Bitcoin perpetual charts that trades RSI momentum breakouts.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code351
Settings35inputs
LicenceNone stated
Last update4 months ago1 Jul 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

BTC RSI Momentum v20 enters long or short when RSI pushes through set levels plus a gap, with optional candle color, EMA 200 trend, ATR range and body-size filters, and a pullback re-entry option. Exits use a percent stop loss, a take profit that changes with volatility, an optional wider stop around major macro-event hours and an ATR trailing stop. A cooldown spaces trades. The code comments are in Indonesian and the README lists limitations.

Details

Published by

Dnayaka on GitHub

Type

Strategy, Pine Script v6

Draws

On the price chart

Category

Oscillators & momentum, Trend, Breakout

Markets

Crypto

Timeframes

M15-H1

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

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

SettingTypeDefaultVariable
OB Level (breakout long)float79.0ob_level
OS Level (breakout short)float23.0os_level
Gap (RSI pts beyond level)float3.0gap
RSI Periodint14rsi_len
Candle color confirmationbooltrueuse_candle
Use EMA200 filterbooltrueuse_ema
EMA200 buffer %float0.20ema_buf
Max ATR% (ceiling)float1.0max_atr
Min ATR% (floor)float0.2atr_floor
Min body ratiofloat0.3body_min
Min LONG distance above EMA200 % (base only)float1.5long_emadist
Stop Loss % (TETAP — jangan diubah)float1.9sl_pct
Show all 35 settings
SettingTypeDefaultVariable
Cooldown barsint6cooldown
Pakai sleeve pullback-continuation (OFF = v18/v17)booltrueuse_pullback
Watch window W (bar setelah breakout)int28pb_window
Kedalaman pullback minimal % (retrace off peak)float1.0pb_depth
Pakai TP kondisional-rezim (v20 default ON; OFF = v19 flat TP2.0)booltrueuse_regimeTP
Mode TP rezimstringGentle 2-bucket (forward-terbaik)tp_mode
TP base (vol rendah)float2.0tp_base
TP mid (vol menengah, 3-bucket)float2.5tp_mid
TP high (vol tinggi, 3-bucket)float2.8tp_hi
TP gentle (vol di atas wall1, 2-bucket) — v20 dd-preservingfloat2.15tp_gentle
Wall-1 ATR% (low->mid)float0.40wall1
Wall-2 ATR% (mid->high, 3-bucket)float0.58wall2
Lebarkan SL saat jam FOMC/NFP (kurangi snapback-SL palsu)booltrueuse_macro_sl
Pengali SL saat macro-eventfloat1.3macro_mult
Jam SEBELUM event (mulai window)int2macro_before
Jam SESUDAH event (selesai window)int3macro_after
Use trailing stopbooltrueuse_trail
Trail ATR multiplierfloat2.0trail_mult
Trail min %float0.5trail_min
Trail max %float2.0trail_max
Trail activation %float2.5trail_act
Garis & zona TP/SLbooltrueshow_zones
Panah masuk (base + pullback)booltrueshow_arrows
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

53 stars

This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

ADA4H Optuna Strategy

by skywalker0803r
42 stars

This strategy trades longs and shorts on the price chart. Long entries require a close above the prior Donchian high, a close above a long-term SMA, and RSI above a threshold, with size set as a percentage of equity. Long exits use a stop at the prior Donchian

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of ADA4H Optuna Strategy
16 stars

This strategy trades Donchian channel breakouts on the price chart and exits on a shorter Donchian channel. It sizes each unit from a percentage of equity and an ATR-based initial stop, then adds units as price moves a set ATR distance, up to a maximum unit co

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 16: Anti-Chop Filters
7 stars

This strategy plots dynamic pivot-based support and resistance trendlines on the price chart and trades breakouts beyond those lines. By default it allows longs only when EMA 50 is above EMA 200 and an RSI-SMA momentum filter is met, with an ATR entry buffer.

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Easy Trendline - XAUUSD 30m

Edge 59

by subos2008
6 stars

Edge 59 is a price-chart strategy that combines an ADX directional filter, a weighted moving average, and a trend-follower channel. The channel uses an exponential moving average of close, optionally smoothed by linear regression, and a percentage of a fixed 2

Strategy v5 TrendOscillators & momentum Repaints
Updated 2 years ago · Custom licence GitHub repository of Edge 59

AG Momentum Breakout

by eltonaguiar
4 stars

AG Momentum Breakout is a strategy that identifies continuation signals after pullbacks in trending markets. It filters for uptrends using EMAs and detects recent pullbacks via RSI conditions before entering on RSI crossovers above 50 with ADX confirmation. Th

Strategy v6 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of AG Momentum Breakout

More strategys

Trade Your Charts With a Regulated Broker

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

Compare brokers