Normalised Volume Oscillator [BackQuant]Normalised Volume Oscillator
A refined evolution of the Klinger Volume Oscillator, rebuilt for clarity, precision, and adaptability. This tool normalizes volume-driven momentum into a bounded scale so you can easily identify shifts in accumulation and distribution across any asset or timeframe, while keeping readings comparable between markets.
What this indicator does
The Normalised Volume Oscillator quantifies the balance between buying and selling pressure using the Klinger Volume Oscillator (KVO) as its base, then rescales it dynamically into a normalized range between -0.5 and +0.5. This normalization allows traders to interpret relative strength and exhaustion in volume flow, rather than dealing with raw unbounded values that differ across symbols.
It is a momentum-volume hybrid that reveals the strength of trend participation: when buyers dominate, normalized readings rise toward +0.5; when sellers dominate, they fall toward -0.5. The midline (0) acts as an equilibrium between accumulation and distribution.
Core components
Klinger Volume Oscillator: The foundation of this indicator, combining volume with price trend direction to measure long-term money flow relative to short-term movement.
Normalization process: The raw KVO is scaled over a user-defined Normalisation Period , computing `(KVO - lowest) / (highest - lowest) - 0.5`. This centers all readings around zero, allowing overbought/oversold detection independent of asset volatility or volume magnitude.
Signal moving average: The normalized KVO is smoothed with a user-selectable moving average type—SMA, EMA, DEMA, TEMA, HMA, ALMA, and others. This becomes the signal line for confirmation of trend direction or mean-reversion setups.
How it works conceptually
1. The KVO detects when volume supports price movement (bullish) or diverges from it (bearish).
2. The script normalizes the raw KVO so that relative magnitude is consistent—what is “strong buying pressure” looks the same on BTCUSD as it does on AAPL.
3. Overbought and oversold regions are derived statistically, rather than from arbitrary values, based on percentile zones around ±0.4 and ±0.5.
4. The oscillator is optionally combined with a moving average to help identify crossovers, momentum shifts, and divergence confirmation.
How to interpret it
Above 0: Indicates dominant buying pressure and likely continuation of upward momentum.
Below 0: Suggests dominant selling pressure and potential continuation of downward movement.
Crosses of 0: Often mark transitions between accumulation and distribution phases.
+0.4 to +0.5 zone: Overbought region where buying intensity is stretched; watch for deceleration or divergence.
[-0.4 to -0.5 zone: Oversold region indicating panic or exhaustion in selling.
Signal-line crossover: A traditional momentum confirmation method; when the normalized KVO crosses above its moving average, buyers regain control, and vice versa.
Why normalization matters
Typical volume oscillators are asset-specific—what is considered “high” volume for one symbol is not the same for another. By dynamically normalizing KVO values within a rolling lookback, this version transforms raw amplitude into a standardized scale. This means you can:
Compare multiple assets objectively.
Set consistent alert thresholds for overbought/oversold regions.
Avoid misleading interpretations from absolute oscillator values.
Customization and UI
Moving Average Type & Period: Select your preferred smoothing method (SMA, EMA, TEMA, etc.) and adjust its period to tune sensitivity.
Normalisation Period: Defines how many bars the KVO range is measured over; shorter periods adapt faster, longer ones smooth more.
Visual Toggles:
* Show Oscillator : enables or hides the core histogram.
* Show Moving Average : adds a smoothed overlay for signal confirmation.
* Paint Candles : optional color overlay for chart candles based on oscillator direction.
* Show Static Levels : displays ±0.4 and ±0.5 zones for overbought/oversold boundaries.
How to use it
Trend confirmation: Use midline (0) crossovers as confirmation of emerging trend shifts—cross above 0 suggests a new bullish phase, cross below 0 a bearish one.
Reversal spotting: Look for normalized readings reaching ±0.5 and flattening, or diverging against price extremes.
Divergence analysis: When price makes a new high but the normalized oscillator fails to, it signals waning buying conviction (and vice versa for lows).
Multi-timeframe integration: Works best alongside higher timeframe trend filters or moving averages; normalization makes this consistent.
Alerts
Prebuilt alert conditions allow quick automation:
Midline crossovers (0): transition between accumulation and distribution.
Overbought (+0.4) and Oversold (-0.4) triggers for potential exhaustion.
Signal moving-average crosses for confirmation entries.
Tips for use
Combine with price structure—don’t fade every overbought/oversold reading; confirm with break of structure or candle patterns.
Use longer normalization periods for position trading, shorter for intraday analysis.
In choppy markets, treat 0-line oscillations as noise filters, not trade triggers.
Summary
The Normalised Volume Oscillator modernizes the classic Klinger Volume Oscillator by normalizing its readings into a standardized range. This makes it more adaptive across assets and timeframes, improves interpretability, and provides intuitive, data-driven overbought/oversold levels. Whether used standalone or as a confirmation layer, it offers a clearer view of volume dynamics—revealing when markets are truly being accumulated, distributed, or stretched beyond their sustainable extremes.
M-oscillator
ATR Trend + RSI Pullback Strategy [Profit-Focused]This strategy is designed to catch high-probability pullbacks during strong trends using a combination of ATR-based volatility filters, RSI exhaustion levels, and a trend-following entry model.
Strategy Logic
Rather than relying on lagging crossovers, this model waits for RSI to dip into oversold zones (below 40) while price remains above a long-term EMA (default: 200). This setup captures pullbacks in strong uptrends, allowing traders to enter early in a move while controlling risk dynamically.
To avoid entries during low-volatility conditions or sideways price action, it applies a minimum ATR filter. The ATR also defines both the stop-loss and take-profit levels, allowing the model to adapt to changing market conditions.
Exit logic includes:
A take-profit at 3× the ATR distance
A stop-loss at 1.5× the ATR distance
An optional early exit if RSI crosses above 70, signaling overbought conditions
Technical Details
Trend Filter: 200 EMA – must be rising and price must be above it
Entry Signal: RSI dips below 40 during an uptrend
Volatility Filter: ATR must be above a user-defined minimum threshold
Stop-Loss: 1.5× ATR below entry price
Take-Profit: 3.0× ATR above entry price
Exit on Overbought: RSI > 70 (optional early exit)
Backtest Settings
Initial Capital: $10,000
Position Sizing: 5% of equity per trade
Slippage: 1 tick
Commission: 0.075% per trade
Trade Direction: Long only
Timeframes Tested: 15m, 1H, and 30m on trending assets like BTCUSD, NAS100, ETHUSD
This model is tuned for positive P&L across trending environments and volatile markets.
Educational Use Only
This strategy is for educational purposes only and should not be considered financial advice. Past performance does not guarantee future results. Always validate performance on multiple markets and timeframes before using it in live trading.
Trade The Matric / MACD-RSI Hybrid Candles**"MACD-RSI Hybrid Candles"** is a **custom TradingView Pine Script (v6)** indicator that **replaces your chart’s default candles** with **dynamically colored, intensity-adjusted candles** based on **combined MACD and RSI signals**.
It’s a **visual fusion** of:
- **MACD Histogram** → Momentum & Trend Strength
- **RSI** → Overbought/Oversold & Trend Confirmation
- **Dynamic Transparency** → Visualizes **signal strength**
The result? **At-a-glance confirmation of bullish/bearish phases** — no need to check subcharts.
---
## OVERVIEW: What This Indicator Does
| Feature | Purpose |
|-------|--------|
| **Replaces price candles** | Entire chart becomes a **live MACD-RSI signal map** |
| **Colors based on dual confirmation** | Only strong when **both** MACD and RSI agree |
| **Transparency = momentum intensity** | Brighter = stronger signal |
| **Labels & Alerts** | Highlights **phase changes** (bullish/bearish shifts) |
---
## USER INPUTS (Customizable)
| Input | Default | Description |
|------|--------|-----------|
| `fastLen` | 12 | MACD Fast EMA |
| `slowLen` | 26 | MACD Slow EMA |
| `signalLen` | 9 | MACD Signal Line |
| `rsiLen` | 14 | RSI Period |
| `showLabels` | true | Show "Bullish Phase" / "Bearish Phase" labels |
> Standard settings — tweak for sensitivity.
---
## CORE CALCULATIONS
### 1. **MACD**
```pinescript
macdLine = ta.ema(close, fastLen) - ta.ema(close, slowLen)
signalLine = ta.ema(macdLine, signalLen)
hist = macdLine - signalLine
```
- `hist > 0` → **Bullish momentum**
- `hist < 0` → **Bearish momentum**
### 2. **RSI**
```pinescript
rsi = ta.rsi(close, rsiLen)
```
- `rsi > 50` → **Bullish bias**
- `rsi < 50` → **Bearish bias**
---
## DUAL CONFIRMATION LOGIC
| Condition | Meaning |
|--------|--------|
| `bullCond = macdBull and rsiBull` | **MACD hist > 0** AND **RSI > 50** → **Confirmed Bullish** |
| `bearCond = macdBear and rsiBear` | **MACD hist < 0** AND **RSI < 50** → **Confirmed Bearish** |
| Otherwise | **Neutral / Conflicted** |
> Only **strong, aligned signals** get bright colors.
---
## DYNAMIC INTENSITY & TRANSPARENCY (Key Feature)
```pinescript
maxHist = ta.highest(math.abs(hist), 100)
intensity = math.abs(hist) / maxHist
transp = 90 - (intensity * 80)
```
### How It Works:
1. Finds **strongest MACD histogram value** in last 100 bars
2. Compares **current histogram** to that peak → `intensity` (0 to 1)
3. **Transparency scales from 90 (faint) → 10 (bright)**
| Intensity | Transparency | Visual Effect |
|---------|--------------|-------------|
| 0% (weak) | 90 | Almost transparent |
| 50% | 50 | Medium |
| 100% | 10 | **Vivid, bold candle** |
> **Brighter candle = stronger momentum relative to recent history**
---
## CANDLE COLOR LOGIC
| Condition | Candle & Wick Color | Transparency |
|--------|---------------------|------------|
| **Confirmed Bullish** (`bullCond`) | **Lime Green** | Dynamic (10–90) |
| **Confirmed Bearish** (`bearCond`) | **Red** | Dynamic (10–90) |
| **Neutral / Conflicted** | **Gray** | Fixed 80 (faint) |
> **Wicks and borders match body** → full candle takeover
---
## VISUAL OUTPUT
### 1. **Custom Candles**
```pinescript
plotcandle(open, high, low, close, color=barColor, wickcolor=barColor, bordercolor=barColor)
```
- **Replaces default chart candles**
- **No original candles visible**
### 2. **Labels (Optional)**
- **"Bullish Phase"** → Green label **below low** when:
- MACD histogram **crosses above zero**
- AND RSI **> 50**
- **"Bearish Phase"** → Red label **above high** when:
- MACD histogram **crosses below zero**
- AND RSI **< 50**
> Up to **500 labels** (`max_labels_count=500`)
---
## ALERTS (Built-In)
| Alert | Trigger |
|------|--------|
| **Bullish MACD-RSI Signal** | `ta.crossover(hist, 0) and rsi > 50` |
| **Bearish MACD-RSI Signal** | `ta.crossunder(hist, 0) and rsi < 50` |
> Message: *"MACD crossed above zero with RSI > 50 — Bullish phase."*
---
## HOW TO READ THE CHART
| Visual | Market State | Interpretation |
|-------|-------------|----------------|
| **Bright Lime Candles** | **Strong Bullish Momentum** | High conviction — trend accelerating |
| **Faint Lime Candles** | **Weak Bullish** | Momentum present but not strong |
| **Bright Red Candles** | **Strong Bearish Momentum** | Downtrend with power |
| **Faint Red Candles** | **Weak Bearish** | Selling pressure, but fading |
| **Gray Candles** | **Conflicted / Choppy** | MACD and RSI disagree — avoid |
| **"Bullish Phase" Label** | **New Uptrend Starting** | Entry signal |
| **"Bearish Phase" Label** | **New Downtrend Starting** | Short signal |
---
## TRADING STRATEGY (Example)
### **Long Entry**
1. Wait for **"Bullish Phase" label**
2. Confirm **bright lime candles** (intensity > 50%)
3. Enter on **pullback to support** or **breakout**
4. **Stop Loss**: Below recent swing low
5. **Take Profit**: Trail with EMA or at resistance
### **Short Entry**
1. Wait for **"Bearish Phase" label**
2. Confirm **bright red candles**
3. Enter on **rally to resistance**
> **Best in trending markets** — avoid choppy ranges.
---
## UNIQUE FEATURES
| Feature | Benefit |
|-------|--------|
| **Dual Confirmation** | Avoids false MACD signals in overbought/oversold zones |
| **Dynamic Transparency** | Shows **relative strength** — not just direction |
| **Full Candle Replacement** | Clean, uncluttered chart |
| **Phase Labels** | Marks **exact trend change points** |
| **Built-in Alerts** | No extra setup needed |
---
## LIMITATIONS
| Issue | Note |
|------|------|
| **Lagging by design** | MACD & RSI are reactive |
| **Repainting?** | **No** — all on close |
| **No volume filter** | Add separately for better accuracy |
| **Labels can clutter** | Toggle off in choppy markets |
| **Intensity uses 100-bar lookback** | May lag in very long trends |
---
## BEST USE CASES
| Market | Timeframe | Style |
|-------|----------|------|
| Stocks, Forex, Crypto | 15m, 1H, 4H | Swing / Trend Following |
| **Avoid**: Sideways markets | Yes | High noise = many gray candles |
---
## COMPARISON TO STANDARD MACD/RSI
| Feature | This Indicator | Standard MACD + RSI |
|-------|----------------|---------------------|
| Visual | **Candles = signal** | Subchart lines |
| Confirmation | Built-in dual logic | Manual |
| Strength | Dynamic brightness | Histogram height |
| Alerts | Phase changes | Need custom |
| Chart Clutter | Low | High (two panels) |
> **This is a "one-panel" momentum dashboard**
---
## SUMMARY: What This Indicator Does
> **"MACD-RSI Hybrid Candles"** turns your **entire price chart into a live momentum heatmap** where:
>
> 1. **Candle color** = **MACD + RSI agreement** (Bullish / Bearish / Neutral)
> 2. **Brightness** = **Momentum strength** vs. recent 100 bars
> 3. **Labels & Alerts** = **Trend phase changes** (zero-line crosses with RSI filter)
>
> It **eliminates subcharts** and gives **instant visual confirmation** of:
> - **Trend direction**
> - **Momentum power**
> - **High-probability entries**
---
**Ideal for traders who want:**
- **No indicator panels**
- **Clear, color-coded signals**
- **Strength at a glance**
- **Automated alerts on trend shifts**
---
**Pro Tip**: Use with **volume** or **support/resistance** for **higher win rate**.
Quantum Money Flow PRO [QUANTUM EDITION]Quantum Money Flow PRO is a sophisticated trading indicator that reveals the hidden movements of institutional "smart money" in real-time. Using advanced quantum-inspired algorithms, it analyzes volume, money flow, and market structure to provide professional-grade trading signals with unprecedented accuracy.
⚡ Key Features:
🔍 SMART MONEY DETECTION:
Quantum Delta Analysis: Tracks institutional order flow through volume delta calculations
Money Flow Index (MFI): Identifies overbought/oversold conditions with precision
Power Histogram: Visualizes smart money accumulation/distribution patterns
Open Interest Simulation: Estimates institutional positioning through volume analysis
🎯 TRADING SIGNALS:
QUANTUM STRONG SIGNALS 🌀: High-probability entries with multiple confirmations
QUANTUM WEAK SIGNALS 🟡: Early warnings for potential trend changes
Divergence Detection: Spot hidden reversals before price moves
Convergence Signals: Confirm trend strength with price-indicator alignment
📊 QUANTUM DASHBOARD:
Real-time percentage-based metrics (0-100%)
Color-coded market state identification
Instant signal recognition with emoji indicators
Professional table layout with quantum-themed design
🔄 MULTI-TIMEFRAME ANALYSIS:
Works on all timeframes from 1-minute to monthly
Adaptive calculations for any market condition
Consistent performance across forex, stocks, and crypto
🚨 ALERT SYSTEM:
8 different alert conditions for automated trading
Customizable sound and visual notifications
Mobile push notifications supported
🎨 VISUAL ENHANCEMENTS:
Quantum-themed oscillators with professional styling
Clear overbought/oversold zones with gradient fills
Chart labels for instant signal recognition
Customizable colors to match your trading style
💡 PERFECT FOR:
Day traders seeking institutional edge
Swing traders identifying major turning points
Position traders monitoring smart money flow
Algorithmic traders needing reliable signals
📈 MARKETS:
Forex (All major/minor pairs)
Stocks (NYSE, NASDAQ, etc.)
Cryptocurrencies (BTC, ETH, altcoins)
Indices (SPX, NASDAQ, DOW)
Commodities (Gold, Oil, etc.)
🔧 EASY SETUP:
Apply to any chart
Customize colors and alerts in settings
Watch quantum signals appear in real-time
Trade with institutional-level insight
⚠️ RISK DISCLAIMER:
This indicator is for educational and informational purposes only. Always practice proper risk management and backtest strategies before live trading. Past performance does not guarantee future results.
Frequency Momentum Oscillator [QuantAlgo]🟢 Overview
The Frequency Momentum Oscillator applies Fourier-based spectral analysis principles to price action to identify regime shifts and directional momentum. It calculates Fourier coefficients for selected harmonic frequencies on detrended price data, then measures the distribution of power across low, mid, and high frequency bands to distinguish between persistent directional trends and transient market noise. This approach provides traders with a quantitative framework for assessing whether current price action represents meaningful momentum or merely random fluctuations, enabling more informed entry and exit decisions across various asset classes and timeframes.
🟢 How It Works
The calculation process removes the dominant trend from price data by subtracting a simple moving average, isolating cyclical components for frequency analysis:
detrendedPrice = close - ta.sma(close , frequencyPeriod)
The detrended price series undergoes frequency decomposition through Fourier coefficient calculation across the first 8 harmonics. For each harmonic frequency, the algorithm computes sine and cosine components across the lookback window, then derives power as the sum of squared coefficients:
for k = 1 to 8
cosSum = 0.0
sinSum = 0.0
for n = 0 to frequencyPeriod - 1
angle = 2 * math.pi * k * n / frequencyPeriod
cosSum := cosSum + detrendedPrice * math.cos(angle)
sinSum := sinSum + detrendedPrice * math.sin(angle)
power = (cosSum * cosSum + sinSum * sinSum) / frequencyPeriod
Power measurements are aggregated into three frequency bands: low frequencies (harmonics 1-2) capturing persistent cycles, mid frequencies (harmonics 3-4), and high frequencies (harmonics 5-8) representing noise. Each band's power normalizes against total spectral power to create percentage distributions:
lowFreqNorm = totalPower > 0 ? (lowFreqPower / totalPower) * 100 : 33.33
highFreqNorm = totalPower > 0 ? (highFreqPower / totalPower) * 100 : 33.33
The normalized frequency components undergo exponential smoothing before calculating spectral balance as the difference between low and high frequency power:
smoothLow = ta.ema(lowFreqNorm, smoothingPeriod)
smoothHigh = ta.ema(highFreqNorm, smoothingPeriod)
spectralBalance = smoothLow - smoothHigh
Spectral balance combines with price momentum through directional multiplication, producing a composite signal that integrates frequency characteristics with price direction:
momentum = ta.change(close , frequencyPeriod/2)
compositeSignal = spectralBalance * math.sign(momentum)
finalSignal = ta.ema(compositeSignal, smoothingPeriod)
The final signal oscillates around zero, with positive values indicating low-frequency dominance coupled with upward momentum (trending up), and negative values indicating either high-frequency dominance (choppy market) or downward momentum (trending down).
🟢 How to Use This Indicator
→ Long/Short Signals: the indicator generates long signals when the smoothed composite signal crosses above zero (indicating low-frequency directional strength dominates) and short signals when it crosses below zero (indicating bearish momentum persistence).
→ Upper and Lower Reference Lines: the +25 and -25 reference lines serve as threshold markers for momentum strength. Readings beyond these levels indicate strong directional conviction, while oscillations between them suggest consolidation or weakening momentum. These references help traders distinguish between strong trending regimes and choppy transitional periods.
→ Preconfigured Presets: three optimized configurations are available with Default (32, 3) offering balanced responsiveness, Fast Response (24, 2) designed for scalping and intraday trading, and Smooth Trend (40, 5) calibrated for swing trading and position trading with enhanced noise filtration.
→ Built-in Alerts: the indicator includes three alert conditions for automated monitoring - Long Signal (momentum shifts bullish), Short Signal (momentum shifts bearish), and Signal Change (any directional transition). These alerts enable traders to receive real-time notifications without continuous chart monitoring.
→ Color Customization: four visual themes (Classic green/red, Aqua blue/orange, Cosmic aqua/purple, Custom) allow chart customization for different display environments and personal preferences.
Fear & Greed Oscillator - Risk SentimentThe Fear & Greed Oscillator – Risk Sentiment is a macro-driven sentiment indicator inspired by the popular Fear & Greed Index , but rebuilt from the ground up using real, market-based economic data and statistical normalization.
While the traditional Fear & Greed Index uses components like volatility, volume, and social media trends to estimate sentiment, this version is powered by the Copper/Gold ratio — a historically respected gauge of macroeconomic confidence and risk appetite.
📈 Expansion vs. Contraction Theory
At the heart of this oscillator is a simple macroeconomic insight:
🟢 Copper performs well during periods of economic expansion and risk-on behavior (industrials, construction, manufacturing growth).
🔴 Gold performs well during periods of economic contraction , as a classic risk-off, capital-preserving asset.
By tracking the ratio of Copper to Gold prices over time and converting it into a Z-score , this tool shows when macro sentiment is statistically stretched toward greed or fear — based on how unusually strong one side of the ratio is relative to its historical average.
⚙️ How It Works
The script takes two user-defined tickers (default: Copper and Gold) and calculates their ratio.
It then applies Z-score normalization over a user-defined period (default: 200 bars).
A color gradient line is plotted:
🔴 Z < -2 = Extreme Fear
🟣 -2 to 0 = Mild Fear to Neutral
🔵 0 to 2 = Neutral to Greed
🟢 Z > 2 = Extreme Greed
Visual guides at ±1, ±2, ±3 standard deviations give immediate context.
Includes alert conditions when the Z-score crosses above +2 (Greed) or below -2 (Fear).
🔔 Alerts
“Z-Score has entered the Greed Zone ” when Z > 2
“Z-Score has entered the Fear Zone ” when Z < -2
These are designed to help catch macro sentiment extremes before or during large shifts in market behavior.
⚠️ Disclaimer
This indicator is a macro sentiment tool, not a direct trading signal. While the Copper/Gold ratio often reflects economic risk trends, correlation with risk assets (like Bitcoin or equities) is not guaranteed and may vary by cycle. Always use this indicator in conjunction with other tools and contextual analysis.
Baseline Deviation Oscillator [Alpha Extract]A sophisticated normalized oscillator system that measures price deviation from a customizable moving average baseline using ATR-based scaling and dynamic threshold adaptation. Utilizing advanced HL median filtering and multi-timeframe threshold calculations, this indicator delivers institutional-grade overbought/oversold detection with automatic zone adjustment based on recent oscillator extremes. The system's flexible baseline architecture supports six different moving average types while maintaining consistent ATR normalization for reliable signal generation across varying market volatility conditions.
🔶 Advanced Baseline Construction Framework
Implements flexible moving average architecture supporting EMA, RMA, SMA, WMA, HMA, and TEMA calculations with configurable source selection for optimal baseline customization. The system applies HL median filtering to the raw baseline for exceptional smoothing and outlier resistance, creating ultra-stable trend reference levels suitable for precise deviation measurement.
// Flexible Baseline MA System
ma(src, length, type) =>
if type == "EMA"
ta.ema(src, length)
else if type == "TEMA"
ema1 = ta.ema(src, length)
ema2 = ta.ema(ema1, length)
ema3 = ta.ema(ema2, length)
3 * ema1 - 3 * ema2 + ema3
// Baseline with HL Median Smoothing
Baseline_Raw = ma(src, MA_Length, MA_Type)
Baseline = hlMedian(Baseline_Raw, HL_Filter_Length)
🔶 ATR Normalization Engine
Features sophisticated ATR-based scaling methodology that normalizes price deviations relative to current volatility conditions, ensuring consistent oscillator readings across different market regimes. The system calculates ATR bands around the baseline and uses half the band width as the normalization factor for volatility-adjusted deviation measurement.
🔶 Dynamic Threshold Adaptation System
Implements intelligent threshold calculation using rolling window analysis of oscillator extremes with configurable smoothing and expansion parameters. The system identifies peak and trough levels over dynamic windows, applies EMA smoothing, and adds expansion factors to create adaptive overbought/oversold zones that adjust to changing market conditions.
1D
3D
1W
🔶 Multi-Source Configuration Architecture
Provides comprehensive source selection including Close, Open, HL2, HLC3, and OHLC4 options for baseline calculation, enabling traders to optimize oscillator behavior for specific trading styles. The flexible source system allows adaptation to different market characteristics while maintaining consistent ATR normalization methodology.
🔶 Signal Generation Framework
Generates bounce signals when oscillator crosses back through dynamic thresholds and zero-line crossover signals for trend confirmation. The system identifies both standard threshold bounces and extreme zone bounces with distinct alert conditions for comprehensive reversal and continuation pattern detection.
Bull_Bounce = ta.crossover(OSC, -Active_Lower) or
ta.crossover(OSC, -Active_Lower_Extreme)
Bear_Bounce = ta.crossunder(OSC, Active_Upper) or
ta.crossunder(OSC, Active_Upper_Extreme)
// Zero Line Signals
Zero_Cross_Up = ta.crossover(OSC, 0)
Zero_Cross_Down = ta.crossunder(OSC, 0)
🔶 Enhanced Visual Architecture
Provides color-coded oscillator line with bullish/bearish dynamic coloring, signal line overlay for trend confirmation, and optional cloud fills between oscillator and signal. The system includes gradient zone fills for overbought/oversold regions with configurable transparency and threshold level visualization with automatic label generation.
snapshot
🔶 HL Median Filter Integration
Features advanced high-low median filtering identical to DEMA Flow for exceptional baseline smoothing without lag introduction. The system constructs rolling windows of baseline values, performs median extraction for both odd and even window lengths, and eliminates outliers for ultra-clean deviation measurement baseline.
🔶 Comprehensive Alert System
Implements multi-tier alert framework covering bullish bounces from oversold zones, bearish bounces from overbought zones, and zero-line crossovers in both directions. The system provides real-time notifications for critical oscillator events with customizable message templates for automated trading integration.
🔶 Performance Optimization Framework
Utilizes efficient calculation methods with optimized array management for median filtering and minimal computational overhead for real-time oscillator updates. The system includes intelligent null value handling and automatic scale factor protection to prevent division errors during extreme market conditions.
🔶 Why Choose Baseline Deviation Oscillator ?
This indicator delivers sophisticated normalized oscillator analysis through flexible baseline architecture and dynamic threshold adaptation. Unlike traditional oscillators with fixed levels, the BDO automatically adjusts overbought/oversold zones based on recent oscillator behavior while maintaining consistent ATR normalization for reliable cross-market and cross-timeframe comparison. The system's combination of multiple MA type support, HL median filtering, and intelligent zone expansion makes it essential for traders seeking adaptive momentum analysis with reduced false signals and comprehensive reversal detection across cryptocurrency, forex, and equity markets.
Smart RSI Money Flow — Core Bands V1.01SMART RSI – Money Flow Bands (Technical Overview)
1. Background: RSI and Its Behavior on Lower Timeframes
The Relative Strength Index (RSI) originally is a momentum oscillator calculated from average gains and losses over a selected period. In its standard form, RSI is derived solely from price changes; it does not incorporate volume data or order-flow information in its formula.
Because RSI is price-based, its interpretation depends strongly on the timeframe:
• On higher timeframes, each bar aggregates more trading activity, and RSI tends to behave more smoothly.
• On lower timeframes (1-hour down to intraday scalping intervals), price fluctuations are quicker, and RSI becomes more sensitive to short-term noise.
This does not imply that RSI becomes invalid, but that its signals on fast charts can be more reactive and may benefit from additional context such as volume behavior or structural information.
2. Purpose of This Indicator
This indicator extends the classical RSI by adding information that RSI does not include:
• Mapping RSI values into price-based bands instead of the 0–100 oscillator space.
• Retrieving lower timeframe volume data and separating it into buy and sell components.
• Comparing the slope (angle) of price movement with the slope of buy and sell volume.
The goal is to provide a structural interpretation of where price sits relative to RSI conditions and how volume is behaving on a lower timeframe.
3. Technical Differences Compared to Classical RSI
A) Classical RSI
• Input: price only (usually close).
• Output: normalized oscillator between 0 and 100.
• Does not incorporate intra-bar volume distribution.
• Does not separate buy/sell volume.
B) SMART RSI – Money Flow Bands
1) RSI-to-Price Mapping
Converts RSI values into upper/lower price bands using recent price extremes.
2) Lower Timeframe Volume Decomposition
Retrieves LTF data and splits each bar’s volume into buy (close>open) and sell (close
TASC 2025.12 The One Euro Filter█ OVERVIEW
This script implements the One Euro filter, developed by Georges Casiez, Nicolas Roussel, and Daniel Vogel, and adapted by John F. Ehlers in his article "Low-Latency Smoothing" from the December 2025 edition of the TASC Traders' Tips . The original creators gave the filter its name to suggest that it is cheap and efficient, like something one might purchase for a single Euro.
█ CONCEPTS
The One Euro filter is an EMA-based low-pass filter that adapts its smoothing factor (alpha) based on the absolute values of smoothed rates of change in the source series. It was designed to filter noisy, high-frequency signals in real time with low latency. Ehlers simplifies the filter for market analysis by calculating alpha in terms of bar periods rather than time and frequency, because periods are naturally intuitive for a discrete financial time series.
In his article, Ehlers demonstrates how traders can apply the adaptive One Euro filter to a price series for simple low-latency smoothing. Additionally, he explains that traders can use the filter as a smoothed oscillator by applying it to a high-pass filter. In essence, similar to other low-pass filters, traders can apply the One Euro filter to any custom source to derive a smoother signal with reduced noise and low lag.
This script applies the One Euro filter to a specified source series, and it applies the filter to a two-pole high-pass filter or other oscillator, depending on the selected "Osc type" option. By default, it displays the filtered source series on the main chart pane, and it shows the oscillator and its filtered series in a separate pane.
█ INPUTS
Source: The source series for the first filter and the selected oscillator.
Min period: The minimum cutoff period for the smoothing calculation.
Beta: Controls the responsiveness of the filter. The filter adds the product of this value and the smoothed source change to the minimum period to determine the filter's smoothing factor. Larger values cause more significant changes in the maximum cutoff period, resulting in a smoother response.
Osc type: The type of oscillator to calculate for the pane display. By default, the indicator calculates a high-pass filter. If the selected type is "None", the indicator displays the "Source" series and its filtered result in a separate pane rather than showing the filter on the main chart. With this setting, users can pass plotted values from another indicator and view the filtered result in the pane.
Period: The length for the selected oscillator's calculation.
indicator CalibrationIndicator Calibration - Multi-Indicator Consensus System
Overview
Indicator Calibration is a powerful consensus-based trading indicator that leverages the MyIndicatorLibrary (NormalizedIndicators) to combine multiple trend-following indicators into a single, actionable signal. By averaging the normalized outputs of up to 8 different trend indicators, this tool provides traders with a clear consensus view of market direction, reducing noise and false signals inherent in single-indicator approaches.
The indicator outputs a value between -1 (strong bearish) and +1 (strong bullish), with 0 representing a neutral market state. This creates an intuitive, easy-to-read oscillator that synthesizes multiple analytical perspectives into one coherent signal.
🎯 Core Concept
Consensus Trading Philosophy
Rather than relying on a single indicator that may give conflicting or premature signals, Indicator Calibration employs a democratic voting system where multiple indicators contribute their normalized opinion:
Each enabled indicator votes: +1 (bullish), -1 (bearish), or 0 (neutral)
The votes are averaged to create a consensus signal
Strong consensus (closer to ±1) indicates high agreement among indicators
Weak consensus (closer to 0) indicates market indecision or transition
Key Benefits
Reduced False Signals: Multiple indicators must agree before strong signals appear
Noise Filtering: Individual indicator quirks are smoothed out by averaging
Customizable: Enable/disable indicators and adjust parameters to suit your trading style
Universal Application: Works across all timeframes and asset classes
Clear Visualization: Simple line oscillator with clear bull/bear zones
📊 Included Indicators
The system can utilize up to 8 normalized trend-following indicators from the library:
1. BBPct - Bollinger Bands Percent
Parameters: Length (default: 20), Factor (default: 2)
Type: Stationary oscillator
Strength: Mean reversion and volatility detection
2. NorosTrendRibbonEMA
Parameters: Length (default: 20)
Type: Non-stationary trend follower
Strength: Breakout detection with momentum confirmation
3. RSI - Relative Strength Index
Parameters: Length (default: 9), SMA Length (default: 4)
Type: Stationary momentum oscillator
Strength: Overbought/oversold with smoothing
4. Vidya - Variable Index Dynamic Average
Parameters: Length (default: 30), History Length (default: 9)
Type: Adaptive moving average
Strength: Volatility-adjusted trend following
5. HullSuite
Parameters: Length (default: 55), Multiplier (default: 1)
Type: Fast-response moving average
Strength: Low-lag trend identification
6. TrendContinuation
Parameters: MA Length 1 (default: 50), MA Length 2 (default: 25)
Type: Dual HMA system
Strength: Trend quality assessment with neutral states
7. LeonidasTrendFollowingSystem
Parameters: Short Length (default: 21), Key Length (default: 10)
Type: Dual EMA crossover
Strength: Simple, reliable trend tracking
8. TRAMA - Trend Regularity Adaptive Moving Average
Parameters: Length (default: 50)
Type: Adaptive trend follower
Strength: Adjusts to trend stability
⚙️ Input Parameters
Source Settings
Source: Choose your price input (default: close)
Can be modified to: open, high, low, close, hl2, hlc3, ohlc4, hlcc4
Indicator Selection
Each indicator can be enabled or disabled via checkboxes:
use_bbpct: Enable/disable Bollinger Bands Percent
use_noros: Enable/disable Noro's Trend Ribbon
use_rsi: Enable/disable RSI
use_vidya: Enable/disable VIDYA
use_hull: Enable/disable Hull Suite
use_trendcon: Enable/disable Trend Continuation
use_leonidas: Enable/disable Leonidas System
use_trama: Enable/disable TRAMA
Parameter Customization
Each indicator has its own parameter group where you can fine-tune:
val 1: Primary period/length parameter
val 2: Secondary parameter (multiplier, smoothing, etc.)
📈 Signal Interpretation
Output Line (Orange)
The main output oscillates between -1 and +1:
+1.0 to +0.5: Strong bullish consensus (all or most indicators agree on uptrend)
+0.5 to +0.2: Moderate bullish bias (bullish indicators outnumber bearish)
+0.2 to -0.2: Neutral zone (mixed signals or transition phase)
-0.2 to -0.5: Moderate bearish bias (bearish indicators outnumber bullish)
-0.5 to -1.0: Strong bearish consensus (all or most indicators agree on downtrend)
Reference Lines
Green line (+1): Maximum bullish consensus
Red line (-1): Maximum bearish consensus
Gray line (0): Neutral midpoint
💡 Trading Strategies
Strategy 1: Consensus Threshold Trading
Entry Rules:
- Long: Output crosses above +0.5 (strong bullish consensus)
- Short: Output crosses below -0.5 (strong bearish consensus)
Exit Rules:
- Exit Long: Output crosses below 0 (consensus lost)
- Exit Short: Output crosses above 0 (consensus lost)
Strategy 2: Zero-Line Crossover
Entry Rules:
- Long: Output crosses above 0 (bullish shift in consensus)
- Short: Output crosses below 0 (bearish shift in consensus)
Exit Rules:
- Exit on opposite crossover
Strategy 3: Divergence Trading
Look for divergences between:
- Price making higher highs while indicator makes lower highs (bearish divergence)
- Price making lower lows while indicator makes higher lows (bullish divergence)
Strategy 4: Extreme Reading Reversal
Entry Rules:
- Long: Output reaches -0.8 or below (extreme bearish consensus = potential reversal)
- Short: Output reaches +0.8 or above (extreme bullish consensus = potential reversal)
Use with caution - best combined with other reversal signals
🔧 Optimization Tips
For Trending Markets
Enable trend-following indicators: Noro's, VIDYA, Hull Suite, Leonidas
Use higher threshold levels (±0.6) to filter out minor retracements
Increase indicator periods for smoother signals
For Range-Bound Markets
Enable oscillators: BBPct, RSI
Use zero-line crossovers for entries
Decrease indicator periods for faster response
For Volatile Markets
Enable adaptive indicators: VIDYA, TRAMA
Use wider threshold levels to avoid whipsaws
Consider disabling fast indicators that may overreact
Custom Calibration Process
Start with all indicators enabled using default parameters
Backtest on your chosen timeframe and asset
Identify which indicators produce the most false signals
Disable or adjust parameters for problematic indicators
Test different threshold levels for entry/exit
Validate on out-of-sample data
📊 Visual Guide
Color Scheme
Orange Line: Main consensus output
Green Horizontal: Bullish extreme (+1)
Red Horizontal: Bearish extreme (-1)
Gray Horizontal: Neutral zone (0)
Reading the Chart
Line above 0: Net bullish sentiment
Line below 0: Net bearish sentiment
Line near extremes: Strong consensus
Line fluctuating near 0: Indecision or transition
Smooth line movement: Stable consensus
Erratic line movement: Conflicting signals
⚠️ Important Considerations
Lag Characteristics
This is a lagging indicator by design (consensus takes time to form)
Best used for trend confirmation rather than early entry
May miss the first portion of strong moves
Reduces false entries at the cost of delayed entries
Number of Active Indicators
More indicators = smoother but slower signals
Fewer indicators = faster but potentially noisier signals
Minimum recommended: 4 indicators for reliable consensus
Optimal: 6-8 indicators for balanced performance
Market Conditions
Best: Strong trending markets (up or down)
Good: Volatile markets with clear directional moves
Poor: Choppy, sideways markets with no clear trend
Worst: Low-volume, range-bound conditions
Complementary Tools
Consider combining with:
Volume analysis for confirmation
Support/resistance levels for entry/exit points
Market structure analysis (higher timeframe trends)
Risk management tools (ATR-based stops)
🎓 Example Use Cases
Swing Trading
Timeframe: Daily or 4H
Enable: All 8 indicators with default parameters
Entry: Consensus > +0.5 or < -0.5
Hold: Until consensus reverses to opposite extreme
Day Trading
Timeframe: 15m or 1H
Enable: Faster indicators (RSI, BBPct, Noro's, Hull Suite)
Entry: Zero-line crossover with volume confirmation
Exit: Opposite crossover or profit target
Position Trading
Timeframe: Weekly or Daily
Enable: Slower indicators (TRAMA, VIDYA, Trend Continuation)
Entry: Strong consensus (±0.7) with higher timeframe confirmation
Hold: Months until consensus weakens significantly
🔬 Technical Details
Calculation Method
1. Each enabled indicator calculates its normalized signal (-1, 0, or +1)
2. All active signals are stored in an array
3. Array.avg() computes the arithmetic mean
4. Result is plotted as a continuous line
Output Range
Theoretical: -1.0 to +1.0
Practical: Typically ranges between -0.8 to +0.8
Rare: All indicators perfectly aligned at ±1.0
Performance
Lightweight calculation (simple averaging)
No repainting (all indicators are non-repainting)
Compatible with all Pine Script features
Works on all TradingView plans
📋 License
This code is subject to the Mozilla Public License 2.0 at mozilla.org
🚀 Quick Start Guide
Add to Chart: Apply indicator to your chart
Choose Timeframe: Select appropriate timeframe for your trading style
Enable Indicators: Start with all 8 enabled
Observe Behavior: Watch how consensus forms during different market conditions
Calibrate: Adjust parameters and indicator selection based on observations
Backtest: Validate your settings on historical data
Trade: Apply with proper risk management
🎯 Key Takeaways
✅ Consensus beats individual indicators - Multiple perspectives reduce errors
✅ Customizable to your style - Enable/disable and tune to preference
✅ Simple interpretation - One line tells the story
✅ Works across markets - Stocks, crypto, forex, commodities
✅ Reduces emotional trading - Clear, objective signal generation
✅ Professional-grade - Built on proven technical analysis principles
Indicator Calibration transforms complex multi-indicator analysis into a single, actionable signal. By harnessing the collective wisdom of multiple proven trend-following systems, traders gain a powerful edge in identifying high-probability trade setups while filtering out market noise.
My script//@version=5
indicator("200-Day Volume MACD Oscillator", overlay=false)
length = 200
vol_avg = ta.sma(volume, length)
oscillator = volume - vol_avg
plot(oscillator, style=plot.style_histogram, color=oscillator >= 0 ? color.green : color.red, title="Volume MACD Oscillator")
Elder Force Index Alexander Elder's volume indicator. Stay in long as long as the background is green and there are no green crosses. The same applies for short.
Smart Money Flow PRO + MFI [PERCENT]Smart Money Flow PRO + MFI Indicator
Professional Smart Money Tracking with Multi-Timeframe Analysis
This advanced indicator combines volume analysis, money flow, and smart money detection to identify high-probability trade setups. Perfect for traders who want to follow institutional money flow.
🎯 KEY FEATURES:
📊 SMART MONEY DETECTION:
Volume Delta analysis (bullish/bearish volume tracking)
Cumulative Delta with trend detection
Smart Money Power formula combining multiple factors
Open Interest simulation for market depth
📈 MULTI-CONFIRMATION SYSTEM:
Money Flow Index (MFI) with custom overbought/oversold zones
Bullish/Bearish Divergence detection
Convergence signals for trend confirmation
Real-time market state analysis
🎨 PROFESSIONAL VISUALS:
Percentage-based table showing all metrics in 0-100% scale
Color-coded strength indicators (Strong/Medium/Weak)
Oscillator window with MFI, Delta, and Power histograms
Clean, organized layout with intuitive icons
⚡ TRADING SIGNALS:
STRONG BUY/SELL alerts with multiple confirmations
Divergence/convergence visual markers on chart
Real-time entry signals with strength classification
Customizable alert conditions
🔄 FLEXIBLE SETTINGS:
Adjustable MFI parameters
Custom volume thresholds
Divergence sensitivity controls
Complete color customization
Perfect for: Day traders, swing traders, and anyone wanting to track institutional money flow with professional-grade analytics.
All calculations in percentages for instant readability and decision-making.
CandelaCharts - Trend Oscillator 📝 Overview
Trend Oscillator is a simple yet effective trend identification tool that uses the relationship between two exponential moving averages (EMAs) to determine market direction. It calculates the spread between a fast and slow EMA, applies a bias multiplier, and smooths the result to produce a clean oscillator that oscillates above and below a zero line. When the oscillator is above zero, the trend is considered bullish (upward); when below zero, it's bearish (downward). The indicator provides clear visual feedback through color-coded plots and optional price bar coloring, making it easy to identify trend direction at a glance.
📦 Features
This section highlights the core capabilities you'll rely on most.
Dual EMA system — Uses a fast EMA (default 9) and slow EMA (default 21) to capture trend momentum and direction.
Bias multiplier — Applies a small multiplier (default 1.001) to the EMA spread, providing a slight bias that helps filter noise and confirm trend strength.
Smoothed output — Applies an additional EMA smoothing (default 5 periods) to the raw spread, creating a cleaner, less choppy oscillator line.
Zero-line reference — Plots a horizontal zero line that serves as the critical threshold between bullish and bearish conditions.
Color-coded visualization — Automatically colors the oscillator line green/lime when bullish (above zero) and red when bearish (below zero).
Price bar coloring — Optional feature to color price bars based on the current trend direction, providing immediate visual context on the main chart.
Customizable parameters — Adjust EMA lengths, bias multiplier, smoothing period, and colors to match your trading style and timeframe.
⚙️ Settings
Use these controls to fine-tune the oscillator's sensitivity, appearance, and behavior.
Fast EMA Length — Period for the fast exponential moving average (default: 9). Lower values make the indicator more responsive to price changes.
Slow EMA Length — Period for the slow exponential moving average (default: 21). Higher values create a smoother baseline for trend identification.
Bias Multiplier — Multiplier applied to the EMA spread (default: 1.001). Small adjustments can help filter minor whipsaws and confirm trend strength.
Smoothing Length — Period for smoothing the raw spread calculation (default: 5). Higher values create a smoother oscillator line but may lag price action.
Colors — Set the bullish (default: lime) and bearish (default: red) colors for the oscillator line.
Color Price Bars — Toggle to enable/disable coloring of price bars based on the current trend direction.
⚡️ Showcase
Oscillator Line
Bar Coloring
Divergences
📒 Usage
Follow these steps to effectively use Trend Oscillator for trend identification and trading decisions.
1) Select your timeframe — The indicator works across all timeframes, but higher timeframes (daily, weekly, monthly) typically provide more reliable trend signals with less noise. Lower timeframes (1m, 5m, 15m) may produce more frequent but potentially less reliable signals. Consider your trading style: swing traders benefit from daily/weekly charts, while day traders can use 15m/1h timeframes. Always align the indicator's sensitivity with your timeframe choice.
2) Adjust EMA lengths — The default 9/21 combination works well for most cases. For faster signals, try 5/13; for slower, more conservative signals, try 12/26 or 20/50. Match the lengths to your trading style and timeframe.
3) Interpret the zero line — When the oscillator is above zero (green/lime), the trend is bullish. When below zero (red), the trend is bearish. The further from zero, the stronger the trend.
4) Watch for crossovers — Trend changes occur when the oscillator crosses the zero line. A cross from below to above indicates a shift to bullish; from above to below indicates a shift to bearish.
5) Identify divergences — Divergences can signal potential trend reversals. Bullish divergence : price makes lower lows while the oscillator makes higher lows (suggests weakening bearish momentum). Bearish divergence : price makes higher highs while the oscillator makes lower highs (suggests weakening bullish momentum). Divergences are most reliable when they occur near extreme levels and should be confirmed with price action before taking trades.
6) Use smoothing wisely — The smoothing parameter helps reduce noise but adds lag. Lower smoothing (3-5) is more responsive; higher smoothing (7-10) is more stable but slower to react.
7) Combine with price action — Use the oscillator to confirm trend direction, then look for entry opportunities when price pulls back in the direction of the trend. The optional price bar coloring helps visualize trend alignment on the main chart.
8) Filter with bias multiplier — The bias multiplier can help reduce false signals. Experiment with values between 1.000 and 1.005 to find the sweet spot for your instrument and timeframe.
🚨 Alerts
There are no built-in alerts in this version.
⚠️ Disclaimer
Trading involves significant risk, and many participants may incur losses. The content on this site is not intended as financial advice and should not be interpreted as such. Decisions to buy, sell, hold, or trade securities, commodities, or other financial instruments carry inherent risks and are best made with guidance from qualified financial professionals. Past performance is not indicative of future results.
Average True Range with MAKey features
ATR calculation: true range (ta.tr(true)) is smoothed using a selectable method to produce the ATR.
ATR smoothing options: RMA, SMA, EMA, or WMA for the ATR calculation.
MA-on-ATR: a separate moving average computed on the ATR values with its own length and smoothing method.
Display controls: toggles to show/hide the ATR and the ATR MA independently.
Appearance controls: separate color inputs for the ATR and the ATR MA, and a thicker line for the MA (linewidth=2).
Inputs
ATR Length (default 14): length used to smooth true range into the ATR.
ATR Smoothing (default RMA): smoothing method applied to the true range to form ATR.
MA Length (on ATR) (default 14): length for the moving average applied to the ATR series.
MA Smoothing (default SMA): smoothing method used for the MA applied to ATR.
Show ATR / Show ATR MA: booleans to toggle visibility.
ATR Color / ATR MA Color: choose plot colors.
How to interpret
ATR line: shows current volatility (average true range). Rising ATR indicates increasing volatility; falling ATR indicates decreasing volatility.
ATR MA line: smooths the ATR to reveal trend direction and reduce noise.
Use crossovers: ATR crossing above its MA may signal volatility is picking up; ATR crossing below its MA suggests volatility is subsiding.
Combine with price action or other indicators (e.g., breakout systems, position sizing rules) to make decisions based on volatility regime.
hell 1good for finding tops and bottoms in a trend .set to log scale and strech it like it looks in the chart
Multitimeframe Stochastic RSIIndicator is Combining 4 different timeframe Stochastic RSI and show buy signal when all of them are oversold and sell signal when all of them are overbought.
Default settings are set up for 15 minute timeframe:
K1 - 15M (period = 14)
K2 - 30M (period = 28)
K3 - 1H (period = 56)
K4 - 2H (period = 112)
It indicates top and bottoms of given period.
Its good to use as a confirmation indicator.
Feel free to comment and use it.
Greetings!
SP - MACD with DivergenceIdentifies Bullish and Bearish Divergences on any time frame.
Using with a combination of candlestick and a trend bias based on long term trend of the underlying can pic reversals quiet effectively.
Range Oascilator + LessDivergences + MACD+StochRSIRange Oscillator + EMA Filter
Calculates a custom oscillator based on the highest high and lowest low over a chosen period.
Generates BUY signals when the oscillator crosses up from the oversold zone and price is above the EMA.
Generates SELL signals when the oscillator crosses down from the overbought zone and price is below the EMA.
MACD (3‑10‑16 EMA Settings)
Uses fast EMA = 3, slow EMA = 10, signal EMA = 16.
Detects bullish and bearish crossovers.
These crossovers only trigger a single unified buy/sell signal if they coincide with Stochastic RSI being in oversold (for buy) or overbought (for sell) zones.
Stochastic RSI
Standard calculation with %K and %D smoothing.
Defines oversold (<20) and overbought (>80) zones.
Used both for divergence detection and as a filter for MACD signals.
Divergence Detection
RSI Divergence: Price makes a lower low but RSI makes a higher low (bullish), or price makes a higher high but RSI makes a lower high (bearish).
MACD Histogram Divergence: Price makes a lower low but MACD histogram makes a higher low (bullish), or price makes a higher high but MACD histogram makes a lower high (bearish).
Stochastic RSI Divergence: Similar logic applied to %K line.
Divergences are flagged only once per pivot to avoid repetitive signals.
Visuals
EMA plotted on chart.
BUY/SELL signals shown as triangles above/below bars.
Divergences shown as labels (e.g., “RSI BullDiv”, “MACD BearDiv”).
Unified MACD+Stoch RSI signals shown in distinct colors (lime for buy, orange for sell).
Range Oscillator Strategy + Stoch Confirm🔹 Short summary
This is a free, educational long-only strategy built on top of the public “Range Oscillator” by Zeiierman (used under CC BY-NC-SA 4.0), combined with a Stochastic timing filter, an EMA-based exit filter and an optional risk-management layer (SL/TP and R-multiple exits). It is NOT financial advice and it is NOT a magic money machine. It’s a structured framework to study how range-expansion + momentum + trend slope can be combined into one rule-based system, often with intentionally RARE trades.
────────────────────────
0. Legal / risk disclaimer
────────────────────────
• This script is FREE and public. I do not charge any fee for it.
• It is for EDUCATIONAL PURPOSES ONLY.
• It is NOT financial advice and does NOT guarantee profits.
• Backtest results can be very different from live results.
• Markets change over time; past performance is NOT indicative of future performance.
• You are fully responsible for your own trades and risk.
Please DO NOT use this script with money you cannot afford to lose. Always start in a demo / paper trading environment and make sure you understand what the logic does before you risk any capital.
────────────────────────
1. About default settings and risk (very important)
────────────────────────
The script is configured with the following defaults in the `strategy()` declaration:
• `initial_capital = 10000`
→ This is only an EXAMPLE account size.
• `default_qty_type = strategy.percent_of_equity`
• `default_qty_value = 100`
→ This means 100% of equity per trade in the default properties.
→ This is AGGRESSIVE and should be treated as a STRESS TEST of the logic, not as a realistic way to trade.
TradingView’s House Rules recommend risking only a small part of equity per trade (often 1–2%, max 5–10% in most cases). To align with these recommendations and to get more realistic backtest results, I STRONGLY RECOMMEND you to:
1. Open **Strategy Settings → Properties**.
2. Set:
• Order size: **Percent of equity**
• Order size (percent): e.g. **1–2%** per trade
3. Make sure **commission** and **slippage** match your own broker conditions.
• By default this script uses `commission_value = 0.1` (0.1%) and `slippage = 3`, which are reasonable example values for many crypto markets.
If you choose to run the strategy with 100% of equity per trade, please treat it ONLY as a stress-test of the logic. It is NOT a sustainable risk model for live trading.
────────────────────────
2. What this strategy tries to do (conceptual overview)
────────────────────────
This is a LONG-ONLY strategy designed to explore the combination of:
1. **Range Oscillator (Zeiierman-based)**
- Measures how far price has moved away from an adaptive mean.
- Uses an ATR-based range to normalize deviation.
- High positive oscillator values indicate strong price expansion away from the mean in a bullish direction.
2. **Stochastic as a timing filter**
- A classic Stochastic (%K and %D) is used.
- The logic requires %K to be below a user-defined level and then crossing above %D.
- This is intended to catch moments when momentum turns up again, rather than chasing every extreme.
3. **EMA Exit Filter (trend slope)**
- An EMA with configurable length (default 70) is calculated.
- The slope of the EMA is monitored: when the slope turns negative while in a long position, and the filter is enabled, it triggers an exit condition.
- This acts as a trend-protection exit: if the medium-term trend starts to weaken, the strategy exits even if the oscillator has not yet fully reverted.
4. **Optional risk-management layer**
- Percentage-based Stop Loss and Take Profit (SL/TP).
- Risk/Reward (R-multiple) exit based on the distance from entry to SL.
- Implemented as OCO orders that work *on top* of the logical exits.
The goal is not to create a “holy grail” system but to serve as a transparent, configurable framework for studying how these concepts behave together on different markets and timeframes.
────────────────────────
3. Components and how they work together
────────────────────────
(1) Range Oscillator (based on “Range Oscillator (Zeiierman)”)
• The script computes a weighted mean price and then measures how far price deviates from that mean.
• Deviation is normalized by an ATR-based range and expressed as an oscillator.
• When the oscillator is above the **entry threshold** (default 100), it signals a strong move away from the mean in the bullish direction.
• When it later drops below the **exit threshold** (default 30), it can trigger an exit (if enabled).
(2) Stochastic confirmation
• Classic Stochastic (%K and %D) is calculated.
• An entry requires:
- %K to be below a user-defined “Cross Level”, and
- then %K to cross above %D.
• This is a momentum confirmation: the strategy tries to enter when momentum turns up from a pullback rather than at any random point.
(3) EMA Exit Filter
• The EMA length is configurable via `emaLength` (default 70).
• The script monitors the EMA slope: it computes the relative change between the current EMA and the previous EMA.
• If the slope turns negative while the strategy holds a long position and the filter is enabled, it triggers an exit condition.
• This is meant to help protect profits or cut losses when the medium-term trend starts to roll over, even if the oscillator conditions are not (yet) signalling exit.
(4) Risk management (optional)
• Stop Loss (SL) and Take Profit (TP):
- Defined as percentages relative to average entry price.
- Both are disabled by default, but you can enable them in the Inputs.
• Risk/Reward Exit:
- Uses the distance from entry to SL to project a profit target at a configurable R-multiple.
- Also optional and disabled by default.
These exits are implemented as `strategy.exit()` OCO orders and can close trades independently of oscillator/EMA conditions if hit first.
────────────────────────
4. Entry & Exit logic (high level)
────────────────────────
A) Time filter
• You can choose a **Start Year** in the Inputs.
• Only candles between the selected start date and 31 Dec 2069 are used for backtesting (`timeCondition`).
• This prevents accidental use of tiny cherry-picked windows and makes tests more honest.
B) Entry condition (long-only)
A long entry is allowed when ALL the following are true:
1. `timeCondition` is true (inside the backtest window).
2. If `useOscEntry` is true:
- Range Oscillator value must be above `entryLevel`.
3. If `useStochEntry` is true:
- Stochastic condition (`stochCondition`) must be true:
- %K < `crossLevel`, then %K crosses above %D.
If these filters agree, the strategy calls `strategy.entry("Long", strategy.long)`.
C) Exit condition (logical exits)
A position can be closed when:
1. `timeCondition` is true AND a long position is open, AND
2. At least one of the following is true:
- If `useOscExit` is true: Oscillator is below `exitLevel`.
- If `useMagicExit` (EMA Exit Filter) is true: EMA slope is negative (`isDown = true`).
In that case, `strategy.close("Long")` is called.
D) Risk-management exits
While a position is open:
• If SL or TP is enabled:
- `strategy.exit("Long Risk", ...)` places an OCO stop/limit order based on the SL/TP percentages.
• If Risk/Reward exit is enabled:
- `strategy.exit("RR Exit", ...)` places an OCO order using a projected R-multiple (`rrMult`) of the SL distance.
These risk-based exits can trigger before the logical oscillator/EMA exits if price hits those levels.
────────────────────────
5. Recommended backtest configuration (to avoid misleading results)
────────────────────────
To align with TradingView House Rules and avoid misleading backtests:
1. **Initial capital**
- 10 000 (or any value you personally want to work with).
2. **Order size**
- Type: **Percent of equity**
- Size: **1–2%** per trade is a reasonable starting point.
- Avoid risking more than 5–10% per trade if you want results that could be sustainable in practice.
3. **Commission & slippage**
- Commission: around 0.1% if that matches your broker.
- Slippage: a few ticks (e.g. 3) to account for real fills.
4. **Timeframe & markets**
- Volatile symbols (e.g. crypto like BTCUSDT, or major indices).
- Timeframes: 1H / 4H / **1D (Daily)** are typical starting points.
- I strongly recommend trying the strategy on **different timeframes**, for example 1D, to see how the behaviour changes between intraday and higher timeframes.
5. **No “caution warning”**
- Make sure your chosen symbol + timeframe + settings do not trigger TradingView’s caution messages.
- If you see warnings (e.g. “too few trades”), adjust timeframe/symbol or the backtest period.
────────────────────────
5a. About low trade count and rare signals
────────────────────────
This strategy is intentionally designed to trade RARELY:
• It is **long-only**.
• It uses strict filters (Range Oscillator threshold + Stochastic confirmation + optional EMA Exit Filter).
• On higher timeframes (especially **1D / Daily**) this can result in a **low total number of trades**, sometimes WELL BELOW 100 trades over the whole backtest.
TradingView’s House Rules mention 100+ trades as a guideline for more robust statistics. In this specific case:
• The **low trade count is a conscious design choice**, not an attempt to cherry-pick a tiny, ultra-profitable window.
• The goal is to study a **small number of high-conviction long entries** on higher timeframes, not to generate frequent intraday signals.
• Because of the low trade count, results should NOT be interpreted as statistically strong or “proven” – they are only one sample of how this logic would have behaved on past data.
Please keep this in mind when you look at the equity curve and performance metrics. A beautiful curve with only a handful of trades is still just a small sample.
────────────────────────
6. How to use this strategy (step-by-step)
────────────────────────
1. Add the script to your chart.
2. Open the **Inputs** tab:
- Set the backtest start year.
- Decide whether to use Oscillator-based entry/exit, Stochastic confirmation, and EMA Exit Filter.
- Optionally enable SL, TP, and Risk/Reward exits.
3. Open the **Properties** tab:
- Set a realistic account size if you want.
- Set order size to a realistic % of equity (e.g. 1–2%).
- Confirm that commission and slippage are realistic for your broker.
4. Run the backtest:
- Look at Net Profit, Max Drawdown, number of trades, and equity curve.
- Remember that a low trade count means the statistics are not very strong.
5. Experiment:
- Tweak thresholds (`entryLevel`, `exitLevel`), Stochastic settings, EMA length, and risk params.
- See how the metrics and trade frequency change.
6. Forward-test:
- Before using any idea in live trading, forward-test on a demo account and observe behaviour in real time.
────────────────────────
7. Originality and usefulness (why this is more than a mashup)
────────────────────────
This script is not intended to be a random visual mashup of indicators. It is designed as a coherent, testable strategy with clear roles for each component:
• Range Oscillator:
- Handles mean vs. range-expansion states via an adaptive, ATR-normalized metric.
• Stochastic:
- Acts as a timing filter to avoid entering purely on extremes and instead waits for momentum to turn.
• EMA Exit Filter:
- Trend-slope-based safety net to exit when the medium-term direction changes against the position.
• Risk module:
- Provides practical, rule-based exits: SL, TP, and R-multiple exit, which are useful for structuring risk even if you modify the core logic.
It aims to give traders a ready-made **framework to study and modify**, not a black box or “signals” product.
────────────────────────
8. Limitations and good practices
────────────────────────
• No single strategy works on all markets or in all regimes.
• This script is long-only; it does not short the market.
• Performance can degrade when market structure changes.
• Overfitting (curve fitting) is a real risk if you endlessly tweak parameters to maximise historical profit.
Good practices:
- Test on multiple symbols and timeframes.
- Focus on stability and drawdown, not only on how high the profit line goes.
- View this as a learning tool and a basis for your own research.
────────────────────────
9. Licensing and credits
────────────────────────
• Core oscillator idea & base code:
- “Range Oscillator (Zeiierman)”
- © Zeiierman, licensed under CC BY-NC-SA 4.0.
• Strategy logic, Stochastic confirmation, EMA Exit Filter, and risk-management layer:
- Modifications by jokiniemi.
Please respect both the original license and TradingView House Rules if you fork or republish any part of this script.
────────────────────────
10. No payments / no vendor pitch
────────────────────────
• This script is completely FREE to use on TradingView.
• There is no paid subscription, no external payment link, and no private signals group attached to it.
• If you have questions, please use TradingView’s comment system or private messages instead of expecting financial advice.
Use this script as a tool to learn, experiment, and build your own understanding of markets.
────────────────────────
11. Example backtest settings used in screenshots
────────────────────────
To avoid any confusion about how the results shown in screenshots were produced, here is one concrete example configuration:
• Symbol: BTCUSDT (or similar major BTC pair)
• Timeframe: 1D (Daily)
• Backtest period: from 2018 to the most recent data
• Initial capital: 10 000
• Order size type: Percent of equity
• Order size: 2% per trade
• Commission: 0.1%
• Slippage: 3 ticks
• Risk settings: Stop Loss and Take Profit disabled by default, Risk/Reward exit disabled by default
• Filters: Range Oscillator entry/exit enabled, Stochastic confirmation enabled, EMA Exit Filter enabled
If you change any of these settings (symbol, timeframe, risk per trade, commission, slippage, filters, etc.), your results will look different. Please always adapt the configuration to your own risk tolerance, market, and trading style.
DAO - Demand Advanced Oscillator# DAO - Demand Advanced Oscillator
## 📊 Overview
DAO (Demand Advanced Oscillator) is a powerful momentum oscillator that measures buying and selling pressure by analyzing consecutive high-low relationships. It helps identify market extremes, divergences, and potential trend reversals.
**Values range from 0 to 1:**
- **Above 0.70** = Overbought (potential reversal down)
- **Below 0.30** = Oversold (potential reversal up)
- **0.30 - 0.70** = Neutral zone
---
## ✨ Key Features
✅ **Automatic Divergence Detection**
- Bullish divergences (price lower low + DAO higher low)
- Bearish divergences (price higher high + DAO lower high)
- Visual lines connecting divergence points
✅ **Multi-Timeframe Analysis**
- View higher timeframe DAO on current chart
- Perfect for trend alignment strategies
✅ **Signal Line (EMA)**
- Customizable EMA for trend confirmation
- Crossover signals for momentum shifts
✅ **Real-Time Statistics Dashboard**
- Current DAO value
- Market status (Overbought/Oversold/Neutral)
- Trend direction indicator
✅ **Complete Alert System**
- Overbought/Oversold signals
- Bullish/Bearish divergences
- Signal line crosses
- Level crosses
✅ **Fully Customizable**
- Adjustable periods and levels
- Customizable colors and zones
- Toggle features on/off
---
## 📈 Trading Signals
### 1. Divergences (Most Powerful)
**Bullish Divergence:**
- Price makes lower low
- DAO makes higher low
- Signal: Strong reversal up likely
**Bearish Divergence:**
- Price makes higher high
- DAO makes lower high
- Signal: Strong reversal down likely
### 2. Overbought/Oversold
**Overbought (>0.70):**
- Market may be overextended
- Consider taking profits or looking for shorts
- Can remain overbought in strong trends
**Oversold (<0.30):**
- Market may be oversold
- Consider buying opportunities
- Can remain oversold in strong downtrends
### 3. Signal Line Crossovers
**Bullish Cross:**
- DAO crosses above signal line
- Momentum turning positive
**Bearish Cross:**
- DAO crosses below signal line
- Momentum turning negative
### 4. Level Crosses
**Cross Above 0.30:** Exiting oversold zone (potential uptrend)
**Cross Below 0.70:** Exiting overbought zone (potential downtrend)
---
## ⚙️ Default Settings
📊 Oscillator Period: 14
Number of bars for calculation
📈 Signal Line Period: 9
EMA period for signal line
🔴 Overbought Level: 0.70
Upper threshold
🟢 Oversold Level: 0.30
Lower threshold
🎯 Divergence Detection: ON
Auto divergence identification
⏰ Multi-Timeframe: OFF
Higher TF overlay (optional)
All parameters are fully customizable!
---
## 🔔 Alerts
Six pre-configured alerts available:
1. DAO Overbought
2. DAO Oversold
3. DAO Bullish Divergence
4. DAO Bearish Divergence
5. DAO Signal Cross Up
6. DAO Signal Cross Down
**Setup:** Right-click indicator → Add Alert → Choose condition
---
## 💡 How to Use
### Best Practices:
✅ Focus on divergences (strongest signals)
✅ Combine with support/resistance levels
✅ Use multiple timeframes for confirmation
✅ Wait for price action confirmation
✅ Practice proper risk management
### Avoid:
❌ Trading on indicator alone
❌ Fighting strong trends
❌ Ignoring market context
❌ Overtrading
### Recommended Settings by Trading Style:
**Day Trading:** Period 7-10, All alerts ON
**Swing Trading:** Period 14-21, Divergence alerts
**Scalping:** Period 5-7, Signal crosses
**Position Trading:** Period 21-30, Weekly/Daily TF
---
## 🌍 Markets & Timeframes
**Works on all markets:**
- Forex (all pairs)
- Stocks (all exchanges)
- Cryptocurrencies
- Commodities
- Indices
- Futures
**Works on all timeframes:** 1m to Monthly
---
## 📊 How It Works
DAO calculates the ratio of buying pressure to total market pressure:
1. **Calculate Buying Pressure (DemandMax):**
- If current high > previous high: DemandMax = difference
- Otherwise: DemandMax = 0
2. **Calculate Selling Pressure (DemandMin):**
- If previous low > current low: DemandMin = difference
- Otherwise: DemandMin = 0
3. **Apply Smoothing:**
- Calculate SMA of DemandMax over N periods
- Calculate SMA of DemandMin over N periods
4. **Final Formula:**
```
DAO = SMA(DemandMax) / (SMA(DemandMax) + SMA(DemandMin))
```
This produces a normalized value (0-1) representing market demand strength.
---
## 🎯 Trading Strategies
### Strategy 1: Divergence Trading
- Wait for divergence label
- Confirm at support/resistance
- Enter on confirming candle
- Stop loss beyond recent swing
- Target: opposite level or 0.50
### Strategy 2: Overbought/Oversold
- Best for ranging markets
- Wait for extreme readings
- Enter on reversal from extremes
- Target: middle line (0.50)
### Strategy 3: Trend Following
- Identify trend direction first
- Use DAO to time entries in trend direction only
- Enter on pullbacks to oversold (uptrend) or overbought (downtrend)
- Trade with the trend
### Strategy 4: Multi-Timeframe
- Enable MTF feature
- Trade only when both timeframes align
- Higher TF = trend direction
- Lower TF = precise entry
---
## 📂 Category
**Primary:** Oscillators
**Secondary:** Statistics, Volatility, Momentum
---
## 🏷️ Tags
dao, oscillator, momentum, overbought-oversold, divergence, reversal, demand-indicator, price-exhaustion, statistics, volatility, forex, stocks, crypto, multi-timeframe, technical-analysis
---
## ⚠️ Disclaimer
**This indicator is for educational purposes only.** It does not constitute financial advice. Trading involves substantial risk of loss. Always conduct your own research, use proper risk management, and consult with financial professionals before making trading decisions. Past performance does not guarantee future results.
---
## 📄 License
Open source - Free to use for personal trading, modify as needed, and share with attribution.
---
**Version:** 1.0
**Status:** Production Ready ✅
**Pine Script:** v5
**Trademark-Free:** 100% Safe to Publish
---
*Made with 💙 for traders worldwide*






















