Strategy · Pine Script v4 · Own pane

Alpy Kazan

by avatar-lavventura

This strategy tracks market direction using an ATR-based trailing envelope similar to Supertrend, combined with Bollinger Bands, Keltner Channels, and momentum filters.

View on GitHub

GitHub stars2on the repository
Pine versionv4older, still runs
Lines of code162
Settings29inputs
LicenceNone stated
Last update7 months ago5 Mar 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

Long and short entry signals trigger on trend direction shifts within a specified backtest date window. Trades are managed with a built-in trailing stop loss. Visual elements include plotted trend lines, background highlighters, and buy or sell signal markers drawn in a separate pane.

Details

Published by

avatar-lavventura on GitHub

Type

Strategy, Pine Script v4

Draws

Separate pane below the chart

Category

Trend, Volatility & bands, Oscillators & momentum

Markets

Crypto

Timeframes

Any timeframe

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
ATR Periodint15Periods
Sourcesourcehlc3src
ATR Multiplierfloat4.0Multiplier
Change ATR Calculation Method ?booltruechangeATR
Show Buy/Sell Signals ?boolfalseshowsignals
Highlighter On/Off ?booltruehighlighting
Bar Coloring On/Off ?booltruebarcoloring
From Monthint3FromMonth
From Dayint1FromDay
From Yearint2021FromYear
To Monthint1ToMonth
To Dayint1ToDay
Show all 29 settings
SettingTypeDefaultVariable
To Yearint9999ToYear
BB Lengthint14length
BB MultFactorfloat2.0mult
KC Lengthint17lengthKC
KC MultFactorfloat1.5mult_kc
Filter for Momenutum valueboolfalseuseMomAverage
Min for momentumint20MomentumMin
n1int4n1
n2int21n2
Length Fast RSIint5len_fast
Length Slow RSIint14len_slow
Over Bought Level 1int70obLevel1
Over Bought Level 2int53obLevel2
Over Sold Level 1int-70osLevel1
Over Sold Level 2int-53osLevel2
Trailing Stop Lossint5000inpTrailStop
Trailing Stop Loss Offsetint0inpTrailOffset
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

106 stars

This strategy captures strong bullish momentum by combining a 200-period SMA baseline, a custom Bollinger Band, the True Strength Index (TSI) smoothed with WMAs, and the ADX trend strength indicator. It initiates long positions when price is above the 200 SMA,

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ADX_TSI_Bol Band Trend Chaser

EMA Ribbon MACD

by iamrichardD
57 stars

This strategy combines an EMA ribbon with MACD confirmation and plots in a separate pane. It enters when ribbon alignment, optional MACD zero or signal crosses, volume, smart-money, and multi-timeframe filters agree, then exits with percentage stop loss and ta

Strategy v6 TrendMoving averages
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon MACD

The WaveTrend v4 Strategy generates trading signals when the WaveTrend oscillator crosses at oversold or overbought levels. Long positions enter on bullish crosses in oversold territory, while short positions enter on bearish crosses in overbought territory. I

Strategy v6 Oscillators & momentumTrend Repaints
Updated yesterday · MIT GitHub repository of WaveTrend v4 [WavesUnchained] Strategy
6 stars

This strategy identifies high-volatility expansion bars by comparing the high-low range to a moving average plus standard deviation threshold. When range expansion occurs, it checks momentum over a specified lookback period. It opens a long position if the cur

Strategy v5 Volatility & bandsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TradersPost High-Low Range Strategy

Alt Coin BB SMA Strategy

by samliu0206
1 stars

Alt Coin BB SMA Strategy calculates custom MACD delta histogram values, Bollinger Bands, and middle band slopes to generate trading signals in a separate pane. It triggers long entry orders when the price crosses above the Bollinger middle band, provided the M

Strategy v4 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of Alt Coin BB SMA Strategy

Sentiment 2

by ggamer5555
1 stars

Sentiment 2 is a trend-following strategy that calculates a normalized composite market sentiment score ranging between 0 and 1. It combines exponential and Hull moving average slopes, high/low midpoints, Supertrend distances, and Parabolic SAR metrics. Plotte

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Sentiment 2

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