1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
81 lines of Pine Script v5 from mt5/indicators/pine/q_trend.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Q-Trend plots a colored trend line directly on the price chart, switching between bullish and bearish modes when price breaches the upper or lower volatility bounds. The script identifies standard and strong buy or sell signals, displaying them as labels or arrows. Users can customize the trend lookback period, ATR sensitivity, signal filtering modes, and optional source smoothing using an EMA.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Source
source
close
src
Trend period
int
200
p
ATR Period
int
14
atr_p
ATR Multiplier
float
1.0
mult
Signal mode
string
Type A
mode
Smooth source with EMA?
string
No
use_ema_smoother
EMA Smoother period
int
3
src_ema_period
Color bars?
bool
true
color_bars
Show trend line?
bool
true
show_tl
Signals to show
string
All
signals_view
Signal's shape
string
Labels
signals_shape
Buy colour
color
color.green
buy_col
Show all 13 settings
Setting
Type
Default
Variable
Sell colour
color
color.red
sell_col
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.
This indicator plots a Supertrend-based trend-following setup in a separate pane and skips conditions it treats as a sideways market. A volatility range is built from an ATR value, with RMA, SMA, EMA, or WMA smoothing, or from a fixed point distance. Optional
This indicator generates trade entry signals and target levels optimized for 1-hour timeframes, designed for external signal extraction. It calculates 7-period and 16-period EMAs alongside 10-period RSI and ATR filters. Long signals occur when the fast EMA cro
MultiIndicator combines multiple technical indicators into a single separate pane to save chart space. It calculates and displays market regime detection based on ordinary least squares regression, a Holt exponential smoothing crossover, normalized RSI, ADX, a
This indicator plots an oscillator in a separate pane. It builds several SuperTrend series across a user-defined factor range and step, using ATR as the band width. On each bar it measures the distance between the close and each SuperTrend output, then groups
The script plots the Choppiness Index in a separate pane. It sums true range over a lookback and compares that sum with the highest-high to lowest-low range, then scales the result from 0 to 100. Lower readings indicate a trending market and higher readings in
This indicator combines Chaikin Money Flow (CMF), a SuperTrend baseline, and an Average True Range (ATR) calculation inside a separate sub-pane. It calculates a standard 20-period CMF plotted as a line and colored histogram columns around a zero baseline, trac