Strategy · Pine Script v4 · On the chart

Bottom Catch Strategy

by hasnocool· code credited to footlz

This strategy attempts to capture temporary market dips by identifying high-volume spikes during oversold conditions.

View on GitHub

GitHub stars106on the repository
Pine versionv4older, still runs
Lines of code30
Settings5inputs
LicenceGPL-3.0
Last update2 years ago18 Sep 2024

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

30 lines of Pine Script v4 from Bottom catch strategy.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.

Bottom catch strategy.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © footlz
//@version=4
strategy("Bottom catch strategy", overlay=true)
v_len = input(20, title="Volume SMA Length")
mult = input(2)
rsi_len = input(20, title="RSI Length")
oversold = input(30, title="Oversold")
close_time = input(10, title="Close After")
v = volume
basis = sma(v, v_len)
dev = mult * stdev(v, v_len)
upper_volume = basis + dev
rsi = rsi(close, rsi_len)
long = v > upper_volume and rsi < oversold
strategy.entry("Long", true, when=long)
passed_time = 0.0
if strategy.position_size != 0
    passed_time := 1
else
    passed_time := 0
if strategy.position_size != 0 and strategy.position_size[1] != 0
    passed_time := passed_time[1] + 1
if passed_time >= close_time
    strategy.close_all()
// If want to enable plot, change overlay=false.
v_color = close >= close[1] ? color.new(#3eb370, 0) : color.new(#e9546b, 0)
// plot(v, title="volume", color=v_color, style=plot.style_columns)
// plot(upper_volume, title="Threshold", color=color.aqua)
Expand (40 lines)

Overview

Bottom Catch Strategy enters a long position when volume exceeds a upper standard deviation channel based on its simple moving average while the RSI remains below a configured oversold limit. Trade exits are strictly time-based, automatically closing open positions after a set number of bars pass. It contains no traditional price-based stop loss or profit target exit rules.

Details

Published by

hasnocool on GitHub

Code credit

footlz, as written in the script's header

Type

Strategy, Pine Script v4

Draws

On the price chart

Category

Oscillators & momentum, Volume, Mean reversion

Markets

Crypto

Timeframes

M1-M5, M15-H1

Risk Notes

  • The strategy enters trades without a stop loss

Topics

analysisbtcusdtcryptocurrencydatapandaspythonsimulationtradingtradingview

Settings

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

SettingTypeDefaultVariable
Volume SMA Lengthint20v_len
multint2mult
RSI Lengthint20rsi_len
Oversoldint30oversold
Close Afterint10close_time
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

330 stars

Alert BB + RSI [Alorse] is a multi-symbol mean-reversion strategy designed for cryptocurrency trading. It evaluates Bollinger Bands and the Relative Strength Index (RSI) across up to 20 user-defined ticker symbols simultaneously. The strategy enters long posit

Strategy v4 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Alert BB + RSI [Alorse]
285 stars

Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish

Strategy v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Strategy
105 stars

This overlay strategy looks for gold scalps from break of structure and change of character. It enters long when a bullish break, a bullish character change, and an optional volume filter align, and short on the opposite set. Optional RSI levels can block trad

Strategy v6 SMC / ICT / price actionOscillators & momentum Repaints
104 stars

This strategy combines Bollinger Bands with a short RSI to fade moves that leave the bands and then return. A long requires the prior bar below the lower band and oversold, then a close back inside the band while RSI is between 30 and 50. Shorts mirror that at

Strategy v5 Oscillators & momentumVolatility & bands
Updated 3 years ago · MIT GitHub repository of Bollinger Bands and RSI Strategy
53 stars

This strategy implements Larry Connors' 2-period RSI mean-reversion algorithm overlaid on the price chart. It filters trades using a long-term Simple Moving Average (SMA), entering long positions when the price trades above the SMA and the short-term RSI drops

Strategy v6 Oscillators & momentumMean reversion
Updated 2 months ago · MPL-2.0 GitHub repository of Larry Connors 2-Period RSI Strategy

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