Indicator · Pine Script v5 · On the chart

TriexDev - SuperBuySellTrend (PLUS+)

by Triex

This indicator overlays trend-following Supertrend bands on the price chart using Average True Range calculations.

View on GitHub

Repaints

GitHub stars145on the repository
Pine versionv5runs as is
Lines of code491
Settings40inputs
LicenceCustom licence
Last update2 years ago14 Dec 2023

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 indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

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

TriexDev - SuperBuySellTrend (PLUS+) plots trailing stop lines, highlights active trend directions, and prints buy or sell shape labels when price closes across band thresholds. Inputs allow configuring the ATR period, calculation type, and dual multipliers, alongside toggling supplementary EMAs, Bollinger Bands, daily and weekly levels, and volume analysis. Higher-timeframe data references in the script introduce lookahead bias.

Details

Published by

Triex on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Trend, Volatility & bands, Moving averages, Support & resistance

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • Reads higher-timeframe data with lookahead on, so the history can show signals that were not there in real time

Topics

buysellsignalpinescriptpinescript-indicatorspinescript-strategiestradingview-pine-scriptstrend-detectiontrend-prediction

Settings

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

SettingTypeDefaultVariable
ATR Periodint10Periods
Sourcesourcehl2src
ATR Multiplier 1float0.8Multiplier1
ATR Multiplier 2float1.6Multiplier2
Change ATR Calculation Method ?booltruechangeATR
Show Buy/Sell Signals ?booltrueshowsignals
Highlighter On/Off ?booltruehighlighting
Toggle Bollinger BandsboolfalsetoggleBBon
Up/Down Volume AnalysisboolfalsetoggleVolumeOn
Pivotint-5pivot_offset_input
MA/HiLoint5label_offset_input
Override chart symbol?boolfalseoverridesym
Show all 40 settings
SettingTypeDefaultVariable
pvsra_symsymbolINDEX:BTCUSDpvsra_sym
Show EMAs?booltrueshowEmas
EMA Labels?boolfalselabelEmas
50colorcolor.rgb(31, 188, 211, 0)threeEmaColor
200colorcolor.rgb(255, 255, 255, 0)fourEmaColor
800colorcolor.rgb(50, 34, 144, 0)fiveEmaColor
EMA Cloudcolorcolor.rgb(155, 47, 174, 60)EmaCloudColor
Bordercolorcolor.rgb(18, 137, 123, 100)EmaCloudBorderColor
Show Hi/Lo: Daily?booltrueshowDayHighLow
Weekly?booltrueshowWeekHighLow
Show labels?booltrueshowDayHighLowLabels
Show: line ?booltrueshow_rectangle9
Label?booltrueshow_label9
Show historical daily opens?boolfalseshowallDly
Daily Open Colorcolorcolor.rgb(254, 234, 78, 0)sess9col
Show: Levels?booltrueshow_psylevels
Labels?booltrueshow_psylabel
Psy Hi Colorcolorcolor.new(color.orange, 30)psycolH
Psy Low Colorcolorcolor.new(color.orange, 30)psycolL
Climax Up Colorcolorcolor.limeCUColor
Climax Down Colorcolorcolor.redCDColor
Volume Rising Above Average Up Colorcolorcolor.blueAUColor
Volume Rising Above Average Down Colorcolorcolor.fuchsiaADColor
lengthBBint20lengthBB
SourcesourceclosesrcBB
StdDevfloat2.0multBB
Offsetint0Offset
Use custom timeframeboolfalseuseCustomTimeframeInput
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

MA Envelope (MAE)

by mihakralj
99 stars

The MA Envelope indicator calculates upper and lower channel bands shifted by a user-defined percentage around a baseline moving average. It supports Simple Moving Average, Exponential Moving Average, and Weighted Moving Average calculation types. The script p

Indicator v6 Moving averagesSupport & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of MA Envelope (MAE)

Trend Compass 4H

by chris-c-thomas
14 stars

Trend Compass 4H plots a multi-EMA ribbon (10/21/50) along with higher-timeframe reference levels on the price chart. It classifies trend phase into six states and calculates a composite weighted trend score. The script detects RSI and MACD divergences, analyz

Indicator v6 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Trend Compass 4H
10 stars

My Macro Cycle Indicator plots daily and weekly simple and exponential moving averages on the price chart, plus Pi Cycle and Mayer Multiple levels derived from the 200-day average. Optional toggles add support-band fills, a Keltner channel, CME futures gaps, a

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · None stated GitHub repository of My Macro Cycle Indicator

This indicator plots a double-smoothed Supertrend baseline on the price chart, combining a Supertrend midline with WMA and EMA smoothing to show trend direction. Direction uses an ATR-scaled baseline slope with hysteresis, while percentile-ranked slope magnitu

Indicator v6 TrendMoving averages
Updated yesterday · MIT GitHub repository of Smooth Trend Radar [WavesUnchained]

SRI Indicator ft. MSB

by kingmalitha
7 stars

This indicator overlays an all-in-one technical analysis toolkit on the price chart. It plots multiple moving averages, including standard EMAs, SMAs, and a Trend Regularity Adaptive Moving Average, alongside Bollinger Bands, Supertrend, Nadaraya-Watson envelo

Indicator v5 Moving averagesTrend Repaints
Updated 3 years ago · None stated GitHub repository of SRI Indicator ft. MSB

VOIDRLM

by voidrlm
6 stars

The script VOIDRLM combines multiple technical analysis tools into a single overlay indicator on the price chart. It calculates multi-timeframe pivot points, volume-weighted average price (VWAP), customizable moving averages, moving average clouds, supply and

Indicator v5 TrendMoving averages Repaints
Updated 3 years ago · None stated GitHub repository of VOIDRLM

More indicators

Trade Your Charts With a Regulated Broker

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

Compare brokers