Volatility
Volume Block Order AnalyzerCore Concept
The Volume Block Order Analyzer is a sophisticated Pine Script strategy designed to detect and analyze institutional money flow through large block trades. It identifies unusually high volume candles and evaluates their directional bias to provide clear visual signals of potential market movements.
How It Works: The Mathematical Model
1. Volume Anomaly Detection
The strategy first identifies "block trades" using a statistical approach:
```
avgVolume = ta.sma(volume, lookbackPeriod)
isHighVolume = volume > avgVolume * volumeThreshold
```
This means a candle must have volume exceeding the recent average by a user-defined multiplier (default 2.0x) to be considered a significant block trade.
2. Directional Impact Calculation
For each block trade identified, its price action determines direction:
- Bullish candle (close > open): Positive impact
- Bearish candle (close < open): Negative impact
The magnitude of impact is proportional to the volume size:
```
volumeWeight = volume / avgVolume // How many times larger than average
blockImpact = (isBullish ? 1.0 : -1.0) * (volumeWeight / 10)
```
This creates a normalized impact score typically ranging from -1.0 to 1.0, scaled by dividing by 10 to prevent excessive values.
3. Cumulative Impact with Time Decay
The key innovation is the cumulative impact calculation with decay:
```
cumulativeImpact := cumulativeImpact * impactDecay + blockImpact
```
This mathematical model has important properties:
- Recent block trades have stronger influence than older ones
- Impact gradually "fades" at rate determined by decay factor (default 0.95)
- Sustained directional pressure accumulates over time
- Opposing pressure gradually counteracts previous momentum
Trading Logic
Signal Generation
The strategy generates trading signals based on momentum shifts in institutional order flow:
1. Long Entry Signal: When cumulative impact crosses from negative to positive
```
if ta.crossover(cumulativeImpact, 0)
strategy.entry("Long", strategy.long)
```
*Logic: Institutional buying pressure has overcome selling pressure, indicating potential upward movement*
2. Short Entry Signal: When cumulative impact crosses from positive to negative
```
if ta.crossunder(cumulativeImpact, 0)
strategy.entry("Short", strategy.short)
```
*Logic: Institutional selling pressure has overcome buying pressure, indicating potential downward movement*
3. Exit Logic: Positions are closed when the cumulative impact moves against the position
```
if cumulativeImpact < 0
strategy.close("Long")
```
*Logic: The original signal is no longer valid as institutional flow has reversed*
Visual Interpretation System
The strategy employs multiple visualization techniques:
1. Color Gradient Bar System:
- Deep green: Strong buying pressure (impact > 0.5)
- Light green: Moderate buying pressure (0.1 < impact ≤ 0.5)
- Yellow-green: Mild buying pressure (0 < impact ≤ 0.1)
- Yellow: Neutral (impact = 0)
- Yellow-orange: Mild selling pressure (-0.1 < impact ≤ 0)
- Orange: Moderate selling pressure (-0.5 < impact ≤ -0.1)
- Red: Strong selling pressure (impact ≤ -0.5)
2. Dynamic Impact Line:
- Plots the cumulative impact as a line
- Line color shifts with impact value
- Line movement shows momentum and trend strength
3. Block Trade Labels:
- Marks significant block trades directly on the chart
- Shows direction and volume amount
- Helps identify key moments of institutional activity
4. Information Dashboard:
- Current impact value and signal direction
- Average volume benchmark
- Count of significant block trades
- Min/Max impact range
Benefits and Use Cases
This strategy provides several advantages:
1. Institutional Flow Detection: Identifies where large players are positioning themselves
2. Early Trend Identification: Often detects institutional accumulation/distribution before major price movements
3. Market Context Enhancement: Provides deeper insight than simple price action alone
4. Objective Decision Framework: Quantifies what might otherwise be subjective observations
5. Adaptive to Market Conditions: Works across different timeframes and instruments by using relative volume rather than absolute thresholds
Customization Options
The strategy allows users to fine-tune its behavior:
- Volume Threshold: How unusual a volume spike must be to qualify
- Lookback Period: How far back to measure average volume
- Impact Decay Factor: How quickly older trades lose influence
- Visual Settings: Labels and line width customization
This sophisticated yet intuitive strategy provides traders with a window into institutional activity, helping identify potential trend changes before they become obvious in price action alone.
ATR Stop Loss & 3 TP FinderATR Stop Loss & 3 TP Finder - By SeehraSingh
This indicator is designed to help traders automate Stop Loss (SL) and Take Profit (TP) placement based on the Average True Range (ATR). It dynamically calculates:
Stop Loss (SL): Set based on a user-defined ATR multiplier.
Three Take Profit (TP) levels: Configurable ATR multipliers for TP1, TP2, and TP3.
Customizable Price Sources: Allows traders to choose different price sources (Open, High, Low, Close, HL2, HLC3, OHLC4, HLCC4) for both SL and TP calculations.
Visual Representation: Plots dashed lines for Entry, SL, TP1, TP2, and TP3.
Table Display: Provides an easy-to-read table at the bottom showing SL, TP1, TP2, and TP3 values.
How It Works:
Select ATR length and smoothing type (RMA, SMA, EMA, WMA).
Set ATR multipliers for SL and TP levels.
Choose the price source for SL and TP calculations.
The indicator automatically plots entry, SL, and three TP levels on the chart.
Ideal For:
Traders who use ATR-based dynamic Stop Loss and Take Profit strategies.
Those who want to avoid fixed SL/TP placements and prefer volatility-based risk management.
Scalpers, Swing Traders, and Position Traders looking for automated SL/TP visualization.
Disclaimer
⚠️ Trading involves risk. This indicator is for educational purposes only and should not be considered financial advice. Always conduct your own analysis before entering any trade. The author is not responsible for any financial losses incurred while using this tool. Past performance does not guarantee future results.
Adaptive Fibonacci Volatility Bands (AFVB)
**Adaptive Fibonacci Volatility Bands (AFVB)**
### **Overview**
The **Adaptive Fibonacci Volatility Bands (AFVB)** indicator enhances standard **Fibonacci retracement levels** by dynamically adjusting them based on market **volatility**. By incorporating **ATR (Average True Range) adjustments**, this indicator refines key **support and resistance zones**, helping traders identify **more reliable entry and exit points**.
**Key Features:**
- **ATR-based adaptive Fibonacci levels** that adjust to changing market volatility.
- **Buy and Sell signals** based on price interactions with dynamic support/resistance.
- **Toggleable confirmation filter** for refining trade signals.
- **Customizable color schemes** and alerts.
---
## **How This Indicator Works**
The **AFVB** operates in three main steps:
### **1️⃣ Detecting Key Fibonacci Levels**
The script calculates **swing highs and swing lows** using a user-defined lookback period. From this, it derives **Fibonacci retracement levels**:
- **0% (High)**
- **23.6%**
- **38.2%**
- **50% (Mid-Level)**
- **61.8%**
- **78.6%**
- **100% (Low)**
### **2️⃣ Adjusting for Market Volatility**
Instead of using **fixed retracement levels**, this indicator incorporates an **ATR-based adjustment**:
- **Resistance levels** shift **upward** based on ATR.
- **Support levels** shift **downward** based on ATR.
- This makes levels more **responsive** to price action.
### **3️⃣ Generating Buy & Sell Signals**
AFVB provides **two types of signals** based on price interactions with key levels:
✔ **Buy Signal**:
Occurs when price **dips below** a support level (78.6% or 100%) and **then closes back above it**.
- **Optionally**, a confirmation buffer can be enabled to require price to close **above an additional threshold** (based on ATR).
✔ **Sell Signal**:
Triggered when price **breaks above a resistance level** (0% or 23.6%) and **then closes below it**.
📌 **Important:**
- The **buy threshold setting** allows traders to **fine-tune** entry conditions.
- Turning this setting **off** generates **more frequent** buy signals.
- Keeping it **on** reduces false signals but may result in **fewer trade opportunities**.
---
## **How to Use This Indicator in Trading**
### 🔹 **Entry Strategy (Buying)**
1️⃣ Look for **buy signals** at the **78.6% or 100% Fibonacci levels**.
2️⃣ Ensure price **closes above** the support level before entering a long trade.
3️⃣ **Enable or disable** the buy threshold filter depending on desired trade strictness.
### 🔹 **Exit Strategy (Selling)**
1️⃣ Watch for **sell signals** at the **0% or 23.6% Fibonacci levels**.
2️⃣ If price **breaks above resistance and then closes below**, consider exiting long positions.
3️⃣ Can be used **alone** or **combined with trend confirmation tools** (e.g., moving averages, RSI).
### 🔹 **Using the Toggleable Buy Threshold**
- **ON**: Buy signal requires **extra confirmation** (reduces false signals but fewer trades).
- **OFF**: Buy triggers as soon as price **closes back above support** (more signals, but may include weaker setups).
---
## **User Inputs**
### **🔧 Customization Options**
- **ATR Length**: Defines the period for **ATR calculation**.
- **Swing Lookback**: Determines how far back to find **swing highs and lows**.
- **ATR Multiplier**: Adjusts the size of **volatility-based modifications**.
- **Buy/Sell Threshold Factor**: Fine-tunes the **entry signal strictness**.
- **Show Level Labels**: Enables/disables **Fibonacci level annotations**.
- **Color Settings**: Customize **support/resistance colors**.
### **📢 Alerts**
AFVB includes built-in **alert conditions** for:
- **Buy Signals** ("AFVB BUY SIGNAL - Possible reversal at support")
- **Sell Signals** ("AFVB SELL SIGNAL - Possible reversal at resistance")
- **Any Signal Triggered** (Useful for automated alerts)
---
## **Who Is This Indicator For?**
✅ **Scalpers & Day Traders** – Helps identify **short-term reversals**.
✅ **Swing Traders** – Useful for **buying dips** and **selling rallies**.
✅ **Trend Traders** – Can be combined with **momentum indicators** for confirmation.
**Best Timeframes:**
⏳ **15-minute, 1-hour, 4-hour, Daily charts** (works across multiple assets).
---
## **Limitations & Considerations**
🚨 **Important Notes**:
- **No indicator guarantees profits**. Always **combine** it with **risk management strategies**.
- Works best **in trending & mean-reverting markets**—may generate false signals in **choppy conditions**.
- Performance may vary across **different assets & timeframes**.
📢 **Backtesting is recommended** before using it for live trading.
Advanced Adaptive Grid Trading StrategyThis strategy employs an advanced grid trading approach that dynamically adapts to market conditions, including trend, volatility, and risk management considerations. The strategy aims to capitalize on price fluctuations in both rising (long) and falling (short) markets, as well as during sideways movements. It combines multiple indicators to determine the trend and automatically adjusts grid parameters for more efficient trading.
How it Works:
Trend Analysis:
Short, long, and super long Moving Averages (MA) to determine the trend direction.
RSI (Relative Strength Index) to identify overbought and oversold levels, and to confirm the trend.
MACD (Moving Average Convergence Divergence) to confirm momentum and trend direction.
Momentum indicator.
The strategy uses a weighted scoring system to assess trend strength (strong bullish, moderate bullish, strong bearish, moderate bearish, sideways).
Grid System:
The grid size (the distance between buy and sell levels) changes dynamically based on market volatility, using the ATR (Average True Range) indicator.
Grid density also adapts to the trend: in a strong trend, the grid is denser in the direction of the trend.
Grid levels are shifted depending on the trend direction (upwards in a bear market, downwards in a bull market).
Trading Logic:
The strategy opens long positions if the trend is bullish and the price reaches one of the lower grid levels.
It opens short positions if the trend is bearish and the price reaches one of the upper grid levels.
In a sideways market, it can open positions in both directions.
Risk Management:
Stop Loss for every position.
Take Profit for every position.
Trailing Stop Loss to protect profits.
Maximum daily loss limit.
Maximum number of positions limit.
Time-based exit (if the position is open for too long).
Risk-based position sizing (optional).
Input Options:
The strategy offers numerous settings that allow users to customize its operation:
Timeframe: The chart's timeframe (e.g., 1 minute, 5 minutes, 1 hour, 4 hours, 1 day, 1 week).
Base Grid Size (%): The base size of the grid, expressed as a percentage.
Max Positions: The maximum number of open positions allowed.
Use Volatility Grid: If enabled, the grid size changes dynamically based on the ATR indicator.
ATR Length: The period of the ATR indicator.
ATR Multiplier: The multiplier for the ATR to fine-tune the grid size.
RSI Length: The period of the RSI indicator.
RSI Overbought: The overbought level for the RSI.
RSI Oversold: The oversold level for the RSI.
Short MA Length: The period of the short moving average.
Long MA Length: The period of the long moving average.
Super Long MA Length: The period of the super long moving average.
MACD Fast Length: The fast period of the MACD.
MACD Slow Length: The slow period of the MACD.
MACD Signal Length: The period of the MACD signal line.
Stop Loss (%): The stop loss level, expressed as a percentage.
Take Profit (%): The take profit level, expressed as a percentage.
Use Trailing Stop: If enabled, the strategy uses a trailing stop loss.
Trailing Stop (%): The trailing stop loss level, expressed as a percentage.
Max Loss Per Day (%): The maximum daily loss, expressed as a percentage.
Time Based Exit: If enabled, the strategy exits the position after a certain amount of time.
Max Holding Period (hours): The maximum holding time in hours.
Use Risk Based Position: If enabled, the strategy calculates position size based on risk.
Risk Per Trade (%): The risk per trade, expressed as a percentage.
Max Leverage: The maximum leverage.
Important Notes:
This strategy does not guarantee profits. Cryptocurrency markets are volatile, and trading involves risk.
The strategy's effectiveness depends on market conditions and settings.
It is recommended to thoroughly backtest the strategy under various market conditions before using it live.
Past performance is not indicative of future results.
ST_HTF_EMA### **ST_HTF_EMA – Higher Timeframe EMA Overlay**
#### **Description:**
The **ST_HTF_EMA** indicator plots a **21-period Exponential Moving Average (EMA)** from a **higher timeframe** onto the current chart. This allows traders to track key trend levels from a larger perspective while trading on a lower timeframe.
#### **Features:**
- **Customizable Timeframe:** The EMA is sourced from a user-defined timeframe (default: **5-minute**).
- **EMA Calculation:** Uses the **21-period EMA** for smoothing price action and identifying trend direction.
- **Envelope Bands (Optional):** A **0.75% envelope** can be toggled on to create upper and lower bands around the EMA for potential dynamic support/resistance zones.
- **Overlay on Chart:** The EMA and envelope bands are plotted directly on the price chart for easy visibility.
#### **How to Use:**
- Use the **EMA as a trend guide**—price above the EMA suggests bullish momentum, while price below indicates bearish momentum.
- Enable the **envelope bands** (if needed) to spot price deviations from the mean for possible reversal or continuation trades.
#### **Customization:**
- Modify the **timeframe** to adapt the EMA to different market structures.
- Adjust the **envelope percentage** to fine-tune sensitivity.
#### **Visuals:**
- The **EMA is plotted in yellow** for clear visibility.
- **Envelope bands (if enabled)** appear in yellow, with a subtle background highlight.
This indicator is ideal for traders who rely on **higher timeframe trend confirmation** while making decisions on lower timeframes. 🚀
BTC: Open InterestThis indicator tracks the 7-day (default) percentage change in open interest (OI), providing insights into market participation trends. It includes customizable periods and colors, allowing traders to adjust settings for better visualization.
Open interest (OI) is the total number of active contracts (futures or options) that haven’t been closed or settled. It represents the total open positions in the market.
Thus when OI increases, more traders are entering new positions, signaling growing market interest. Conversely, when OI decreases, positions are being closed, suggesting lower trader participation or liquidation.
Attributes & Features:
Open Interest Percentage Change – Measures the 7-day % change in open interest to track market participation.
Customizable Calculation Period – Users can adjust the period (default: 7 days) for more flexible analysis.
Adjustable Colors – Allows modification of colors for better visualization.
Trend Identification – Highlights rising vs. falling open interest trends.
Works Across Assets – Can be used for cryptos, stocks, and futures with open interest data.
Overlay or Separate Panel – Can be plotted on price chart or as a separate indicator.
How It Works:
Fetches Open Interest Data – Retrieves open interest values for each day for USD, USDT, and USDC Bitcoin Perpetual Derivitives.
Calculates Percentage Change – Compares current open interest to its value X days ago (Default = 7 days).
Standard Deviation – Applies standard deviation ranging from -2 to +2 deviations to identify large shifts in OI.
Visual Alerts – Can highlight extreme increases or decreases signaling potential market shifts.
NOTE: THE INDICATOR DATA ONLY GOES BACK TO START OF 2022
Higher Timeframe Support/ResistanceMulti-Timeframe Support/Resistance Indicator
This TradingView indicator helps you monitor important support and resistance levels based on the previous candle’s high, low, and close from a higher timeframe. By default, it uses a daily timeframe, but you can adjust this to any timeframe you want.
Key Features:
- Previous Candle High (PCH) and Previous Candle Low (PCL):
These levels are plotted on your chart (if enabled) and can act as potential support and
resistance zones. You can toggle the visibility of these levels.
- Pivot, Resistance (R1), and Support (S1):
The script calculates Pivot, R1 (Resistance), and S1 (Support) levels based on the previous
candle's price action from the selected higher timeframe.
These levels are displayed on your chart and can be used to identify potential breakout or
reversal points.
- Alert Feature:
Alerts are triggered when the price approaches any of these key levels (PCH, PCL, Pivot, R1,
or S1) within a specified threshold (e.g., 0.5%).
This helps traders react quickly to potential price movements near critical levels.
- Visual Representation:
The script visually fills the areas between Pivot and R1 (Resistance-Pivot Zone) and Pivot and
S1 (Support-Pivot Zone) with color for easy identification of key price zones.
Combined ATR + VolumeOverview
The Combined ATR + Volume indicator (C-ATR+Vol) is designed to measure both price volatility and market participation by merging the Average True Range (ATR) and trading volume into a single normalized value. This provides traders with a more comprehensive tool than ATR alone, as it highlights not only how much price is moving, but also whether there is sufficient volume behind those moves.
Originality & Utility
Two Key Components
ATR (Average True Range): Measures price volatility by analyzing the range (high–low) over a specified period. A higher ATR often indicates larger price swings.
Volume: Reflects how actively traders are participating in the market. High volume typically indicates strong buying or selling interest.
Normalized Combination
Both ATR and volume are independently normalized to a 0–100 range.
The final output (C-ATR+Vol) is the average of these two normalized values. This makes it easy to see when both volatility and market participation are relatively high.
Practical Use
Above 80: Signifies elevated volatility and strong volume. Markets may experience significant moves.
Around 50–80: Indicates moderate activity. Price swings and volume are neither extreme nor minimal.
Below 50: Suggests relatively low volatility and lower participation. The market may be ranging or consolidating.
This combined approach can help filter out situations where volatility is high but volume is absent—or vice versa—providing a more reliable context for potential breakouts or trend continuations.
Indicator Logic
ATR Calculation
Uses Pine Script’s built-in ta.tr(true) function to measure true range, then smooths it with a user-selected method (RMA, SMA, EMA, or WMA).
Key Input: ATR Length (default 14).
Volume Calculation
Smooths the built-in volume variable using the same selectable smoothing methods.
Key Input: Volume Length (default 14).
Normalization
For each metric (ATR and Volume), the script finds the lowest and highest values over the lookback period and converts them into a 0–100 scale:
normalized value
=(current value−min)(max−min)×100
normalized value= (max−min)(current value−min) ×100
Combined Score
The final plot is the average of Normalized ATR and Normalized Volume. This single value simplifies the process of identifying high-volatility, high-volume conditions.
How to Use
Setup
Add the indicator to your chart.
Adjust ATR Length, Volume Length, and Smoothing to match your preferred time horizon or chart style.
Interpretation
High Values (above 80): The market is experiencing significant price movement with high participation. Potential for strong trends or breakouts.
Moderate Range (50–80): Conditions are active but not extreme. Trend setups may be forming.
Low Values (below 50): Indicates quieter markets with reduced liquidity. Expect ranging or less decisive moves.
Strategy Integration
Use C-ATR+Vol alongside other trend or momentum indicators (e.g., Moving Averages, RSI, MACD) to confirm potential entries/exits.
Combine it with support/resistance or price action analysis for a broader market view.
Important Notes
This script is open-source and intended as a community contribution.
No Future Guarantee: Past market behavior does not guarantee future results. Always use proper risk management and validate signals with additional tools.
The indicator’s performance may vary depending on timeframes, asset classes, and market conditions.
Adjust inputs as needed to suit different instruments or personal trading styles.
By adhering to TradingView’s publishing rules, this script is provided with sufficient detail on what it does, how it’s unique, and how traders can use it. Feel free to customize the settings and experiment with other technical indicators to develop a trading methodology that fits your objectives.
🔹 Combined ATR + Volume (C-ATR+Vol) 지표 설명
이 인디케이터는 ATR(Average True Range)와 거래량(Volume)을 결합하여 시장의 변동성과 유동성을 동시에 측정하는 지표입니다.
ATR은 가격 변동성의 크기를 나타내며, 거래량은 시장 참여자의 활동 수준을 반영합니다. 보통 높은 ATR은 가격 변동이 크다는 의미이고, 높은 거래량은 시장에서 적극적인 거래가 이루어지고 있음을 나타냅니다.
이 두 지표를 각각 0~100 범위로 정규화한 후, 평균을 구하여 "Combined ATR + Volume (C-ATR+Vol)" 값을 계산합니다.
이를 통해 단순한 가격 변동성뿐만 아니라 거래량까지 고려하여, 더욱 신뢰성 있는 변동성 판단을 할 수 있도록 도와줍니다.
📌 핵심 개념
1️⃣ ATR (Average True Range)란?
시장의 변동성을 측정하는 지표로, 일정 기간 동안의 고점-저점 변동폭을 기반으로 계산됩니다.
ATR이 높을수록 가격 변동이 크며, 낮을수록 횡보장이 지속될 가능성이 큽니다.
하지만 ATR은 방향성을 제공하지 않으며, 단순히 변동성의 크기만을 나타냅니다.
2️⃣ 거래량 (Volume)의 역할
거래량은 시장 참여자의 관심과 유동성을 반영하는 중요한 요소입니다.
높은 거래량은 강한 매수 또는 매도세가 존재함을 의미하며, 낮은 거래량은 시장 참여가 적거나 관심이 줄어들었음을 나타냅니다.
3️⃣ ATR + 거래량의 결합 (C-ATR+Vol)
단순한 ATR 값만으로는 변동성이 커도 거래량이 부족할 수 있으며, 반대로 거래량이 많아도 변동성이 낮을 수 있습니다.
이를 해결하기 위해 ATR과 거래량을 각각 0~100으로 정규화하여 균형 잡힌 변동성 지표를 만들었습니다.
두 지표의 평균값을 계산하여, 가격 변동과 거래량이 동시에 높은지를 측정할 수 있도록 설계되었습니다.
📊 사용법 및 해석
80 이상 → 강한 변동성 구간
가격 변동성이 크고 거래량도 높은 상태
강한 추세가 진행 중이거나 큰 변동이 일어날 가능성이 큼
상승/하락 방향성을 확인한 후 트렌드를 따라가는 전략이 유리
50~80 구간 → 보통 수준의 변동성
가격 움직임이 일정하며, 거래량도 적절한 수준
점진적인 추세 형성이 이루어질 가능성이 있음
시장이 점진적으로 상승 혹은 하락할 가능성이 크므로, 보조지표를 활용하여 매매 타이밍을 결정하는 것이 중요
50 이하 → 낮은 변동성 및 유동성 부족
가격 변동이 적고, 거래량도 낮은 상태
시장이 횡보하거나 조정 기간에 들어갈 가능성이 큼
박스권 매매(지지/저항 활용) 또는 돌파 전략을 고려할 수 있음
💡 활용 방법 및 전략
✅ 1. 트렌드 판단 보조지표로 활용
단독으로 사용하는 것보다는 RSI, MACD, 이동평균선(MA) 등의 지표와 함께 활용하는 것이 효과적입니다.
예를 들어, MACD가 상승 신호를 주고, C-ATR+Vol 값이 80을 초과하면 강한 상승 추세로 해석할 수 있습니다.
✅ 2. 변동성 돌파 전략에 활용
C-ATR+Vol이 80 이상인 구간에서 가격이 특정 저항선을 돌파한다면, 강한 추세의 시작을 의미할 수 있습니다.
반대로, C-ATR+Vol이 50 이하에서 가격이 저항선에 가까워지면 돌파 가능성이 낮아질 수 있습니다.
✅ 3. 시장 참여도와 변동성 확인
단순히 ATR만 높아서는 신뢰하기 어려운 경우가 많습니다. 예를 들어, 급등 후 거래량이 급감하면 상승 지속 가능성이 낮아질 수도 있습니다.
하지만 C-ATR+Vol을 사용하면 거래량이 함께 증가하는지를 확인하여 보다 신뢰할 수 있는 분석이 가능합니다.
🚀 결론
🔹 Combined ATR + Volume (C-ATR+Vol) 인디케이터는 단순한 ATR이 아니라 거래량까지 고려하여 변동성을 측정하는 강력한 도구입니다.
🔹 시장이 큰 움직임을 보일 가능성이 높은 구간을 찾는 데 유용하며, 80 이상일 경우 강한 변동성이 있음을 나타냅니다.
🔹 단독으로 사용하기보다는 보조지표와 함께 활용하여, 트렌드 분석 및 돌파 전략 등에 효과적으로 적용할 수 있습니다.
📌 주의사항
변동성이 크다고 해서 반드시 가격이 급등/급락한다는 보장은 없습니다.
특정한 매매 전략 없이 단순히 이 지표만 보고 매수/매도를 결정하는 것은 위험할 수 있습니다.
시장 상황에 따라 변동성의 의미가 다르게 작용할 수 있으므로, 반드시 다른 보조지표와 함께 활용하는 것이 중요합니다.
🔥 이 지표를 활용하여 시장의 변동성과 거래량을 보다 효과적으로 분석해보세요! 🚀
IU BBB(Big Body Bar) StrategyDESCRIPTION
The IU BBB (Big Body Bar) Strategy is a price action-based trading strategy that identifies high-momentum candles with significantly larger body sizes compared to the average. It enters trades when a strong bullish or bearish move occurs and manages risk using an ATR-based trailing stop-loss system.
USER INPUTS:
- Big Body Threshold – Defines how many times larger the candle body should be compared to the average body ( default is 4 ).
- ATR Length – The period for the Average True Range (ATR) used in the trailing stop-loss calculation ( default is 14 ).
- ATR Factor – Multiplier for ATR to determine the trailing stop distance ( default is 2 ).
LONG CONDITION:
- The current candle’s body is greater than the average body size multiplied by the Big Body Threshold.
- The closing price is higher than the opening price (bullish candle).
SHORT CONDITION:
- The current candle’s body is greater than the average body size multiplied by the Big Body Threshold.
- The closing price is lower than the opening price (bearish candle).
LONG EXIT:
- ATR-based trailing stop-loss dynamically adjusts, locking in profits as the price moves higher.
SHORT EXIT:
- ATR-based trailing stop-loss dynamically adjusts, securing profits as the price moves lower.
WHY IT IS UNIQUE:
- Unlike traditional momentum strategies, this system adapts to volatility by filtering trades based on relative candle size.
- It incorporates an ATR-based trailing stop-loss, ensuring risk management and profit protection.
- The strategy avoids choppy market conditions by only trading when significant momentum is present.
HOW USERS CAN BENEFIT FROM IT:
- Catch Strong Price Moves – The strategy helps traders enter trades when the market shows decisive momentum.
- Effective Risk Management – The ATR-based trailing stop ensures that winning trades remain profitable.
- Works Across Markets – Can be applied to stocks, forex, crypto, and indices with proper optimization.
- Fully Customizable – Users can adjust sensitivity settings to match their trading style and time frame.
Supertrend with RSI FilterThis indicator is an enhanced version of the classic Supertrend, incorporating an RSI (Relative Strength Index) filter to refine trend signals. Here is a detailed explanation of its functionality and key advantages over the traditional Supertrend.
1. Indicator Functionality
The indicator uses ATR (Average True Range) to calculate the Supertrend line, just like the classic version. However, it introduces an additional condition based on RSI to strengthen or weaken the Supertrend color based on market momentum.
2. Interpretation of Colors
The indicator displays the Supertrend line with dynamic colors based on trend direction and RSI strength:
- Uptrend (Supertrend in buy mode):
- Dark green (Teal): RSI above the defined threshold (default 50) → Strong bullish confirmation.
- Light gray: RSI below the threshold → Indicates a weaker uptrend or lack of confirmation.
- Downtrend (Supertrend in sell mode):
- Dark red: RSI below the threshold → Strong bearish confirmation.
- Light gray: RSI above the threshold → Indicates a weaker downtrend or lack of confirmation.
The opacity of the color dynamically adjusts based on how far RSI is from its threshold. The greater the difference, the more vivid the color, signaling a stronger trend.
3. Key Advantages Over the Classic Supertrend
- Filters out false signals: The RSI integration helps reduce false signals by only validating trends when RSI aligns with the Supertrend direction.
- Weakens uncertain signals: When RSI is close to its threshold, the color becomes more transparent, alerting traders to a less reliable trend.
- Classic mode available: The 'Use Classic Supertrend' option allows switching to a standard Supertrend display (fixed red/green) without the RSI effect.
4. Customizable Parameters
- ATR Length & ATR Factor: Define the sensitivity of the Supertrend.
- RSI Period & RSI Threshold: Allow refining the RSI filter based on market volatility.
- Classic mode: Enables/disables the RSI filtering to revert to the original Supertrend.
This indicator is especially valuable for traders looking to refine their trend signals based on market momentum measured by RSI.
This indicator is for informational purposes only and should not be considered financial advice. Trading involves risks, and past performance does not guarantee future results. Always conduct your own analysis before making any trading decisions.
BBr1 Candle Range Volitility Gap IndicatorModified Candle Range Volatility Gap Indicator
1. Useful to analyze bars body and wicks and volatility of security.
2. Added a Percentage Option - easier to analyze across different securities.
2. Added a Standard Deviation ("1 std dev= 68.2%, 2 std dev=95.4%, 3 std dev=99.7%, etc") based upon user defined lookback period.
3. Added the ability to include Gaps in Analysis. (Gaps are when the prior closing cost does not equal opening price)
4. Possible Uses setting up stop losses, trailing entries/exits (inside range or outside range).
5. Use it with other indicators in determining if to make an entry or close entry.
Reposted Original Description by © ka66 Kamal Advani
Visually shows the Body Range (open to close) and Candle Range (high to low).
Semi-transparent overlapping area is the full Candle Range, and fully-opaque smaller area is the Body Range. For aesthetics and visual consistency, Candle Range follows the direction of the Body Range, even though technically it's always positive (high - low).
The different plots for each range type also means the UI will allow deselecting one or the other as needed. For example, some strategies may care only about the Body Range, rather than the entire Candle Range, so the latter can be hidden to reduce noise.
Threshold horizontal lines are plotted, so the trader can modify these high and low levels as needed through the user interface. These need to be configured to match the instrument's price range levels for the timeframe. The defaults are pretty arbitrary for +/- 0.0080 (80 pips in a 4-decimal place forex pair). Where a range reaches or exceeds a threshold, it's visually marked as well with a shape at the Body or Candle peak, to assist with quicker visual potential setup scanning, for example, to anticipate a following reversal or continuation.
Sharpe Ratio ScreenerThe original code was created by tim_amblard , and the modifications were made by Mr_Rakun for the purpose of adapting the script into a screener format.
The Sharpe ratio is a popular metric used to measure the risk-adjusted return of an asset or portfolio, which allows traders and investors to assess whether the returns they are receiving are worth the risk they are taking. In this script, the Sharpe ratio is calculated over a 180-day period (approximately 6 months), and several valuation zones are defined based on the ratio to help assess whether an asset is overvalued, undervalued, or critically undervalued.
Key Features:
1. Risk-Free Rate Input: The user can define the risk-free rate (usually the return of government bonds or a similar safe asset) for Sharpe ratio calculation.
2. Lookback Period (180 Days): The default lookback period is set to 180 days (approximately 6 months) to calculate the mean and standard deviation of the asset’s daily returns.
3. Valuation Zones:
• Overvalued Zone: If the Sharpe ratio is greater than 5.
• Undervalued Zone: If the Sharpe ratio is between -1 and 5.
• Critically Undervalued Zone: If the Sharpe ratio is below -3.
• Neutral Zone: If the Sharpe ratio does not meet any of the above conditions.
4. Table View: The script pulls a list of symbols from the user (e.g., cryptocurrency or stock tickers) and displays their latest price, Sharpe ratio, and whether they are in an overvalued, undervalued, or neutral zone in a table format.
5. Custom Symbol Input: The user can input a list of symbols (separated by commas) to track.
6. Daily Timeframe Check: The script warns the user to ensure they are using a daily timeframe, as this indicator is designed specifically for it.
How It Works:
• The script calculates the daily returns for each symbol over the specified lookback period.
• It then calculates the mean and standard deviation of the returns to derive the Sharpe ratio.
• The Sharpe ratio is annualized, and it’s compared to the defined thresholds to categorize the symbol into different valuation zones.
• A table is generated on the chart to show the symbols, their current prices, and their Sharpe ratios, with color-coded background to easily identify whether they are overvalued (red), undervalued (green), or critically undervalued (blue).
This tool is useful for screening multiple assets for their Sharpe ratio to find investment opportunities with optimal risk-adjusted returns.
Original code credit: This code was originally written by tim_amblard and modified by Mr_Rakun for use as a screener.
Türkçe Açıklama:
Orijinal kod tim_amblard tarafından yazılmıştır ve Mr_Rakun tarafından, bu script’in tarayıcı formatına dönüştürülmesi amacıyla değiştirilmiştir.
Sharpe oranı, bir varlığın veya portföyün risk düzeltilmiş getirisini ölçmek için yaygın olarak kullanılan bir metriktir. Bu metrik, yatırımcıların aldıkları risk karşılığında aldıkları getirinin ne kadar verimli olduğunu değerlendirmelerine olanak tanır. Bu script’te, Sharpe oranı 180 günlük bir periyot (yaklaşık 6 ay) boyunca hesaplanır ve oranı baz alarak varlıkların değerleme bölgeleri tanımlanır: aşırı değerli, değerli ve kritik şekilde değersiz.
Ana Özellikler:
1. Risk-Free Rate (Risk-Free Oranı) Girişi: Kullanıcı, Sharpe oranı hesaplaması için risk-free (risksiz) oranı (genellikle devlet tahvilleri veya benzeri güvenli bir varlık getirisi) tanımlayabilir.
2. Lookback (Geribildirim) Periyodu (180 Gün): Varsayılan geribildirim periyodu, varlığın günlük getirilerinin ortalama ve standart sapmalarını hesaplamak için 180 gün (yaklaşık 6 ay) olarak ayarlanmıştır.
3. Değerleme Bölgeleri:
• Aşırı Değerli Bölge: Sharpe oranı 5’ten büyükse.
• Değerli Bölge: Sharpe oranı -1 ile 5 arasında ise.
• Kritik Derecede Değersiz Bölge: Sharpe oranı -3’ten küçükse.
• Nötr Bölge: Sharpe oranı yukarıdaki hiçbir koşulu karşılamıyorsa.
4. Tablo Görünümü: Script, kullanıcıdan alınan semboller listesine göre (örneğin, kripto para veya hisse senedi sembolleri) her bir sembolün son fiyatını, Sharpe oranını ve değerleme bölgesini tablo şeklinde gösterir.
5. Özel Sembol Girişi: Kullanıcı, izlemek istediği semboller listesini (virgülle ayrılmış) girebilir.
6. Günlük Zaman Çerçevesi Kontrolü: Script, kullanıcının doğru sonuçlar almak için günlük zaman çerçevesinde işlem yapması gerektiğini hatırlatır.
Nasıl Çalışır:
• Script, her sembol için belirtilen geribildirim periyodu boyunca günlük getirileri hesaplar.
• Ardından, getirilerin ortalama ve standart sapmasını hesaplayarak Sharpe oranını çıkarır.
• Sharpe oranı yıllıklaştırılır ve tanımlanan eşiklerle karşılaştırılarak sembol, farklı değerleme bölgelerine kategorize edilir.
• Grafik üzerinde, semboller, mevcut fiyatları ve Sharpe oranları gösteren bir tablo oluşturulur. Bu tablo, hangi sembollerin aşırı değerli (kırmızı), değerli (yeşil) veya kritik derecede değersiz (mavi) olduğunu kolayca görmek için renk kodlu arka planlar kullanır.
Bu araç, yatırım fırsatlarını daha verimli bir şekilde değerlendirebilmek için risk düzeltilmiş getiri açısından optimal fırsatları bulmak için birden fazla varlığın Sharpe oranlarını taramak için kullanışlıdır.
ATR Percentages BoxThis custom indicator provides a quick visual reference for volatility-based price ranges, directly on your TradingView charts. It calculates and displays three ranges derived from the Daily Average True Range (ATR) with a standard 14-period setting:
5 Min (3% ATR): Ideal for very short-term scalping and quick intraday moves.
1 Hour (5% ATR): Useful for hourly setups, short-term trades, and intraday volatility assessment.
Day (10% ATR): Perfect for daily volatility context, swing trades, or placing stops and targets.
The ranges are clearly shown in a compact box at the top-right corner, providing traders immediate insights into realistic price movements, helping to optimise entries, stops, and profit targets efficiently.
Dynamic Price ImpulseThis indicator is designed to capture price momentum without the lag typically found in traditional oscillators.
Core Mechanics
Instead of using simple price differences, the indicator normalizes changes relative to the average true range (ATR), making it adaptive to different volatility regimes.
By squaring the normalized change while preserving its sign, the indicator responds more aggressively to stronger price moves while remaining sensitive to smaller ones.
The indicator identifies periods when volatility is expanding, which often precede significant price movements.
Trading Strategy Applications
1. Momentum Signals:
o When the indicator crosses above zero, look for long entries
o When it crosses below zero, look for short entries
o The stronger the impulse (farther from zero), the stronger the signal
2. Early Trend Detection:
o Volatility expansion markers (yellow circles) often appear at the beginning of new trends
o Use these as early warning signals to prepare for potential entries
3. Trend Continuation:
o Strong readings in the direction of the trend suggest continuation
o Weakening readings suggest the trend may be losing steam
4. Counter-Trend Opportunities:
o Look for divergences between price and the indicator for potential reversals
o When price makes a new high but the indicator doesn't, consider potential shorts (and vice versa)
Fine-Tuning
• Length (14): Controls the lookback period for ATR calculation. Lower values make it more responsive but noisier.
• Threshold (1.5): Determines how much volatility needs to expand to trigger the volatility expansion signal.
• Smoothing (3): Reduces noise in the signal. Higher values reduce false signals but introduce more lag.
MSB BOS Market Structure [FTB]Track Market Structure Breaks (MSB) and Breaks of Structure (BOS) on your charts. This indicator does exactly that without clutter and with easy-to-spot.
🔑 Features:
MSB (Market Structure Break): Shows when price flips and breaks the previous high/low — possible start of a new trend.
BOS (Break of Structure): Highlights key structural breakouts in line with the existing trend.
✅ Pivot-Based Analysis (Body Focused)
Uses candle body-based pivot highs and lows to find clean market structure points (no wicks confusion here!).
Adjustable pivot strength — control how many candles you want on either side to define a swing.
✅ Clean Visual Markings
MSB and BOS lines with optional labels so you see exactly where breaks happen.
Customizable line style (Solid, Dashed, Dotted) to match your chart aesthetic.
Optional pivot markers to show minor swing highs/lows.
✅ Alerts Ready
Set alerts for any MSB or BOS, or filter to specific bullish/bearish breaks — never miss a key level again
💡 How to Use This Indicator:
Identify Trend Shifts: Use MSB to spot early trend reversals — when a previous structure breaks against the trend.
Catch Continuations: Watch for BOS to confirm trend continuation — great for riding the trend!
⚙️ Settings You Can Adjust:
Pivot Strength: How many candles to look back and forward for swing points (default: 3).
Show Pivots: Optional — highlight swing highs and lows for extra clarity.
FTB Smart Trader System — Market Maker Levels, EMAs & VectorsThe FTB Trade Engine is an indicator suite I built for myself as a crypto trader. It's designed specifically for trading Institution levels, EMAs, PVSRA Volume Candles, and Session Timings. It helps me spot high probability trade setups without overcomplicating things.
🔑 Features of this Indicator
📌 🔥 Key Session Levels (extend lines in settings as needed)
✅ Weekly High & Low (HOW/LOW) — Automatically plots the previous week's high and low
✅ Daily High & Low (HOD/LOD) — Marks the prior day's range
✅ Asia Session High & Low — Plots the Asian session’s high and low, helping you detect potential breakouts or fakeouts, as Asia often sets the initial high and low of the day.
✅ 50% Asia Level — Automatically calculates and displays the midpoint between Asia’s high and low, an important level for intraday trading.
📌 🔥 Advanced EMA Suite
✅ Includes 10, 20, 50, 200, and 800 EMAs — providing key zones of support, resistance, and trend direction.
👀 Good to know: the break of the 50EMA WITH a vector candle is significant for reversals.
📌 🔥 PVSRA Candles
(👀 IMPORTANT: To properly view PVSRA candles, make sure to UNCHECK all default candle settings — Color Bars, Body, Borders, and Wick — in your chart's candle settings.)
✅ Price, Volume, Support & Resistance Analysis (PVSRA) Candles — These special candles combine price action with volume analysis, color-coded to highlight areas potentially influenced by market makers, institutions, and large players. Perfect for identifying key volume zones and quickly analyzing any coin or pair without switching tools.
Candle Colors Explained:
Bullish Candles:
🟢 Green — 200% increase in volume on bullish moves (strong buyer presence).
🔵 Blue — 150% increase in bullish volume, but may also indicate fatigue or possible reversal.
⚪ White — Normal bullish volume (standard green candles).
Bearish Candles:
🔴 Red — 200% increase in bearish volume compared to the last 10 candles (strong selling).
🟣 Magenta — 150% increase in bearish volume, signaling possible continuation or exhaustion.
⚫ Gray — Normal bearish volume (standard red candles).
Triple Doji SequenceThe Triple Doji Sequence indicator helps traders identify consecutive Doji candlestick patterns, allowing them to choose between spotting single, double, or triple Dojis. A Doji is detected when the candle's body is small relative to its wicks, with either the upper or lower wick being significantly larger. Users can customize their own Doji criteria by adjusting the body size and wick dominance settings. The indicator ensures that consecutive Dojis align in the same direction before confirming a valid pattern, making it easier to identify market indecision or potential trend reversals.
When the chosen Doji sequence is detected, the indicator plots a star (*) above bearish Dojis (upper wick dominant) and below bullish Dojis (lower wick dominant). It also sends alerts when a valid sequence is confirmed at the close of the bar. This tool helps traders refine their strategy by spotting repeated Doji formations, which may indicate key turning points or continuation patterns in price action.
How to Use the Triple Doji Sequence Indicator?
Apply the Indicator:
Add the Triple Doji Sequence indicator to your TradingView chart.
It will automatically scan for Doji patterns based on your settings.
Customize Your Doji Criteria:
Adjust the body size and wick dominance settings to define what qualifies as a Doji.
Choose whether to detect single, double, or triple Doji sequences.
Interpret the Signals:
A star (*) above a candle signals a bearish Doji (upper wick dominant).
A star (*) below a candle signals a bullish Doji (lower wick dominant).
Set Up Alerts:
Enable alerts to receive notifications when a Doji sequence is confirmed at bar close.
Choose alert frequency based on your trading strategy (e.g., once per bar, once per bar close).
Use in Trading Strategy:
Doji sequences can indicate trend reversals or market indecision.
Combine this indicator with support/resistance levels, volume, or other indicators to confirm signals.
PS: Good luck in finding a Triple Doji :)
Volatility BandsThe Volatility Bands script is a custom indicator designed to help traders visualize volatility levels in the market. It calculates dynamic bands around a central moving average, providing insights into potential support and resistance levels based on recent price action.
The script calculates multiple volatility bands (u0, u1, u2, d0, d1, d2) that adjust based on recent price movements. The outer bands (u2 and d2) represent extreme volatility levels, while the inner bands (u0, u1, d0, d1) indicate more immediate support and resistance.
Look for price reactions at the band levels. A touch of the upper bands may indicate overbought conditions, while a touch of the lower bands may indicate oversold conditions.
Central Moving Average: A smoothed moving average that adapts to price changes, providing a clear trend direction.
The script has no input parameters.
Script Functions:
erf(x): Calculates the error function for a given input x. Used in the calculation of the smoothing factor for the UMA.
uma(input): Provides a smoothed average that adapts to recent price changes, reducing lag compared to traditional moving averages.
dev(input, mu): Used to calculate the volatility bands around the central moving average.
MTF ATR BandsA simple but effective MTF ATR bands indicator.
The script calculate and display ATR bands low and high of the current timeframe using high, low inputs and an RMA moving average, adding to it ATR of the period multiplied with the user multiplier, default is set to 1.5.
Than is calculated a smoothed average of the range and the color of it based on its slope, same color is used to fill the atr bands.
Than the higher timeframe bands are calculated and displayed on the chart.
How can be used ?
The higher timeframe average and bands can give you long term direction of the trend and the current timeframes moving average and filling short term trend, for example using the 15 min chart with a 4h HTF bands, or an 1h with a daily, or a daily with an weekly or weekly with bi-monthly atr bands.
Also can be used as a stop loss indicator.
Hope you will like it, any question send me a PM.
Clustering Volatility (ATR-ADR-ChaikinVol) [Sam SDF-Solutions]The Clustering Volatility indicator is designed to evaluate market volatility by combining three widely used measures: Average True Range (ATR), Average Daily Range (ADR), and the Chaikin Oscillator.
Each indicator is normalized using one of the available methods (MinMax, Rank, or Z-score) to create a unified metric called the Score. This Score is further smoothed with an Exponential Moving Average (EMA) to reduce noise and provide a clearer view of market conditions.
Key Features:
Multi-Indicator Integration: Combines ATR, ADR, and the Chaikin Oscillator into a single Score that reflects overall market volatility.
Flexible Normalization: (Supports three normalization methods)
MinMax: Scales values between the observed minimum and maximum.
Rank: Normalizes based on the relative rank within a moving window.
Z-score: Standardizes values using mean and standard deviation.
Dynamic Window Selection: Offers an automatic window selection option based on a specified lookback period, or a fixed window size can be used.
Customizable Weights: Allows the user to assign individual weights to ATR, ADR, and the Chaikin Oscillator. Optionally, weights can be normalized to sum to 1.
Score Smoothing: Applies an EMA to the computed Score to smooth out short-term fluctuations and reduce market noise.
Cluster Visualization: Divides the smoothed Score into a number of clusters, each represented by a distinct color. These colors can be applied to the price bars (if enabled) for an immediate visual indication of the current volatility regime.
How It Works:
Input & Window Setup: Users set parameters for indicator periods, normalization methods, weights, and window size. The indicator can automatically determine the analysis window based on the number of lookback days.
Calculation of Metrics: The indicator computes the ATR, ADR (as the average of bar ranges), and the Chaikin Oscillator (based on the difference between short and long EMAs of the Accumulation/Distribution line).
Normalization & Scoring: Each indicator’s value is normalized and then weighted to form a raw Score. This raw Score is scaled to a range using statistics from the chosen window.
Smoothing & Clustering: The raw Score is smoothed using an EMA. The resulting smoothed Score is then multiplied by the number of clusters to assign a cluster index, which is used to choose a color for visual signals.
Visualization: The smoothed Score is plotted on the chart with a color that changes based on its value (e.g., lime for low, red for high, yellow for intermediate values). Optionally, the price bars are colored according to the assigned cluster.
_____________
This indicator is ideal for traders seeking a quick and clear assessment of market volatility. By integrating multiple volatility measures into one comprehensive Score, it simplifies analysis and aids in making more informed trading decisions.
For more detailed instructions, please refer to the guide here:
Clustering & Divergences (RSI-Stoch-CCI) [Sam SDF-Solutions]The Clustering & Divergences (RSI-Stoch-CCI) indicator is a comprehensive technical analysis tool that consolidates three popular oscillators—Relative Strength Index (RSI), Stochastic, and Commodity Channel Index (CCI)—into one unified metric called the Score. This Score offers traders an aggregated view of market conditions, allowing them to quickly identify whether the market is oversold, balanced, or overbought.
Functionality:
Oscillator Clustering: The indicator calculates the values of RSI, Stochastic, and CCI using user-defined periods. These oscillator values are then normalized using one of three available methods: MinMax, Z-Score, or Z-Bins.
Score Calculation: Each normalized oscillator value is multiplied by its respective weight (which the user can adjust), and the weighted values are summed to generate an overall Score. This Score serves as a single, interpretable metric representing the combined oscillator behavior.
Market Clustering: The indicator performs clustering on the Score over a configurable window. By dividing the Score range into a set number of clusters (also configurable), the tool visually represents the market’s state. Each cluster is assigned a unique color so that traders can quickly see if the market is trending toward oversold, balanced, or overbought conditions.
Divergence Detection: The script automatically identifies both Regular and Hidden divergences between the price action and the Score. By using pivot detection on both price and Score data, the indicator marks potential reversal signals on the chart with labels and connecting lines. This helps in pinpointing moments when the price and the underlying oscillator dynamics diverge.
Customization Options: Users have full control over the indicator’s behavior. They can adjust:
The periods for each oscillator (RSI, Stochastic, CCI).
The weights applied to each oscillator in the Score calculation.
The normalization method and its manual boundaries.
The number of clusters and whether to invert the cluster order.
Parameters for divergence detection (such as pivot sensitivity and the minimum/maximum bar distance between pivots).
Visual Enhancements:
Depending on the user’s preference, either the Score or the Cluster Index (derived from the clustering process) is plotted on the chart. Additionally, the script changes the color of the price bars based on the identified cluster, providing an at-a-glance visual cue of the current market regime.
Logic & Methodology:
Input Parameters: The script starts by accepting user inputs for clustering settings, oscillator periods, weights, divergence detection, and manual boundary definitions for normalization.
Oscillator Calculation & Normalization: It computes RSI, Stochastic, and CCI values from the price data. These values are then normalized using either the MinMax method (scaling between a lower and upper band) or the Z-Score method (standardizing based on mean and standard deviation), or using Z-Bins for an alternative scaling approach.
Score Computation: Each normalized oscillator is multiplied by its corresponding weight. The sum of these products results in the overall Score that represents the combined oscillator behavior.
Clustering Algorithm: The Score is evaluated over a moving window to determine its minimum and maximum values. Using these values, the script calculates a cluster index that divides the Score into a predefined number of clusters. An option to invert the cluster calculation is provided to adjust the interpretation of the clustering.
Divergence Analysis: The indicator employs pivot detection (using left and right bar parameters) on both the price and the Score. It then compares recent pivot values to detect regular and hidden divergences. When a divergence is found, the script plots labels and optional connecting lines to highlight these key moments on the chart.
Plotting: Finally, based on the user’s selection, the indicator plots either the Score or the Cluster Index. It also overlays manual boundary lines (for the chosen normalization method) and adjusts the bar colors according to the cluster to provide clear visual feedback on market conditions.
_________
By integrating multiple oscillator signals into one cohesive tool, the Clustering & Divergences (RSI-Stoch-CCI) indicator helps traders minimize subjective analysis. Its dynamic clustering and automated divergence detection provide a streamlined method for assessing market conditions and potentially enhancing the accuracy of trading decisions.
For further details on using this indicator, please refer to the guide available at:
AI Adaptive Oscillator [PhenLabs]📊 Algorithmic Adaptive Oscillator
Version: PineScript™ v6
📌 Description
The AI Adaptive Oscillator is a sophisticated technical indicator that employs ensemble learning and adaptive weighting techniques to analyze market conditions. This innovative oscillator combines multiple traditional technical indicators through an AI-driven approach that continuously evaluates and adjusts component weights based on historical performance. By integrating statistical modeling with machine learning principles, the indicator adapts to changing market dynamics, providing traders with a responsive and reliable tool for market analysis.
🚀 Points of Innovation:
Ensemble learning framework with adaptive component weighting
Performance-based scoring system using directional accuracy
Dynamic volatility-adjusted smoothing mechanism
Intelligent signal filtering with cooldown and magnitude requirements
Signal confidence levels based on multi-factor analysis
🔧 Core Components
Ensemble Framework : Combines up to five technical indicators with performance-weighted integration
Adaptive Weighting : Continuous performance evaluation with automated weight adjustment
Volatility-Based Smoothing : Adapts sensitivity based on current market volatility
Pattern Recognition : Identifies potential reversal patterns with signal qualification criteria
Dynamic Visualization : Professional color schemes with gradient intensity representation
Signal Confidence : Three-tiered confidence assessment for trading signals
🔥 Key Features
The indicator provides comprehensive market analysis through:
Multi-Component Ensemble : Integrates RSI, CCI, Stochastic, MACD, and Volume-weighted momentum
Performance Scoring : Evaluates each component based on directional prediction accuracy
Adaptive Smoothing : Automatically adjusts based on market volatility
Pattern Detection : Identifies potential reversal patterns in overbought/oversold conditions
Signal Filtering : Prevents excessive signals through cooldown periods and minimum change requirements
Confidence Assessment : Displays signal strength through intuitive confidence indicators (average, above average, excellent)
🎨 Visualization
Gradient-Filled Oscillator : Color intensity reflects strength of market movement
Clear Signal Markers : Distinct bullish and bearish pattern signals with confidence indicators
Range Visualization : Clean representation of oscillator values from -6 to 6
Zero Line : Clear demarcation between bullish and bearish territory
Customizable Colors : Color schemes that can be adjusted to match your chart style
Confidence Symbols : Intuitive display of signal confidence (no symbol, +, or ++) alongside direction markers
📖 Usage Guidelines
⚙️ Settings Guide
Color Settings
Bullish Color
Default: #2b62fa (Blue)
This setting controls the color representation for bullish movements in the oscillator. The color appears when the oscillator value is positive (above zero), with intensity indicating the strength of the bullish momentum. A brighter shade indicates stronger bullish pressure.
Bearish Color
Default: #ce9851 (Amber)
This setting determines the color representation for bearish movements in the oscillator. The color appears when the oscillator value is negative (below zero), with intensity reflecting the strength of the bearish momentum. A more saturated shade indicates stronger bearish pressure.
Signal Settings
Signal Cooldown (bars)
Default: 10
Range: 1-50
This parameter sets the minimum number of bars that must pass before a new signal of the same type can be generated. Higher values reduce signal frequency and help prevent overtrading during choppy market conditions. Lower values increase signal sensitivity but may generate more false positives.
Min Change For New Signal
Default: 1.5
Range: 0.5-3.0
This setting defines the minimum required change in oscillator value between consecutive signals of the same type. It ensures that new signals represent meaningful changes in market conditions rather than minor fluctuations. Higher values produce fewer but potentially higher-quality signals, while lower values increase signal frequency.
AI Core Settings
Base Length
Default: 14
Minimum: 2
This fundamental setting determines the primary calculation period for all technical components in the ensemble (RSI, CCI, Stochastic, etc.). It represents the lookback window for each component’s base calculation. Shorter periods create a more responsive but potentially noisier oscillator, while longer periods produce smoother signals with potential lag.
Adaptive Speed
Default: 0.1
Range: 0.01-0.3
Controls how quickly the oscillator adapts to new market conditions through its volatility-adjusted smoothing mechanism. Higher values make the oscillator more responsive to recent price action but potentially more erratic. Lower values create smoother transitions but may lag during rapid market changes. This parameter directly influences the indicator’s adaptiveness to market volatility.
Learning Lookback Period
Default: 150
Minimum: 10
Determines the historical data range used to evaluate each ensemble component’s performance and calculate adaptive weights. This setting controls how far back the AI “learns” from past performance to optimize current signals. Longer periods provide more stable weight distribution but may be slower to adapt to regime changes. Shorter periods adapt more quickly but may overreact to recent anomalies.
Ensemble Size
Default: 5
Range: 2-5
Specifies how many technical components to include in the ensemble calculation.
Understanding The Interaction Between Settings
Base Length and Learning Lookback : The base length determines the reactivity of individual components, while the lookback period determines how their weights are adjusted. These should be balanced according to your timeframe - shorter timeframes benefit from shorter base lengths, while the lookback should generally be 10-15 times the base length for optimal learning.
Adaptive Speed and Signal Cooldown : These settings control sensitivity from different angles. Increasing adaptive speed makes the oscillator more responsive, while reducing signal cooldown increases signal frequency. For conservative trading, keep adaptive speed low and cooldown high; for aggressive trading, do the opposite.
Ensemble Size and Min Change : Larger ensembles provide more stable signals, allowing for a lower minimum change threshold. Smaller ensembles might benefit from a higher threshold to filter out noise.
Understanding Signal Confidence Levels
The indicator provides three distinct confidence levels for both bullish and bearish signals:
Average Confidence (▲ or ▼) : Basic signal that meets the minimum pattern and filtering criteria. These signals indicate potential reversals but with moderate confidence in the prediction. Consider using these as initial alerts that may require additional confirmation.
Above Average Confidence (▲+ or ▼+) : Higher reliability signal with stronger underlying metrics. These signals demonstrate greater consensus among the ensemble components and/or stronger historical performance. They offer increased probability of successful reversals and can be traded with less additional confirmation.
Excellent Confidence (▲++ or ▼++) : Highest quality signals with exceptional underlying metrics. These signals show strong agreement across oscillator components, excellent historical performance, and optimal signal strength. These represent the indicator’s highest conviction trade opportunities and can be prioritized in your trading decisions.
Confidence assessment is calculated through a multi-factor analysis including:
Historical performance of ensemble components
Degree of agreement between different oscillator components
Relative strength of the signal compared to historical thresholds
✅ Best Use Cases:
Identify potential market reversals through oscillator extremes
Filter trade signals based on AI-evaluated component weights
Monitor changing market conditions through oscillator direction and intensity
Confirm trade signals from other indicators with adaptive ensemble validation
Detect early momentum shifts through pattern recognition
Prioritize trading opportunities based on signal confidence levels
Adjust position sizing according to signal confidence (larger for ++ signals, smaller for standard signals)
⚠️ Limitations
Requires sufficient historical data for accurate performance scoring
Ensemble weights may lag during dramatic market condition changes
Higher ensemble sizes require more computational resources
Performance evaluation quality depends on the learning lookback period length
Even high confidence signals should be considered within broader market context
💡 What Makes This Unique
Adaptive Intelligence : Continuously adjusts component weights based on actual performance
Ensemble Methodology : Combines strength of multiple indicators while minimizing individual weaknesses
Volatility-Adjusted Smoothing : Provides appropriate sensitivity across different market conditions
Performance-Based Learning : Utilizes historical accuracy to improve future predictions
Intelligent Signal Filtering : Reduces noise and false signals through sophisticated filtering criteria
Multi-Level Confidence Assessment : Delivers nuanced signal quality information for optimized trading decisions
🔬 How It Works
The indicator processes market data through five main components:
Ensemble Component Calculation :
Normalizes traditional indicators to consistent scale
Includes RSI, CCI, Stochastic, MACD, and volume components
Adapts based on the selected ensemble size
Performance Evaluation :
Analyzes directional accuracy of each component
Calculates continuous performance scores
Determines adaptive component weights
Oscillator Integration :
Combines weighted components into unified oscillator
Applies volatility-based adaptive smoothing
Scales final values to -6 to 6 range
Signal Generation :
Detects potential reversal patterns
Applies cooldown and magnitude filters
Generates clear visual markers for qualified signals
Confidence Assessment :
Evaluates component agreement, historical accuracy, and signal strength
Classifies signals into three confidence tiers (average, above average, excellent)
Displays intuitive confidence indicators (no symbol, +, ++) alongside direction markers
💡 Note:
The AI Adaptive Oscillator performs optimally when used with appropriate timeframe selection and complementary indicators. Its adaptive nature makes it particularly valuable during changing market conditions, where traditional fixed-weight indicators often lose effectiveness. The ensemble approach provides a more robust analysis by leveraging the collective intelligence of multiple technical methodologies. Pay special attention to the signal confidence indicators to optimize your trading decisions - excellent (++) signals often represent the most reliable trade opportunities.