Appearance
Personalize your experience
Mode
Accent Color
Layout
Direction
Bollinger Bands
Admin's ChoiceFreeSMA with standard deviation upper/lower bands
4.8(421)
14.1k installs 1.9k 2 commentsQ
42 listings12400 followers
Official QuaTick team — building advanced charting & trading tools for the Indian market.
View Profilebollingervolatilitybandssqueezemean-reversion
Free
Open in QuaTick IDE Edit in IDE Version2.0.0
Updated2025-10-20
Compatiblecandlestick, heiken-ashi, line
Rating Distribution
5
1
4
0
3
0
2
0
1
0
Live Preview — BTC/USDT
About
Bollinger Bands plot a middle SMA line with upper and lower bands at N standard deviations. Used widely for volatility breakouts, squeeze detection, and mean reversion.
Parameters
• Length (default 20)
• Multiplier (default 2.0)
• Source (close, hl2, etc.)
Outputs & Parameters
Outputs
Middle Bandline
Upper Bandband
Lower Bandband
Parameters
Length20
Multiplier2
Sourceclose
Source Code
Edit in IDEtypescript
| 1 | // Bollinger Bands — Quatick IDE (Middle Band) |
| 2 | // SDK math globals available: sma, ema, atr, rsi, macd, bollingerBands, vwap, etc. |
| 3 | |
| 4 | const metadata = { id: 'bollinger', name: 'Bollinger Bands', version: '1.0.0', category: 'volatility' }; |
| 5 | |
| 6 | interface BarData { |
| 7 | time: number; |
| 8 | open: number; |
| 9 | high: number; |
| 10 | low: number; |
| 11 | close: number; |
| 12 | volume?: number; |
| 13 | } |
| 14 | |
| 15 | const defaultParams = { period: 20, multiplier: 2, source: 'close' }; |
| 16 | |
| 17 | function calculate(bars: BarData[], params = defaultParams): { time: number; value: number }[] { |
| 18 | const prices = bars.map(b => { |
| 19 | if (params.source === 'open') return b.open; |
| 20 | if (params.source === 'high') return b.high; |
| 21 | if (params.source === 'low') return b.low; |
| 22 | return b.close; |
| 23 | }); |
| 24 | |
| 25 | // bollingerBands() is an SDK global: bollingerBands(data[], period, mult) -> { upper, middle, lower } |
| 26 | const bb = bollingerBands(prices, params.period, params.multiplier); |
| 27 | |
| 28 | // Return the middle band (SMA). Change bb.middle to bb.upper or bb.lower as needed. |
| 29 | return bars |
| 30 | .map((bar, i) => ({ time: bar.time, value: bb.middle[i] })) |
| 31 | .filter(p => !isNaN(p.value)); |
| 32 | } |
Read-only preview. Open in the QuaTick IDE to edit and deploy.
Reviews
No reviews yet. Be the first to review this listing.
Discussion
Sign in to join the discussion.