All SMAs Bullish/Bearish Screener (Enhanced)All SMAs Bullish/Bearish Screener Enhanced: Uncover High-Conviction Trend Alignments with Confidence
Description:
Are you ready to elevate your trading from mere guesswork to precise, data-driven decisions? The "All SMAs Bullish/Bearish Screener Enhanced" is not just another indicator; it's a sophisticated, yet user-friendly, trend-following powerhouse designed to cut through market noise and pinpoint high-probability trading opportunities. Built on the foundational strength of comprehensive Moving Average confluence and fortified with critical confirmation signals from Momentum, Volume, and Relative Strength, this script empowers you to identify truly robust trends and manage your trades with unparalleled clarity.
The Power of Multi-Factor Confluence: Beyond Simple Averages
In the unpredictable world of financial markets, true strength or weakness is rarely an isolated event. It's the harmonious alignment of multiple technical factors that signals a high-conviction move. While our original "All SMAs Bullish/Bearish Screener" intelligently identified stocks where price was consistently above or below a full spectrum of Simple Moving Averages (5, 10, 20, 50, 100, 200), this Enhanced version takes it a crucial step further.
We've integrated a powerful three-pronged confirmation system to filter out weaker signals and highlight only the most compelling setups:
Momentum (Rate of Change - ROC): A strong trend isn't just about price direction; it's about the speed and intensity of that movement. Positive momentum confirms that buyers are still aggressively pushing price higher (for bullish signals), while negative momentum validates selling pressure (for bearish signals).
Volume: No trend is truly trustworthy without the backing of smart money. Above-average volume accompanying an "All SMAs" alignment signifies strong institutional participation and conviction behind the move. It separates genuine trend starts from speculative whims.
Relative Strength Index (RSI): This versatile oscillator ensures the trend isn't just "there," but that it's developing healthily. We use RSI to confirm a bullish bias (above 50) or a bearish bias (below 50), adding another layer of confidence to the direction.
When the price aligns above ALL six critical SMAs, and is simultaneously confirmed by robust positive momentum, healthy volume, and a bullish RSI bias, you have an exceptionally strong "STRONGLY BULLISH" signal. This confluence often precedes sustained upward moves, signaling prime accumulation phases. Conversely, a "STRONGLY BEARISH" signal, where price is below ALL SMAs with negative momentum, confirming volume, and a bearish RSI bias, indicates powerful distribution and potential for significant downside.
How to Use This Enhanced Screener:
Add to Chart: Go to TradingView's Pine Editor, paste the script, and click "Add to Chart."
Customize Parameters: Fine-tune the lengths of your SMAs, RSI, Momentum, and Volume averages via the indicator's settings. Experiment to find what best suits your trading style and the assets you trade.
Choose Your Timeframe Wisely:
Daily (1D) and 4-Hour (240 min) are highly recommended. These timeframes cut through intraday noise and provide more reliable, actionable signals for swing and position trading.
Shorter timeframes (e.g., 15min, 60min) can be used by advanced day traders for very short-term entries, but be aware of increased volatility and noise.
Visual Confirmation:
Green/Red Triangles: Appear on your chart, indicating confirmed bullish or bearish signals.
Background Color: The chart background will subtly turn lime green for "STRONGLY BULLISH" and red for "STRONGLY BEARISH" conditions.
On-Chart Status Table: A clear table displays the current signal status ("STRONGLY BULLISH/BEARISH," or "SMAs Mixed") for immediate feedback.
Set Up Alerts (Your Primary Screener Tool): This is the game-changer! Create custom alerts on TradingView based on the "Confirmed Bullish Trade" and "Confirmed Bearish Trade" conditions. Receive instant notifications (email, pop-up, mobile) for any stock in your watchlist that meets these stringent criteria. This allows you to scan the entire market effortlessly and act decisively.
Strategic Stop-Loss Placement: The Trader's Lifeline
Even the most robust signals can fail. Protecting your capital is paramount. For this trend-following strategy, your stop-loss should be placed where the underlying trend structure is broken.
For a "STRONGLY BULLISH" Trade: Place your stop-loss just below the most recent significant swing low (higher low). This is the last point where buyers stepped in to support the price. If price breaks below this, your bullish thesis is invalidated.
For a "STRONGLY BEARISH" Trade: Place your stop-loss just above the most recent significant swing high (lower high). If price breaks above this, your bearish thesis is invalidated.
Alternatively, consider placing your stop-loss just below the 20-period SMA (for bullish trades) or above the 20-period SMA (for bearish trades). A significant close beyond this intermediate-term average often indicates a critical shift in momentum. Always ensure your chosen stop-loss adheres to your pre-defined risk per trade (e.g., 1-2% of capital).
Disciplined Profit Booking: Maximizing Gains
Just as important as knowing when you're wrong is knowing when to take profits.
Trailing Stop-Loss: As your trade moves into profit, trail your stop-loss upwards (for longs) or downwards (for shorts). You can trail it using:
Previous Swing Lows/Highs: Move your stop to just below each new higher low (for longs) or just above each new lower high (for shorts).
A Moving Average (e.g., 10-period or 20-period SMA): If price closes below your chosen trailing SMA, exit. This allows you to ride the trend while protecting accumulated profits.
Target Levels: Identify potential resistance levels (for longs) or support levels (for shorts) using pivot points, previous highs/lows, or Fibonacci extensions. Consider taking partial profits at these levels and letting the rest run with a trailing stop.
Loss of Confluence: If the "STRONGLY BULLISH/BEARISH" condition ceases to be met (e.g., RSI crosses below 50, or volume drops significantly), this can be a signal to reduce or exit your position, even if your stop-loss hasn't been hit.
The "All SMAs Bullish/Bearish Screener Enhanced" is your comprehensive partner in navigating the markets. By combining robust trend identification with critical confirmation signals and disciplined risk management, you're equipped to make smarter, more confident trading decisions. Add it to your favorites and unlock a new level of precision in your trading journey!
#PineScript #TradingView #SMA #MovingAverage #TrendFollowing #StockScreener #TechnicalAnalysis #Bullish #Bearish #QQQ #Momentum #Volume #RSI #SPY #TradingStrategy #Enhanced #Signals #Analysis #DayTrading #SwingTrading
指標和策略
Turtle Trading Strategy (Simplified)This TradingView script is a powerful implementation of the classic Turtle Trading strategy, designed to help traders capitalize on significant market trends. Built using Pine Script, it can function as an indicator to highlight the specific entry and exit signals derived from the Turtle rules, or as a fully automated strategy to execute trades based on these signals. Users can fine-tune critical parameters like the lookback periods for breakouts and exits, enabling them to adapt the strategy to different market conditions and asset classes. The script leverages Pine Script's robust capabilities to accurately calculate and display the Turtle System's core logic, including position sizing based on volatility (ATR), providing a clear and systematic approach to trend-following directly on their TradingView charts.
Relative Measured Volatility (RMV)RMV • Volume-Sensitive Consolidation Indicator
A lightweight Pine Script that highlights true low-volatility, low-volume bars in a single squeeze measure.
What it does
Calculates each bar’s raw High-Low range.
Down-weights bars where volume is below its 30-day average, emphasizing genuine quiet periods.
Normalizes the result over the prior 15 bars (excluding the current bar), scaling from 0 (tightest) to 100 (most volatile).
Draws the series as a step plot, shades true “tight” bars below the user threshold, and marks sustained squeezes with a small arrow.
Key inputs
Lookback (bars): Number of bars to use for normalization (default 15).
Tight Threshold: RMV value under which a bar is considered squeezed (default 15).
Volume SMA Period: Period for the volume moving average benchmark (default 30).
How it works
Raw range: barRange = high - low
Volume ratio: volRatio = min(volume / sma(volume,30), 1)
Weighted range: vwRange = barRange * volRatio
Rolling min/max (prior 15 bars): exclude today so a new low immediately registers a 0.
Normalize: rmv = clamp(100 * (vwRange - min) / (max - min), 0, 100)
Visualization & signals
Step line for exact bar-by-bar values.
Shaded background when RMV < threshold.
Consecutive-bar filter ensures arrows only appear when tightness lasts at least two bars, cutting noise.
Why use it
Quickly spot consolidation zones that combine narrow price action with genuine dry volume—ideal for swing entries ahead of breakouts.
ZF RSI PLOT1. How RSI Is Calculated
RSI is typically computed over 14 periods (days, hours, etc.) using the formula:
RSI=100−1001+RS
RSI=100−1+RS100
where
RS=Average Gain over N periodsAverage Loss over N periods
RS=Average Loss over N periodsAverage Gain over N periods
2. Overbought (> 70)
Definition: An RSI reading above 70 suggests that the instrument has experienced relatively large gains and may be “overbought.”
Interpretation:
Potential Reversal: Prices may have risen too far, too fast, and could be due for a pullback or consolidation.
Exit/Take Profits: Traders often trim long positions or tighten stops as RSI climbs above 70.
Confirmation Needed:
Bearish “RSI divergence” (price makes a higher high while RSI makes a lower high).
Price action signals (e.g., bearish candlestick patterns).
Volume drying up on advances.
3. Oversold (< 30)
Definition: An RSI reading below 30 suggests that the instrument has experienced relatively large losses and may be “oversold.”
Interpretation:
Potential Bounce: Prices may have fallen too far, too fast, and could be due for a rebound or consolidation.
Buying Opportunity: Traders often look to initiate or add to long positions as RSI drops below 30.
Confirmation Needed:
Bullish “RSI divergence” (price makes a lower low while RSI makes a higher low).
Price action signals (e.g., hammer candlesticks, support levels).
Volume picking up on declines.
4. Divergences
Bullish Divergence: Price ↓ makes a lower low, RSI ↑ makes a higher low ⇒ possible trend change to the upside.
Bearish Divergence: Price ↑ makes a higher high, RSI ↓ makes a lower high ⇒ possible trend change to the downside.
5. Adjustments & Variations
Stronger Trends: Use 80/20 thresholds to avoid early signals in very strong up- or down-trends.
Shorter/Longer Periods: Adjust the look-back period (e.g., 9 for more sensitivity, 21 for smoother signals) depending on your time frame.
6. Limitations & Best Practices
Can Stay Extreme: In strong trends, RSI may remain overbought/oversold for extended periods—don’t trade it in isolation.
Combine with Other Tools: Use trend filters (moving averages, ADX), support/resistance, and volume to confirm entries.
Risk Management: Always set stops and manage position size; RSI signals can fail.
7. Putting It All Together
Identify Trend: Is the market in an uptrend, downtrend, or range?
Watch RSI Extremes: Note when RSI crosses above 70 or below 30.
Seek Confirmation: Look for divergences, candlestick/pricing signals, and supporting volume.
Execute & Manage: Enter with clear stop-loss levels, consider scaling, and lock in profits appropriately.
By understanding both the raw threshold signals and the nuances—like divergences and trend-context—you can harness RSI’s simplicity while mitigating its pitfalls.
BTC SmartMoney + SQZMOM + EMA + Cloud + Trailing Stop (v2.5)🚀 BTC 15-Minute Smart Strategy: SmartMoney + SQZMOM + EMA + Trailing Stop
Designed specifically for the fast-paced and volatile crypto market, this strategy is finely tuned to deliver maximum performance on Bitcoin’s 15-minute chart.
🌟 Key Features:
SmartMoney Concepts (SMC) based CHoCH signals to detect market structure shifts and capture early trend reversals.
SQZMOM (Squeeze Momentum Oscillator) to gauge strong volatility and momentum confluence.
50 & 200 EMA Cloud combining short-term and long-term trend filters for reliable market direction.
ATR-based and manually adjustable Trailing Stop for flexible and automated risk management.
Scientifically optimized Take Profit and Stop Loss levels to minimize losses and maximize gains.
Clear exit labels on chart for real-time trade tracking and decision making.
🔥 Why Choose This Strategy?
Provides fast and reliable signals on 15-minute timeframe, protecting you against sudden market moves.
Maximizes profits with trailing stops while keeping risks controlled.
Built on professional financial models, ideal for both beginners and experienced traders.
📈 How to Use
Easily deploy on TradingView with flexible parameters that adjust to your trading style. Automates entry and exit decisions based on real-time market conditions.
A powerful companion for traders who want a reliable yet aggressive approach to BTC trading on the 15-minute timeframe.
Adjustable EMA Crossover with Signals3 Adjustable Ema's with crossover. These are used for identifying a trend and help with entry and exit signals.
Shavarie's Sniper LineShavarie’s Sniper Line is a precision confirmation tool built for high-quality entries — not noisy signals.
It activates only when all 3 conditions agree:
🔁 Momentum bend detection
💧 Money Flow Index (MFI) pressure
🔺 Delta volume strength (emulated from price/volume flow)
When all conditions align, the Sniper Line shifts to:
+1 for potential buy zone
-1 for potential sell zone
0 when neutral — no action
Best used in combination with supply/demand zones, Heikin Ashi, or larger trend structures. Built for traders who value patience, precision, and massive R:R setups.
📊 Multi Bollinger Bands (4 sets)Made for people who want to use Multi Bollinger Bands.
By Charles SUNG.
Cumulative Volume Delta with MAdelta scirpt with single ma , good on 5 minute for single ma and higher time framess
Weekly PO3 Market Structure ToolThis script is designed to assist traders in identifying the "Power of Three" (PO3) model on a weekly basis — as taught by ICT (Inner Circle Trader).
It automatically plots:
- The **Weekly Open**, a crucial reference level for detecting manipulation zones.
- **Weekly High and Low**, to frame liquidity zones and potential sweep areas.
- A customizable **Manipulation Zone**, calculated as a percentage range above and below the weekly open.
The PO3 model breaks market structure into:
1. Accumulation (early-week range)
2. Manipulation (false breakouts and liquidity grabs)
3. Distribution (true directional move)
This tool helps visualize those stages and align trades with smart money behavior.
Best used on 1H, 4H, or 15M timeframes for clarity.
Tip: Combine with FVGs, Order Blocks, and time-of-day filters for enhanced setups.
BTC vs 美元指数(DXY) 强度指标1. Introduction
一、 指标简介
In the grand game of macroeconomics, the relationship between Bitcoin (BTC) and the US Dollar Index (DXY) is a key barometer for market risk appetite versus risk-aversion.
在宏观经济的大棋局中,比特币(BTC)与美元指数(DXY)的强弱关系,是衡量市场风险偏好与避险情绪的核心风向标。
It is often said that "BTC is a hedge against a falling dollar." This indicator is built upon this classic logic, providing you with a quantitative and intuitive analytical tool.
交易员们常说「BTC 是抗美元下跌的工具」,本指标正是基于这一经典逻辑,为您提供一个量化、直观的分析工具。
The BTC vs. DXY Strength Index helps you gain insight into critical questions by calculating the relative performance spread between the two assets, combined with statistical tools (Bollinger Bands) and significant historical macro signals (DXY weekly death cross):
BTC vs 美元指数(DXY) 强度指标 通过计算两者的相对表现差异,并结合统计学工具(布林带)和重要的历史宏观信号(DXY周线死叉),帮助您洞察以下关键问题:
Is the current market dominated by BTC (risk-on) or the Dollar (risk-off)?
当前市场由 BTC 主导(风险偏好),还是由美元主导(避险情绪)?
Has the strength relationship between them reached an extreme level where a reversal is possible?
两者之间的强弱关系是否达到了可能逆转的极端水平?
Has a major macro reversal signal, which has historically triggered significant market shifts, appeared?
是否出现了历史上曾多次引发市场巨变的宏观反转信号?
2. Features & Interpretation
二、 核心功能与解读
2.1. Performance Spread Histogram
1. 强度差柱状图
The core of the indicator is a histogram extending from the zero line, representing the performance spread of BTC relative to DXY.
指标的核心是一系列从 0 轴延伸的柱状图,它代表了 BTC 相对于 DXY 的表现强度差。
Green Bars (Positive Value): Indicates that BTC has outperformed the DXY over the period. The taller the green bar, the stronger BTC's momentum and the higher the market's risk appetite.
绿色柱 (正值): 代表在该周期内,BTC 的表现优于美元指数。绿色柱越高,说明 BTC 越强势,市场风险偏好情绪越高。
Red Bars (Negative Value): Indicates that the DXY has outperformed BTC. The deeper the red bar, the stronger the Dollar and the more prevalent the risk-off sentiment.
红色柱 (负值): 代表在该周期内,美元指数的表现优于 BTC。红色柱越深,说明美元越强势,市场避险情绪越浓。
2.2. Bollinger Bands Extreme Signal
2. 布林带极端信号
The indicator calculates Bollinger Bands for the "performance spread" in the background. When the histogram breaks above or below the bands, an alert is triggered.
指标在后台对「强度差」计算布林带。当柱状图突破上下轨时,会触发警报。
Breakout Above Upper Band: BTC's strength relative to DXY has reached a statistical extreme, signaling caution for a potential mean reversion (e.g., a BTC pullback or DXY strengthening).
向上突破: BTC 相对于 DXY 的强势达到了统计上的极端,警惕短期关系回归(例如 BTC 回调或 DXY 走强)。
Breakdown Below Lower Band: BTC's weakness relative to DXY has reached a statistical extreme, signaling a potential opportunity for a bounce (e.g., BTC strengthening or DXY pulling back).
向下突破: BTC 相对于 DXY 的弱势达到了统计上的极端,关注潜在的反弹机会(例如 BTC 走强或 DXY 回调)。
2.3. DXY Historical Anomaly Signal
3. DXY 历史规律信号
This is the essence of this indicator. Based on research from Coindesk analysts, the "Death Cross" (50-week MA crossing below the 200-week MA) on the DXY weekly chart has often acted as a contrarian indicator—a "bear trap"—since 2009.
这是本指标的精髓所在。根据 Coindesk 分析师的研究,自 2009 年以来,美元指数(DXY)周线级别的「死亡交叉」(50周均线下穿200周均线)往往是一个反向指标,即「空头陷阱」。
Instead of preceding a bear market for the dollar, it has repeatedly marked major cyclical bottoms for the DXY.
它非但没有引发美元的熊市,反而屡次成为美元阶段性大底的标志。
Blue Background Highlight: When the indicator detects a "Death Cross" on the DXY weekly chart, the background will turn blue, and a high-priority alert will be triggered. This is designed to warn you that, based on historical patterns, the US Dollar may be about to bottom and strengthen, posing a significant potential bearish risk for BTC.
蓝色背景高亮: 当指标检测到 DXY 周线图上形成「死亡交叉」时,指标背景会变为蓝色,并触发最高优先级的警报。这旨在提醒您:根据历史规律,美元可能即将见底走强,这对 BTC 构成潜在的重大利空风险,需高度警惕!
3. Settings
三、 主要功能与设定
Customizable symbols for BTC and DXY.
可自定义 BTC 和 DXY 的交易对。
Freely adjustable periods for performance calculation and Bollinger Bands.
可自由调整表现计算周期、布林带参数。
Configurable MA periods for the DXY Death Cross detection, with the ability to toggle this signal on or off.
可配置 DXY 死亡交叉的均线周期,并自由开关此信号的显示。
Includes a comprehensive info panel and alert system.
包含功能全面的信息面板与警报系统。
Disclaimer: This indicator is a tool for supplementary macro analysis and is intended to provide a reference for market sentiment. It does not constitute any investment advice. All trading decisions should be based on your own research and risk assessment. Happy trading!
免责声明: 本指标是辅助宏观分析的工具,旨在提供市场情绪的参考,不构成任何投资建议。所有交易决策都应基于您自己的研究和风险判断。祝您交易顺利!
SMA TableSMA Table
This indicator displays a clean, simple table showing the current status of three key Simple Moving Averages (SMAs) relative to price. The table changes color based on price position - green when price is above the SMA and red when below.
Features:
- Shows 3 customizable Simple Moving Averages (default: 20, 50, 200)
- Visual color-coding: green when price is above an SMA, red when below
- Compact table display that doesn't clutter your chart
- Customizable alert settings for price crosses of each SMA
- No chart plotting - perfect as a supplementary indicator
Use Cases:
- Quick visual reference for trend direction using multiple timeframes
- Monitor key technical levels without chart clutter
- Get alerts when price crosses important moving averages
- Use as part of a trend-following strategy
This clean, minimalist indicator helps traders quickly assess market trend structure across multiple timeframes without the visual noise of multiple moving average lines on their charts.
Correlation & Mean Reversion - Paired Stocks/ETFs TradingThis indicator is designed to analyze pair trading opportunities between two assets by evaluating:
🔧 Core Features
1. Symbol Pair Analysis
Takes two input symbols (Symbol A, Symbol B).
Calculates the price ratio (A/B) and compares it to a user-defined targetRatio.
2. Z-Score of Ratio
Computes Z-Score of the ratio over a user-defined lookback window to measure how far the ratio deviates from its mean.
This gauges whether the ratio is likely to revert to the mean.
3. Reversion Probability
Applies a normal CDF approximation to Z-Score to estimate the probability of mean reversion.
Flags moderate (80%+) and strong (95%+) reversion signals.
4. Correlation
Calculates the rolling correlation of log returns between Symbol A and Symbol B.
Useful to confirm if the assets historically move together.
SMA Strategy with Re-Entry Signal (v6 Style)*SMA Trend Strategy with Re-Entry Signal (v6 Edition)*
This indicator is based on a classic moving average trend-following system, enhanced with re-entry signals designed for medium to short-term traders.
---
### 📈 Key Features:
1. *Trend Detection Logic:*
- The 30-period SMA (SMA30) is used as the trend filter.
- When the closing price is above the SMA30, the market is considered to be in an uptrend.
2. *Re-Entry Signal:*
- While in an uptrend, if the closing price crosses above the SMA20, a re-entry (add position) signal is triggered.
- These signals are shown with green upward arrows below the bars.
3. *Background Highlighting:*
- Green background: indicates an uptrend.
- Red background: indicates a break below SMA30, suggesting weakening momentum.
4. *Multi-SMA Visualization:*
- Five SMAs are displayed: SMA10, SMA20, SMA30, SMA60, and SMA250.
- This helps visualize both short-term and long-term trend structures.
---
### 🔍 Usage Tips:
- Use this script directly on your main chart to monitor trend direction and wait for re-entry signals during pullbacks.
- Combine with other tools like volume, price action, or candlestick patterns to confirm entries.
---
### ⚠️ Disclaimer:
- This indicator is for educational and informational purposes only. It does not constitute financial advice or a buy/sell signal.
- Avoid relying solely on this script for trading decisions. Always manage your own risk.
---
👨💻 *Developer’s Note:*
This script is 100% manually developed, not copied or auto-generated. It is an original implementation based on my personal trading logic. Suggestions and feedback are welcome!
Moving Average Convergence-Divergence (MACD)This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.
TICK ±1200 Intrabar MarkerMarks +1100 and -1200 NYSE TICK readings on any chart. Useful for TICK fades without having to look at the actual USI:TICK chart.
OBV-ROC Tilson Trend (Delta Toggle)Tracks the ROC of Obv via Tilson MA and plots slow and fast obv to see direction change
Simple Bollinger BandsBollinger Bands are a popular technical analysis indicator used to measure market volatility and identify potential overbought or oversold conditions.
This script plots:
A middle band (20-period Simple Moving Average)
An upper band (SMA + 2 standard deviations)
A lower band (SMA – 2 standard deviations)