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
218 lines of Pine Script v5 from trash/archive_test_files/hamaCandel.txt, published under Apache-2.0. Keep the author's credit and licence lines when you reuse it.
NSDT HAMA Candles with Bollinger Bands builds each candle from separate moving averages of open, high, low and close, using selectable EMA, SMA or WMA lengths. A simple moving average forms the band basis, and an optional moving average is colored by a gradient as it rises or falls against a short exponential average. Lengths, multipliers, colors and gradient steps are adjustable. It does not generate trade entries, exits or stop levels.
Bollinger Bands with adjustable length and multiplier
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
布林带周期
int
400
bb_length
布林带标准差倍数
float
2.0
bb_mult
Bull Color
color
color.rgb(0, 255, 0)
bull
Bear Color
color
color.rgb(255, 0, 0)
bear
Neutral Color
color
color.rgb(255, 255, 0, 0)
neutral
显示MA线
bool
true
show_ma
MA类型
string
WMA
ma_type
MA源数据
source
close
ma_source
MA长度
int
100
ma_length
使用渐变颜色
bool
true
UseGradient
最大渐变步数
int
5
stepn
Wick Color
color
color.rgb(80, 80, 80, 100)
WickColor
Show all 20 settings
Setting
Type
Default
Variable
开盘价长度
int
45
OpenLength
开盘价类型
string
EMA
OpenType
最高价长度
int
20
HighLength
最高价类型
string
EMA
HighType
最低价长度
int
20
LowLength
最低价类型
string
EMA
LowType
收盘价长度
int
40
CloseLength
收盘价类型
string
WMA
CloseType
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.
Calculates adaptive arithmetic candles by blending price data with Kaufman Efficiency Ratio smoothing and a linear regression anchor. It measures trend health using a zero-to-hundred Quality Score derived from market efficiency, regression slope, and normalize
This indicator plots standard Bollinger Bands and three configurable moving averages directly on the price chart. Users can toggle the Bollinger Bands, adjust their length and multiplier, and choose between exponential or simple moving averages for fast, slow,
This indicator plots four customizable moving averages directly on the main price chart using default lengths of 3, 8, 21, and 50 periods. It fills the space between adjacent averages in green or maroon depending on trend alignment. Additionally, it computes B
This indicator plots three exponential moving averages and ATR volatility envelopes on the price chart. It compares the fast and slow EMAs to shade a trend ribbon and marks confirmed upward and downward crossovers with triangle labels. Settings change the thre
This indicator modifies standard Bollinger Bands to measure directional trend force based on line alignment. It calculates a simple moving average basis along with upper and lower volatility bands. When all three lines move upward or downward simultaneously, i
This indicator overlays trend-following Supertrend bands on the price chart using Average True Range calculations. It plots trailing stop lines, highlights active trend directions, and prints buy or sell shape labels when price closes across band thresholds. I