Inversion Fair Value Gap Signals [AlgoAlpha]🟠 OVERVIEW
This script is a custom signal tool called Inversion Fair Value Gap Signals (IFVG) , designed to detect, track, and visualize fair value gaps (FVGs) and their inversions directly on price charts. It identifies bullish and bearish imbalances, monitors when these zones are mitigated or rejected, and extends them until resolution or expiration. What makes this script original is the inclusion of inversion logic—when a gap is filled, the area flips into an opposite "inversion fair value gap," creating potential reversal or continuation zones that give traders additional context beyond classic FVG analysis.
🟠 CONCEPTS
The script builds on the Smart Money Concepts (SMC) principle of fair value gaps, where inefficiencies form when price moves too quickly in one direction. Detection requires a three-bar sequence: a strong up or down move that leaves untraded price between bar highs and lows. To refine reliability, the script adds an ATR-based size filter and prevents overlap between zones. Once created, gaps are tracked in arrays until mitigation (price closing back into the gap), expiration, or transformation into an inversion zone. Inversions act as polarity flips, where bullish gaps become bearish resistance and bearish gaps become bullish support. Lower-timeframe volume data is also displayed inside zones to highlight whether buying or selling pressure dominated during gap creation.
🟠 FEATURES
Automatic detection of bullish and bearish FVGs with ATR-based thresholding.
Inversion logic: mitigated gaps flip into opposite-colored IFVG zones.
Volume text overlay inside each zone showing up vs down volume.
Visual markers (△/▽ for FVG, ▲/▼ for IFVG) when price exits a zone without mitigation.
🟠 USAGE
Apply the indicator to any chart and enable/disable bullish or bearish FVG detection depending on your focus. Use the colored gap zones as areas of interest: bullish gaps suggest possible continuation to the upside until mitigated, while bearish gaps suggest continuation down. When a gap flips into an inversion zone, treat it as potential support/resistance—bullish IFVGs below price may act as demand, while bearish IFVGs above price may act as supply. Watch the embedded up/down volume data to gauge the strength of participants during gap formation. Use the △/▽ and ▲/▼ markers to spot when price rejects gaps or inversions without filling them, which can indicate strong trending momentum. For practical use, combine alerts with your trade plan to track when new gaps form, when old ones are resolved, or when key zones flip into inversions, helping you align entries, targets, or reversals with institutional order flow logic.
Volume
RSI Signals Multi-Layer RSI System with Classical Divergence**DrFX RSI Signals Fixed** is an advanced RSI-based trading system that combines duration-filtered extreme conditions with classical divergence detection and momentum confirmation. This enhanced version addresses common RSI false signals through multi-layer filtering while adding proper divergence analysis for identifying high-probability reversal points.
**Core Innovation & Originality**
This indicator uniquely integrates five analytical layers:
1. **Duration-Validated Extreme Zones** - Confirms RSI has remained overbought/oversold for minimum bars within lookback period
2. **Classical Divergence Detection** - Proper implementation comparing swing highs/lows in both price and RSI
3. **Momentum Confirmation Signals** - RSI crossing 50-line after extreme conditions for trend confirmation
4. **Multi-Signal Classification** - Four distinct signal types (Buy, Sell, Strong Buy, Strong Sell, Momentum)
5. **Visual Zone Highlighting** - Background coloring for instant extreme zone identification
**Technical Implementation & Improvements**
**Enhanced Duration Filter:**
Unlike the previous version, this system uses a refined approach:
```
for i = 0 to lookback_bars - 1
if rsi > overbought
barsInOverbought := barsInOverbought + 1
```
This counts actual bars within the lookback period (default 20 bars) where RSI was extreme, requiring minimum duration (default 4 bars) for signal validation.
**Classical Divergence Detection:**
The system implements proper divergence analysis, a significant improvement over simple delta comparison:
**Bullish Divergence Logic:**
- Price makes lower low: `low < prevPriceLow`
- RSI makes higher low: `rsi > prevRsiLow`
- Indicates weakening downward momentum despite lower prices
**Bearish Divergence Logic:**
- Price makes higher high: `high > prevPriceHigh`
- RSI makes lower high: `rsi < prevRsiHigh`
- Indicates weakening upward momentum despite higher prices
**Signal Generation Framework:**
**Primary Signals:**
- **Buy Signal**: RSI crosses above oversold (30) after meeting duration requirements
- **Sell Signal**: RSI crosses below overbought (70) after meeting duration requirements
**Strong Signals:**
- **Strong Buy**: Buy signal + bullish divergence confirmation
- **Strong Sell**: Sell signal + bearish divergence confirmation
**Momentum Signals:**
- **Momentum Buy (M+)**: RSI crosses above 50 after recent oversold conditions
- **Momentum Sell (M-)**: RSI crosses below 50 after recent overbought conditions
**What Makes This Version Superior**
**Compared to Standard RSI:**
1. **Duration Requirement**: Prevents signals on brief RSI spikes
2. **Lookback Validation**: Ensures extreme conditions actually occurred recently
3. **Proper Divergence**: Uses swing high/low comparison, not just bar-to-bar deltas
4. **Momentum Layer**: Adds trend confirmation via 50-line crosses
**Compared to Previous Version:**
1. **Pine Script v5**: Modern syntax with improved performance
2. **Configurable Parameters**: All values adjustable via inputs
3. **Better Divergence**: Classical divergence logic replaces simplified delta method
4. **Additional Signals**: Momentum confirmations for trend following
5. **Visual Enhancements**: Background coloring and improved signal differentiation
6. **Alert System**: Built-in alert conditions for all signal types
**Parameter Configuration**
**Customizable Inputs:**
- **Overbought Level** (70): Upper threshold, range 50-90
- **Oversold Level** (30): Lower threshold, range 10-50
- **RSI Period** (14): Calculation period, range 2-50
- **Minimum Duration** (4): Required bars in extreme zone, range 1-20
- **Lookback Bars** (20): Period to check for extreme conditions, range 5-100
- **Divergence Lookback** (5): Period for divergence swing comparison, range 2-20
**Optimization Guidelines:**
- **Shorter Duration** (2-3): More frequent signals, higher noise
- **Longer Duration** (5-7): Fewer signals, better quality
- **Smaller Lookback** (10-15): Faster response, may miss context
- **Larger Lookback** (30-50): More context, potentially delayed signals
**Signal Interpretation Guide**
**Visual Signal Hierarchy:**
**Light Green Triangle (Buy):**
- RSI recovered from oversold
- Duration requirements met
- Entry on reversal from oversold territory
**Light Red Triangle (Sell):**
- RSI declined from overbought
- Duration requirements met
- Entry on reversal from overbought territory
**Blue Triangle (Strong Buy):**
- Buy signal with bullish divergence
- Highest probability long setup
- Price made lower low, RSI made higher low
**Magenta Triangle (Strong Sell):**
- Sell signal with bearish divergence
- Highest probability short setup
- Price made higher high, RSI made lower high
**Tiny Green Circle (M+):**
- RSI crossed above 50 after oversold
- Momentum confirmation for uptrend
- Secondary entry or trend confirmation
**Tiny Red Circle (M-):**
- RSI crossed below 50 after overbought
- Momentum confirmation for downtrend
- Secondary entry or trend confirmation
**Background Coloring:**
- **Light Red Background**: RSI > 70 (overbought zone)
- **Light Green Background**: RSI < 30 (oversold zone)
**Trading Strategy Application**
**Conservative Approach (Strong Signals Only):**
1. Wait for blue/magenta triangles (divergence confirmed)
2. Enter on signal bar close or next bar open
3. Stop loss beyond recent swing high/low
4. Target minimum 2:1 risk/reward ratio
**Aggressive Approach (All Signals):**
1. Take light green/red triangles for earlier entries
2. Use momentum circles as confirmation
3. Tighter stops with partial profit taking
4. Scale positions based on signal strength
**Momentum Trading:**
1. Use momentum signals (M+/M-) as trend filters
2. Take primary signals aligned with momentum direction
3. Avoid counter-momentum signals in strong trends
4. Exit when opposing momentum signal appears
**Multi-Timeframe Strategy:**
1. Check higher timeframe for strong signals
2. Execute on lower timeframe primary signals
3. Use momentum signals for position management
4. Align all timeframe signals for best probability
**Optimal Market Conditions**
**Best Performance:**
- Mean-reverting markets with clear RSI extremes
- Range-bound or consolidating conditions
- Markets respecting support/resistance levels
- Timeframes: 15min to 4H for active trading
**Strong Signal Advantages:**
- Divergence signals often mark major turning points
- Work well at market structure levels
- Effective in both trending and ranging markets
- Higher success rate justifies waiting for setup
**Momentum Signal Benefits:**
- Confirms trend direction after extreme readings
- Useful for adding to positions
- Helps avoid counter-trend trades
- Works well in trending markets where reversals fail
**Technical Advantages**
**Divergence Accuracy:**
The improved divergence detection uses proper swing analysis rather than simple bar-to-bar comparison. This identifies genuine momentum shifts where price action diverges from oscillator movement over a meaningful period.
**Duration Logic:**
The for-loop counting method ensures the system checks actual RSI values within the lookback period, not just whether RSI touched levels. This distinguishes between sustained conditions and brief spikes.
**Momentum Filter:**
The 50-line crosses after extreme conditions provide an additional confirmation layer, helping traders distinguish between failed reversals (no momentum follow-through) and sustained moves (momentum confirmation).
**Risk Management Integration**
**Signal Priority:**
1. **Highest**: Strong signals with divergence (blue/magenta triangles)
2. **Medium**: Primary signals without divergence (light green/red triangles)
3. **Confirmation**: Momentum signals (tiny circles)
**Position Sizing:**
- Larger positions on strong signals (divergence present)
- Standard positions on primary signals
- Smaller positions or adds on momentum signals
**Stop Placement:**
- Beyond recent swing structure
- Below/above divergence swing low/high for strong signals
- Trail stops when momentum signals align with position
**Alert System**
Built-in alert conditions for:
- Buy Signal: RSI buy without divergence
- Sell Signal: RSI sell without divergence
- Strong Buy Alert: Buy with bullish divergence
- Strong Sell Alert: Sell with bearish divergence
Configure alerts via TradingView's alert system to receive notifications for chosen signal types.
**Important Considerations**
**Strengths:**
- Multiple confirmation layers reduce false signals
- Classical divergence improves reversal detection
- Momentum signals add trend-following capability
- Highly customizable for different trading styles
- No repainting - all signals fixed at bar close
**Limitations:**
- Duration requirements may cause missed quick reversals
- Divergence lookback period affects sensitivity
- Not suitable as standalone system
- Requires understanding of RSI principles and divergence concepts
**Best Practices:**
- Combine with price action and support/resistance
- Use higher timeframe context for directional bias
- Respect overall market trend and structure
- Implement proper position sizing based on signal type
- Test parameters on your specific instrument and timeframe
**Comparison Summary**
This enhanced version represents a significant upgrade:
- Upgraded to Pine Script v5 modern standards
- Proper classical divergence detection (not simplified)
- Added momentum confirmation signals
- Fully customizable parameters via inputs
- Visual background zone highlighting
- Comprehensive alert system
- Better signal differentiation through color coding
The system transforms basic RSI analysis into a multi-dimensional trading tool suitable for various market conditions and trading styles.
**Disclaimer**: This indicator is designed for educational and analytical purposes. While the multi-layer filtering and classical divergence detection improve upon standard RSI implementations, no indicator guarantees profitable trades. The duration filtering reduces false signals but may delay entries. Divergence signals, while statistically favorable, can fail in strong trending conditions. Always use proper risk management, position sizing, and stop-loss orders. Consider multiple confirmation methods and market context before making trading decisions. Past performance does not guarantee future results.
BOCS AdaptiveBOCS Adaptive Strategy - Automated Volatility Breakout System
WHAT THIS STRATEGY DOES:
This is an automated trading strategy that detects consolidation patterns through volatility analysis and executes trades when price breaks out of these channels. Take-profit and stop-loss levels are calculated dynamically using Average True Range (ATR) to adapt to current market volatility. The strategy closes positions partially at the first profit target and exits the remainder at the second target or stop loss.
TECHNICAL METHODOLOGY:
Price Normalization Process:
The strategy begins by normalizing price to create a consistent measurement scale. It calculates the highest high and lowest low over a user-defined lookback period (default 100 bars). The current close price is then normalized using the formula: (close - lowest_low) / (highest_high - lowest_low). This produces values between 0 and 1, allowing volatility analysis to work consistently across different instruments and price levels.
Volatility Detection:
A 14-period standard deviation is applied to the normalized price series. Standard deviation measures how much prices deviate from their average - higher values indicate volatility expansion, lower values indicate consolidation. The strategy uses ta.highestbars() and ta.lowestbars() functions to track when volatility reaches peaks and troughs over the detection length period (default 14 bars).
Channel Formation Logic:
When volatility crosses from a high level to a low level, this signals the beginning of a consolidation phase. The strategy records this moment using ta.crossover(upper, lower) and begins tracking the highest and lowest prices during the consolidation. These become the channel boundaries. The duration between the crossover and current bar must exceed 10 bars minimum to avoid false channels from brief volatility spikes. Channels are drawn using box objects with the recorded high/low boundaries.
Breakout Signal Generation:
Two detection modes are available:
Strong Closes Mode (default): Breakout occurs when the candle body midpoint math.avg(close, open) exceeds the channel boundary. This filters out wick-only breaks.
Any Touch Mode: Breakout occurs when the close price exceeds the boundary.
When price closes above the upper channel boundary, a bullish breakout signal generates. When price closes below the lower boundary, a bearish breakout signal generates. The channel is then removed from the chart.
ATR-Based Risk Management:
The strategy uses request.security() to fetch ATR values from a specified timeframe, which can differ from the chart timeframe. For example, on a 5-minute chart, you can use 1-minute ATR for more responsive calculations. The ATR is calculated using ta.atr(length) with a user-defined period (default 14).
Exit levels are calculated at the moment of breakout:
Long Entry Price = Upper channel boundary
Long TP1 = Entry + (ATR × TP1 Multiplier)
Long TP2 = Entry + (ATR × TP2 Multiplier)
Long SL = Entry - (ATR × SL Multiplier)
For short trades, the calculation inverts:
Short Entry Price = Lower channel boundary
Short TP1 = Entry - (ATR × TP1 Multiplier)
Short TP2 = Entry - (ATR × TP2 Multiplier)
Short SL = Entry + (ATR × SL Multiplier)
Trade Execution Logic:
When a breakout occurs, the strategy checks if trading hours filter is satisfied (if enabled) and if position size equals zero (no existing position). If volume confirmation is enabled, it also verifies that current volume exceeds 1.2 times the 20-period simple moving average.
If all conditions are met:
strategy.entry() opens a position using the user-defined number of contracts
strategy.exit() immediately places a stop loss order
The code monitors price against TP1 and TP2 levels on each bar
When price reaches TP1, strategy.close() closes the specified number of contracts (e.g., if you enter with 3 contracts and set TP1 close to 1, it closes 1 contract). When price reaches TP2, it closes all remaining contracts. If stop loss is hit first, the entire position exits via the strategy.exit() order.
Volume Analysis System:
The strategy uses ta.requestUpAndDownVolume(timeframe) to fetch up volume, down volume, and volume delta from a specified timeframe. Three display modes are available:
Volume Mode: Shows total volume as bars scaled relative to the 20-period average
Comparison Mode: Shows up volume and down volume as separate bars above/below the channel midline
Delta Mode: Shows net volume delta (up volume - down volume) as bars, positive values above midline, negative below
The volume confirmation logic compares breakout bar volume to the 20-period SMA. If volume ÷ average > 1.2, the breakout is classified as "confirmed." When volume confirmation is enabled in settings, only confirmed breakouts generate trades.
INPUT PARAMETERS:
Strategy Settings:
Number of Contracts: Fixed quantity to trade per signal (1-1000)
Require Volume Confirmation: Toggle to only trade signals with volume >120% of average
TP1 Close Contracts: Exact number of contracts to close at first target (1-1000)
Use Trading Hours Filter: Toggle to restrict trading to specified session
Trading Hours: Session input in HHMM-HHMM format (e.g., "0930-1600")
Main Settings:
Normalization Length: Lookback bars for high/low calculation (1-500, default 100)
Box Detection Length: Period for volatility peak/trough detection (1-100, default 14)
Strong Closes Only: Toggle between body midpoint vs close price for breakout detection
Nested Channels: Allow multiple overlapping channels vs single channel at a time
ATR TP/SL Settings:
ATR Timeframe: Source timeframe for ATR calculation (1, 5, 15, 60, etc.)
ATR Length: Smoothing period for ATR (1-100, default 14)
Take Profit 1 Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 2.0)
Take Profit 2 Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 3.0)
Stop Loss Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 1.0)
Enable Take Profit 2: Toggle second profit target on/off
VISUAL INDICATORS:
Channel boxes with semi-transparent fill showing consolidation zones
Green/red colored zones at channel boundaries indicating breakout areas
Volume bars displayed within channels using selected mode
TP/SL lines with labels showing both price level and distance in points
Entry signals marked with up/down triangles at breakout price
Strategy status table showing position, contracts, P&L, ATR values, and volume confirmation status
HOW TO USE:
For 2-Minute Scalping:
Set ATR Timeframe to "1" (1-minute), ATR Length to 12, TP1 Multiplier to 2.0, TP2 Multiplier to 3.0, SL Multiplier to 1.5. Enable volume confirmation and strong closes only. Use trading hours filter to avoid low-volume periods.
For 5-15 Minute Day Trading:
Set ATR Timeframe to match chart or use 5-minute, ATR Length to 14, TP1 Multiplier to 2.0, TP2 Multiplier to 3.5, SL Multiplier to 1.2. Volume confirmation recommended but optional.
For Hourly+ Swing Trading:
Set ATR Timeframe to 15-30 minute, ATR Length to 14-21, TP1 Multiplier to 2.5, TP2 Multiplier to 4.0, SL Multiplier to 1.5. Volume confirmation optional, nested channels can be enabled for multiple setups.
BACKTEST CONSIDERATIONS:
Strategy performs best during trending or volatility expansion phases
Consolidation-heavy or choppy markets produce more false signals
Shorter timeframes require wider stop loss multipliers due to noise
Commission and slippage significantly impact performance on sub-5-minute charts
Volume confirmation generally improves win rate but reduces trade frequency
ATR multipliers should be optimized for specific instrument characteristics
COMPATIBLE MARKETS:
Works on any instrument with price and volume data including forex pairs, stock indices, individual stocks, cryptocurrency, commodities, and futures contracts. Requires TradingView data feed that includes volume for volume confirmation features to function.
KNOWN LIMITATIONS:
Stop losses execute via strategy.exit() and may not fill at exact levels during gaps or extreme volatility
request.security() on lower timeframes requires higher-tier TradingView subscription
False breakouts inherent to breakout strategies cannot be completely eliminated
Performance varies significantly based on market regime (trending vs ranging)
Partial closing logic requires sufficient position size relative to TP1 close contracts setting
RISK DISCLOSURE:
Trading involves substantial risk of loss. Past performance of this or any strategy does not guarantee future results. This strategy is provided for educational purposes and automated backtesting. Thoroughly test on historical data and paper trade before risking real capital. Market conditions change and strategies that worked historically may fail in the future. Use appropriate position sizing and never risk more than you can afford to lose. Consider consulting a licensed financial advisor before making trading decisions.
ACKNOWLEDGMENT & CREDITS:
This strategy is built upon the channel detection methodology created by AlgoAlpha in the "Smart Money Breakout Channels" indicator. Full credit and appreciation to AlgoAlpha for pioneering the normalized volatility approach to identifying consolidation patterns and sharing this innovative technique with the TradingView community. The enhancements added to the original concept include automated trade execution, multi-timeframe ATR-based risk management, partial position closing by contract count, volume confirmation filtering, and real-time position monitoring.
Quadro Volume Profile [BigBeluga]🔵 OVERVIEW
The Quadro Volume Profile is a precision-engineered volume profiling tool that segments market activity into four distinct quadrants surrounding the current price. By separating bullish and bearish volume above and below the current price, it helps traders identify dominant forces and high-interest price zones with ease. Each quadrant includes label annotations showing total volume and its share of overall activity — delivering powerful insights into the market’s internal structure.
🔵 CONCEPTS
Four-Quadrant Volume Distribution : Volume is separated into Buy and Sell profiles both above and below the current price.
Directional Volume Logic : Bullish and bearish candle volume is allocated to specific bins, creating color-coded volume stacks.
Dynamic PoC Detection : Point of Control (PoC) levels are calculated per quadrant and optionally displayed.
Lookback-Based Anchoring : The volume histogram is anchored to a fixed lookback window, ensuring consistency and historical context.
Label-Based Analytics : Each quadrant displays a labeled breakdown of direction, total volume, and percentage weight of total activity.
🔵 FEATURES
Four separate volume profiles:
Upper Left: Bearish volume (Sell Quad above price)
Upper Right: Bullish volume (Buy Quad above price)
Lower Left: Bullish volume (Buy Quad below price)
Lower Right: Bearish volume (Sell Quad below price)
Live Labels for Each Quad:
Displays BUY or SELL direction
Shows total volume per quadrant (e.g. 607.49K)
Displays percent share of total quad volume (e.g. 18.87%)
Toggle visibility for each profile and each Point of Control (PoC) dashed PoC lines with volume annotations
Adjustable calculation period (lookBack), number of bins, and horizontal offset
Color gradient intensity represents volume strength per bin
Auto-cleaning visuals to keep the chart uncluttered
Gradient color control for Buy and Sell volumes
Clean midline split between upper and lower quadrants
🔵 HOW TO USE
Select your desired calculation period (default: 200 bars) to define the range for volume analysis.
Adjust the bins parameter for more or less resolution in volume distribution.
Toggle each quadrant on/off depending on your preference using the settings panel:
“Upper Sell Quad” – shows bearish volume above current price (left)
“Upper Buy Quad” – shows bullish volume above current price (right)
“Lower Buy Quad” – shows bullish volume below current price (left)
“Lower Sell Quad” – shows bearish volume below current price (right)
Enable or disable PoC lines for each quad to highlight where volume peaked.
Use the gradient coloring to identify volume imbalances — sharp differences between opposing quads often indicate key zones of rejection or breakout.
Monitor the midline level which splits the four quadrants — it serves as a psychological pivot zone.
🔵 CONCLUSION
The Quadro Volume Profile offers a powerful and visually intuitive way to dissect market activity around price. By splitting volume into four quadrants, traders can better interpret order flow, identify dominant volume zones, and spot potential reversals or continuation setups. Whether you're trading breakouts, liquidity sweeps, or range-bound behavior — this tool adds a structured layer of volume context to your charting workflow.
Momentum Volume Analyzer [CHE] Momentum Volume Analyzer — Adaptive momentum with volume-gated signals and expressive visual cues
Summary
This indicator combines a normalized momentum oscillator with a volume Z-score gate and adaptive gradient visuals. The oscillator centers around a midline and scales between a lower and an upper bound. Intensity is derived from the distance to the midline and is normalized inside a rolling window, which helps keep contrast consistent across regimes. Volume pressure is compressed to a discrete level between one and ten and is used to qualify momentum flips and extremes. Layered “burst” markers and optional background gradients provide immediate visual emphasis without adding new data sources. Pine version is v6. The script runs in a separate pane.
Motivation: Why this design?
Common oscillators flip rapidly during noisy conditions or flatten during calm periods, which obscures actionable shifts. A rolling normalization keeps the visual intensity stable across different regimes, and a volume gate reduces reactions when participation is weak. The goal is clearer momentum shifts that are supported by measurable activity rather than cosmetic smoothing alone.
What’s different vs. standard approaches?
Baseline reference: Classical RSI-style oscillators or simple filtered momentum without volume gating.
Architecture differences:
Local window normalization with gamma control for contrast.
Volume converted to a Z-score and compressed into a discrete level between one and ten with a configurable cap.
Directional color gradients that intensify with distance from the midline.
Layered glow markers with optional trail and an internal label budget to avoid UI overload.
Practical effect: Signals are visually stronger only when both momentum and volume align; background and line colors convey regime strength at a glance.
How it works (technical)
Momentum core: A high-pass path with automatic gain control produces a bounded oscillator centered around a midline. A simple moving average smooths the result over a short window.
Normalization and contrast: The absolute distance from the midline is scaled inside a rolling window and limited between zero and one. Two gamma parameters separately shape contrast for the line and for labels.
Coloring: When the oscillator is above the midline, a green gradient is used; below the midline, a red gradient is used. Intensity increases with normalized distance. Optional area fill to the midline and a background gradient reinforce strength.
Volume levels: Volume is standardized over a lookback window, clipped by a user cap, and mapped to a level between one and ten. Only positive excursions are considered; non-positive values map to zero.
Event markers: When the oscillator reaches extreme zones and the volume level is positive, the script spawns layered circular labels at fixed y-positions. A small trail can extend behind the event. An internal queue discards the oldest labels when a user-defined maximum is exceeded.
Alerts: Alerts fire on overbought and oversold spikes, midline shifts with minimum intensity and volume, and continuation patterns inside strong zones.
Parameter Guide
TFRSI length (default six): Core momentum lookback. Shorter values react faster but are less stable.
Signal SMA (default two): Light smoothing of the oscillator. Larger values reduce jitter.
Gradient window (default one hundred): Normalization window for intensity. Longer values produce steadier contrast but slower adaptation.
Line/marker transparency (default zero): Visual prominence of drawings. Higher values reduce dominance.
Background on and BG transparency (defaults true and eighty-five): Enables and tunes the pane background gradient.
Area fill to fifty and Fill transparency (defaults true and eighty): Fills between the oscillator and the midline.
Gamma bars/labels and Gamma plot (defaults zero point seven and zero point eight): Contrast shapers for markers and line. Higher values compress low intensities.
Bottom marker and Show last N (defaults true and three hundred thirty-three): Optional compact heat markers with a display cap.
Up/Down colors: Dark and neon pairs for positive and negative regimes.
Lookback (default two hundred) and Z cap (default five): Volume standardization window and clipping level before scaling to one through ten.
Enable bursts, Layers, Trail, Trail transparency, Max live labels, Size scale: Control the layered glow effect, trail length, opacity, label budget, and size multiplier. Reducing the size scale lowers visual dominance.
Spike min level, Shift min level, Min intensity, Rise/Fall length: Gates for alerts; adjust to balance sensitivity and false positives.
Reading & Interpretation
Line color and intensity: Green shades above the midline indicate bullish pressure; red shades below indicate bearish pressure. Stronger color corresponds to stronger normalized distance.
Background and fill: Reinforce regime strength; consider reducing transparency when the pane feels too busy.
Bursts and trails: Emphasize volume-backed extremes. Larger bursts reflect stronger volume levels or scaling choices.
Volume level: Internal level between one and ten. Levels near the upper bound signal exceptional activity.
Practical Workflows & Combinations
Trend following: Use midline cross upward with minimum shift level and intensity as a trigger. Confirm with structure such as higher highs and higher lows. For shorts, reverse the conditions.
Exits and risk: Fade exposure when intensity weakens toward the midline or when volume level drops below the shift threshold. Consider disabling bursts when monitoring many symbols.
Multi-asset and multi-timeframe: Defaults are designed to travel across liquid futures, large-cap equities, and major crypto pairs. For higher timeframes, increase the lookback window and consider reducing the Z cap.
Behavior, Constraints & Performance
Repaint and confirmation: Signals are evaluated on the live bar. They can appear and withdraw before bar close. For confirmed signals, require closed-bar alerts or manual confirmation.
Higher-timeframe sources: Not used. No `security` calls.
Resources: `max_bars_back` is two thousand. The script uses arrays and label objects, including loops for trails. The label budget mitigates clutter.
Known limits: Very illiquid symbols with unstable volume can reduce the usefulness of the Z-score. Sharp regime changes can still produce brief flips.
Sensible Defaults & Quick Tuning
Starting point: TFRSI length six, Signal two, Gradient window one hundred, Z cap five, Spike level six, Shift level four, Min intensity zero point four, Rise length three, Size scale zero point five.
Too many flips: Increase Signal, increase Gradient window, or raise Shift level.
Too sluggish: Decrease TFRSI length or reduce Gradient window.
Bursts too dominant: Lower Size scale or reduce Layers; increase Trail transparency or set Trail length to zero.
What this indicator is—and isn’t
This is a visualization and signal layer that couples momentum with a volume gate and adaptive visuals. It is not a complete trading system, optimizer, or predictor. Use it together with market structure, risk controls, and position management.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Best regards and happy trading
Chervolino
Smart Money Support/Resistance — LiteSmart Money Support/Resistance — Lite
Overview & Methodology
This indicator identifies support and resistance as zones derived from concentrated buying and selling pressure, rather than relying solely on traditional swing highs/lows. Its design focuses on transparency: how data is sourced, how zones are computed, and how the on‑chart display should be interpreted.
Lower‑Timeframe (LTF) Data
The script requests Up Volume, Down Volume, and Volume Delta from a lower timeframe to expose intrabar order‑flow structure that the chart’s native timeframe cannot show. In practical terms, this lets you see where buyers or sellers briefly dominated inside the body of a higher‑timeframe bar.
bool use_custom_tf_input = input.bool(true, title="Use custom lower timeframe", tooltip="Override the automatically chosen lower timeframe for volume calculations.", group=grpVolume)
string custom_tf_input = input. Timeframe("1", title="Lower timeframe", tooltip="Lower timeframe used for up/down volume calculations (default 5 seconds).", group=grpVolume)
import TradingView/ta/10 as tvta
resolve_lower_tf(useCustom, customTF) =>
useCustom ? customTF :
timeframe.isseconds ? "1S" :
timeframe.isintraday ? "1" :
timeframe.isdaily ? "5" : "60"
get_up_down_volume(lowerTf) =>
= tvta.requestUpAndDownVolume(lowerTf)
var float upVolume = na
var float downVolume = na
var float deltaVolume = na
string lower_tf = resolve_lower_tf(use_custom_tf_input, custom_tf_input)
= get_up_down_volume(lower_tf)
upVolume := u_tmp
downVolume := d_tmp
deltaVolume := dl_tmp
• Data source: TradingView’s ta.requestUpAndDownVolume(lowerTf) via the official TA library.
• Plan capabilities: higher‑tier subscriptions unlock seconds‑based charts and allow more historical bars per chart. This expands both the temporal depth of LTF data and the precision of short‑horizon analysis, while base tiers provide minute‑level data suitable for day/short‑swing studies.
• Coverage clarity: a small on‑chart Coverage Panel reports the active lower timeframe, the number of bars covered, and the latest computed support/resistance ranges so you always know the bounds of valid LTF input.
Core Method
1) Data acquisition (LTF)
The script retrieves three series from the chosen lower timeframe:
– Up Volume (buyers)
– Down Volume (sellers)
– Delta (Up – Down)
2) Rolling window & extrema
Over a user‑defined lookback (Global Volume Period), the algorithm builds rolling arrays of completed bars and scans for extrema:
– Buyers_max / Buyers_min from Up Volume
– Sellers_max / Sellers_min from Down Volume
Only completed bars are considered; the current bar is excluded for stability.
3) Price mapping
The extrema are mapped back to their source candles to obtain price bounds:
– For “maximum” roles the algorithm uses the relevant candle highs.
– For “minimum” roles it uses the relevant candle lows.
These pairs define candidate resistance (max‑based) and support (min‑based) zones or vice versa.
4) Zone construction & minimum width
To ensure practicality on all symbols, zones enforce a minimum vertical thickness of two ticks. This prevents visually invisible or overly thin ranges on instruments with tight ticks.
5) Vertical role resolution
When both max‑ and min‑based zones exist, the script compares their midpoints. If, due to local price structure, the min‑based zone sits above the max‑based zone, display roles are swapped so the higher zone is labeled Resistance and the lower zone Support. Colors/widths are updated accordingly to keep the visual legend consistent.
6) Rendering & panel
Two horizontal lines and a filled box represent each active zone. The Coverage Panel (bottom‑right by default) prints:
– Lower‑timeframe in use
– Number of bars covered by LTF data
– Current Support and Resistance ranges
If the two zones overlap, an additional “Range Market” note is shown.
Key Inputs
• Global Volume Period: shared lookback window for the extrema search.
• Lower timeframe: user‑selectable override of the automatically resolved lower timeframe.
• Visualization toggles: independent show/hide controls and colors for maximum (resistance) and minimum (support) zones.
• Coverage Panel: enable/disable the single‑cell table and its readout.
Operational Notes
• The algorithm aligns all lookups to completed bars (no peeking). Price references are shifted appropriately to avoid using the still‑forming bar in calculations.
• Second‑based lower timeframes improve granularity for scalping and very short‑term entries. Minute‑based lower timeframes provide broader coverage for intraday and short‑swing contexts.
• Use the Coverage Panel to confirm the true extent of available LTF history on your symbol/plan before drawing conclusions from very deep lookbacks.
Visual Walkthrough
A step‑by‑step image sequence accompanies this description. Each figure demonstrates how the indicator reads LTF volume, locates extrema, builds price‑mapped zones, and updates labels/colors when vertical order requires it.
Chart Interpretation
This chart illustrates two distinct perspectives of the Smart Money Support/Resistance — Lite indicator, each derived from different lookback horizons and lower-timeframe (LTF) resolutions.
1- Short-term view (43 bars, 10-second LTF)
Using the most recent 43 completed bars with 10-second intrabar data, the algorithm detects that both maximum and minimum volume extrema fall within a narrow range. The result is a clearly identified range market: resistance between 178.15–184.55 and support between 175.02–179.38.
The Coverage Panel (bottom-right) confirms the scope of valid input: the lower timeframe used, number of bars covered, and the resulting zones. This short-term scan highlights how the indicator adapts to limited data depth, flagging sideways structure where neither side dominates.
2 - Long-term view (120 bars, 30-second LTF)
Over a wider 120-bar lookback with higher-granularity 30-second data, broader supply and demand zones emerge.
– The long-term resistance zone captures the concentration of buyers and sellers at the upper boundary of recent price history.
– The long-term support zone anchors to the opposite side of the distribution, derived from maxima and minima of both buying and selling pressure.
These zones reflect deeper structural levels where market participants previously committed significant volume.
Combined Perspective
By aligning the short-term and long-term outputs, the chart shows how the indicator distinguishes immediate consolidation (range market) from more durable support and resistance levels derived from extended history. This dual resolution approach makes clear that support and resistance are not static lines but dynamic zones, dependent on both timeframe depth and the resolution of intrabar volume data.
FSVZO | Lyro RSFSVZO | Lyro RS
This script is a technical analysis tool called the FSVZO, or Fourier Smoothed Volume Zone Oscillator. It is designed to analyze market momentum and trend strength by combining price and volume data with advanced smoothing techniques. The goal is to help identify potential trends, overbought/oversold conditions, and divergence signals in a clear visual format.
Understanding the Indicator's Components
The indicator plots a main oscillator line and several supporting elements on a separate pane below the chart.
The Main Oscillator: This is the primary, colored wave. Its movement and color are key to interpretation.
Trend Direction: The color shifts between bullish and bearish tones based on the momentum of the oscillator. This provides a quick visual reference for the prevailing short-term trend.
Key Levels: Horizontal lines mark significant levels such as +60, +85, -60, and -85. Movements above +60 or below -60 can indicate strong momentum, while approaches to the extreme levels (+85/-85) may suggest overbought or oversold conditions.
Divergence Detection: The indicator can plot labels ("ℝ" for Regular, "ℍ" for Hidden) on the oscillator to signal potential divergences. These occur when the indicator's direction differs from the price action on the main chart and can sometimes foreshadow reversals or continuations.
Moving Average (MA): A central moving average line, based on the oscillator, helps to smooth out the data further and can act as a dynamic support or resistance level within the indicator pane.
White Noise Filter (Optional): This feature displays a histogram that represents market noise. It can be toggled on or off. Analyzing the histogram's behavior may provide additional context on the stability or volatility of the current trend.
Dynamic Background: The background of the indicator pane can change color to highlight periods where the momentum is particularly strong, based on the position of the moving average.
Suggested Use and Interpretation
Traders might use this indicator in several ways:
Trend Identification: Observe the color and position of the main oscillator. A predominantly bullish-colored oscillator above the zero line may suggest an upward trend, while a bearish-colored one below zero may suggest a downward trend.
Signal Confirmation: Look for the oscillator to cross key levels (like +/-40 or +/-60) in the direction of a suspected trend as a confirmation signal.
Divergence Analysis: When the price makes a new high or low that is not confirmed by a new high or low on the FSVZO oscillator (a divergence), it can be a warning of potential weakness in the trend. The "ℝ" and "ℍ" labels help to identify these scenarios.
Extreme Readings: Readings near the +85 or -85 levels can indicate that a price move may be overextended, which could precede a pause or reversal.
Customization Options
The indicator includes settings groups that allow you to adjust its behavior and appearance:
FSVZO Settings: Adjust parameters like Length and Sensitivity to make the oscillator more or less responsive to market movements.
Signals & Display: Modify visual aspects such as Smooth Length and Glowing Amount, or toggle features like the dynamic background on and off.
Colors: Choose from several pre-set color palettes to suit your visual preferences.
⚠️Disclaimer
This indicator is a tool for technical analysis and does not provide guaranteed results. It should be used in conjunction with other analysis methods and proper risk management practices. The creators of this indicator are not responsible for any financial decisions made based on its signals.
VWAP Momentum Oscillator How It Works
Core Calculation Method
The oscillator combines four key market measurements into a single, normalized reading:
1. Price-VWAP Deviation: `(Close - VWAP) / VWAP × 100`
2. VWAP-MA Momentum: `(VWAP - MovingAverage) / MovingAverage × 100`
3. Anchored VWAP Strength: Average of high/low anchor deviations from rolling VWAP
4. Range Position: `(Close - PeriodLow) / (PeriodHigh - PeriodLow) × 100 - 50`
Dynamic Signal Line
The signal line uses an EMA that automatically adjusts its length based on your chart timeframe:
- Futures: Always covers 23 hours of trading (1,380 minutes)
- Stocks: Always covers 6.5 hours of trading (390 minutes)
- Examples: 276 periods on 5-min futures chart, 1,380 periods on 1-min futures chart
Trading Signals
🟢 Buy Signals
- Condition: Main oscillator crosses above signal line while below zero
- Logic: Momentum turning bullish from oversold conditions
- Visual: Green "BUY" label below price action
🔴 Sell Signals
- Condition: Main oscillator crosses below signal line while above zero
- Logic: Momentum turning bearish from overbought conditions
- Visual: Red "SELL" label above price action
⚠️ Extreme Warnings
- Extreme Overbought: Red triangle when oscillator crosses above +4.0
- Extreme Oversold: Green triangle when oscillator crosses below -4.0
- Purpose: Risk management alerts, not entry/exit signals
Oscillator Zones
Interpretation Guide
- Above +2.0: Strong bullish momentum zone (green background)
- 0 to +2.0: Mild bullish territory
- 0 to -2.0: Mild bearish territory
- Below -2.0: Strong bearish momentum zone (red background)
- Above +4.0: Extreme overbought (caution advised)
- Below -4.0: Extreme oversold (potential reversal zone)
Customization Options
Moving Average Settings
- EMA/SMA Toggle: Choose between exponential or simple moving average
- Color Customization: Adjust MA line color and width
Visual Controls
- Bullish/Bearish Colors: Customize momentum zone colors
- Signal Line: Toggle visibility and adjust color
- Line Widths: Control thickness of all plot lines
Anchor Modes
- NY Session Only: Anchors reset at NY market open (9:30 AM ET)
- 24H NY Day: Anchors reset at NY calendar day change (midnight ET)
Best Practices
Timeframe Selection
- Scalping: 1-5 minute charts for quick momentum changes
- Day Trading: 5-15 minute charts for clearer trend signals
- Swing Trading: 1-4 hour charts for major momentum shifts
Signal Confirmation
- Wait for crossovers: Don't trade on oscillator position alone
- Respect extreme levels: Exercise caution above +4 or below -4
- Use with price action: Combine with support/resistance levels
Risk Management
- Extreme zones: Reduce position size when oscillator is extended
- Failed signals: Exit quickly if momentum doesn't follow through
- Market context: Consider overall trend direction and market volatility
Technical Specifications
Calculation Components
- Base Length: 1,380 periods (futures) / 390 periods (stocks)
- Signal Line: Dynamic EMA covering one full trading day
- Smoothing: 3-period SMA on raw oscillator (adjustable)
- Update Frequency: Real-time on every price tick
Performance Notes
- Resource Efficient: Optimized calculations minimize CPU usage
- Memory Friendly: Uses incremental VWAP calculations
- Fast Loading: Minimal historical data requirements
Version History & Development
This oscillator evolved from advanced VWAP overlay strategies, transforming complex multi-line analysis into a single, actionable momentum gauge. The indicator maintains the sophistication of institutional VWAP analysis while providing the clarity needed for retail trading decisions.
Core Philosophy
Traditional VWAP indicators show where price is relative to volume-weighted averages, but they don't quantify momentum or provide clear entry/exit signals. This oscillator solves that problem by normalizing all VWAP relationships into a single, bounded indicator that works consistently across all timeframes and asset classes.
---
Open Source License: This indicator is provided free for the TradingView community. Feel free to modify and enhance according to your trading needs.
Volume Delta Volume Signals by Claudio [hapharmonic]// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// © hapharmonic
//@version=6
FV = format.volume
FP = format.percent
indicator('Volume Delta Volume Signals by Claudio ', format = FV, max_bars_back = 4999, max_labels_count = 500)
//------------------------------------------
// Settings |
//------------------------------------------
bool usecandle = input.bool(true, title = 'Volume on Candles',display=display.none)
color C_Up = input.color(#12cef8, title = 'Volume Buy', inline = ' ', group = 'Style')
color C_Down = input.color(#fe3f00, title = 'Volume Sell', inline = ' ', group = 'Style')
// ✅ Nueva entrada para colores de señales
color buySignalColor = input.color(color.new(color.green, 0), "Buy Signal Color", group = "Signals")
color sellSignalColor = input.color(color.new(color.red, 0), "Sell Signal Color", group = "Signals")
string P_ = input.string(position.top_right,"Position",options = ,
group = "Style",display=display.none)
string sL = input.string(size.small , 'Size Label', options = , group = 'Style',display=display.none)
string sT = input.string(size.normal, 'Size Table', options = , group = 'Style',display=display.none)
bool Label = input.bool(false, inline = 'l')
History = input.bool(true, inline = 'l')
// Inputs for EMA lengths and volume confirmation
bool MAV = input.bool(true, title = 'EMA', group = 'EMA')
string volumeOption = input.string('Use Volume Confirmation', title = 'Volume Option', options = , group = 'EMA',display=display.none)
bool useVolumeConfirmation = volumeOption == 'none' ? false : true
int emaFastLength = input(12, title = 'Fast EMA Length', group = 'EMA',display=display.none)
int emaSlowLength = input(26, title = 'Slow EMA Length', group = 'EMA',display=display.none)
int volumeConfirmationLength = input(6, title = 'Volume Confirmation Length', group = 'EMA',display=display.none)
string alert_freq = input.string(alert.freq_once_per_bar_close, title="Alert Frequency",
options= ,group = "EMA",
tooltip="If you choose once_per_bar, you will receive immediate notifications (but this may cause interference or indicator repainting).
However, if you choose once_per_bar_close, it will wait for the candle to confirm the signal before notifying.",display=display.none)
//------------------------------------------
// UDT_identifier |
//------------------------------------------
type OHLCV
float O = open
float H = high
float L = low
float C = close
float V = volume
type VolumeData
float buyVol
float sellVol
float pcBuy
float pcSell
bool isBuyGreater
float higherVol
float lowerVol
color higherCol
color lowerCol
//------------------------------------------
// Calculate volumes and percentages |
//------------------------------------------
calcVolumes(OHLCV ohlcv) =>
var VolumeData data = VolumeData.new()
data.buyVol := ohlcv.V * (ohlcv.C - ohlcv.L) / (ohlcv.H - ohlcv.L)
data.sellVol := ohlcv.V - data.buyVol
data.pcBuy := data.buyVol / ohlcv.V * 100
data.pcSell := 100 - data.pcBuy
data.isBuyGreater := data.buyVol > data.sellVol
data.higherVol := data.isBuyGreater ? data.buyVol : data.sellVol
data.lowerVol := data.isBuyGreater ? data.sellVol : data.buyVol
data.higherCol := data.isBuyGreater ? C_Up : C_Down
data.lowerCol := data.isBuyGreater ? C_Down : C_Up
data
//------------------------------------------
// Get volume data |
//------------------------------------------
ohlcv = OHLCV.new()
volData = calcVolumes(ohlcv)
// Plot volumes and create labels
plot(ohlcv.V, color=color.new(volData.higherCol, 90), style=plot.style_columns, title='Total',display = display.all - display.status_line)
plot(ohlcv.V, color=volData.higherCol, style=plot.style_stepline_diamond, title='Total2', linewidth = 2,display = display.pane)
plot(volData.higherVol, color=volData.higherCol, style=plot.style_columns, title='Higher Volume', display = display.all - display.status_line)
plot(volData.lowerVol , color=volData.lowerCol , style=plot.style_columns, title='Lower Volume',display = display.all - display.status_line)
S(D,F)=>str.tostring(D,F)
volStr = S(math.sign(ta.change(ohlcv.C)) * ohlcv.V, FV)
buyVolStr = S(volData.buyVol , FV )
sellVolStr = S(volData.sellVol , FV )
// ✅ MODIFICACIÓN: Porcentaje sin decimales
buyPercentStr = str.tostring(math.round(volData.pcBuy)) + " %"
sellPercentStr = str.tostring(math.round(volData.pcSell)) + " %"
totalbuyPercentC_ = volData.buyVol / (volData.buyVol + volData.sellVol) * 100
sup = not na(ohlcv.V)
if sup
TC = text.align_center
CW = color.white
var table tb = table.new(P_, 6, 6, bgcolor = na, frame_width = 2, frame_color = chart.fg_color, border_width = 1, border_color = CW)
tb.cell(0, 0, text = 'Volume Candles', text_color = #FFBF00, bgcolor = #0E2841, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 0, 5, 0)
tb.cell(0, 1, text = 'Current Volume', text_color = CW, bgcolor = #0B3040, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 1, 1, 1)
tb.cell(0, 2, text = 'Buy', text_color = #000000, bgcolor = #92D050, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 2, text = 'Sell', text_color = #000000, bgcolor = #FF0000, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(0, 3, text = buyVolStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 3, text = sellVolStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(0, 5, text = 'Net: ' + volStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.merge_cells(0, 5, 1, 5)
tb.cell(0, 4, text = buyPercentStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
tb.cell(1, 4, text = sellPercentStr, text_color = CW, bgcolor = #074F69, text_halign = TC, text_valign = TC, text_size = sT)
cellCount = 20
filledCells = 0
for r = 5 to 1 by 1
for c = 2 to 5 by 1
if filledCells < cellCount * (totalbuyPercentC_ / 100)
tb.cell(c, r, text = '', bgcolor = C_Up)
else
tb.cell(c, r, text = '', bgcolor = C_Down)
filledCells := filledCells + 1
filledCells
if Label
sp = ' '
l = label.new(bar_index, ohlcv.V,
text=str.format('Net: {0} Buy: {1} ({2}) Sell: {3} ({4}) {5}/\ {5}l {5}l',
volStr, buyVolStr, buyPercentStr, sellVolStr, sellPercentStr, sp),
style=label.style_none, textcolor=volData.higherCol, size=sL, textalign=text.align_left)
if not History
(l ).delete()
//------------------------------------------
// Draw volume levels on the candlesticks |
//------------------------------------------
float base = na,float value = na
bool uc = usecandle and sup
if volData.isBuyGreater
base := math.min(ohlcv.O, ohlcv.C)
value := base + math.abs(ohlcv.O - ohlcv.C) * (volData.pcBuy / 100)
else
base := math.max(ohlcv.O, ohlcv.C)
value := base - math.abs(ohlcv.O - ohlcv.C) * (volData.pcSell / 100)
barcolor(sup ? color.new(na, na) : ohlcv.C < ohlcv.O ? color.red : color.green,display = usecandle? display.all:display.none)
UseC = uc ? volData.higherCol:color.new(na, na)
plotcandle(uc?base:na, uc?base:na, uc?value:na, uc?value:na,
title='Body', color=UseC, bordercolor=na, wickcolor=UseC,
display = usecandle ? display.all - display.status_line : display.none, force_overlay=true,editable=false)
plotcandle(uc?ohlcv.O:na, uc?ohlcv.H:na, uc?ohlcv.L:na, uc?ohlcv.C:na,
title='Fill', color=color.new(UseC,80), bordercolor=UseC, wickcolor=UseC,
display = usecandle ? display.all - display.status_line : display.none, force_overlay=true,editable=false)
//------------------------------------------------------------
// Plot the EMA and filter out the noise with volume control. |
//------------------------------------------------------------
float emaFast = ta.ema(ohlcv.C, emaFastLength)
float emaSlow = ta.ema(ohlcv.C, emaSlowLength)
bool signal = emaFast > emaSlow
color c_signal = signal ? C_Up : C_Down
float volumeMA = ta.sma(ohlcv.V, volumeConfirmationLength)
bool crossover = ta.crossover(emaFast, emaSlow)
bool crossunder = ta.crossunder(emaFast, emaSlow)
isVolumeConfirmed(source, length, ma) =>
math.sum(source > ma ? source : 0, length) >= math.sum(source < ma ? source : 0, length)
bool ISV = isVolumeConfirmed(ohlcv.V, volumeConfirmationLength, volumeMA)
bool crossoverConfirmed = crossover and (not useVolumeConfirmation or ISV)
bool crossunderConfirmed = crossunder and (not useVolumeConfirmation or ISV)
PF = MAV ? emaFast : na
PS = MAV ? emaSlow : na
p1 = plot(PF, color = c_signal, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 80), linewidth = 10, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 90), linewidth = 20, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 95), linewidth = 30, editable = false, force_overlay = true, display = display.pane)
plot(PF, color = color.new(c_signal, 98), linewidth = 45, editable = false, force_overlay = true, display = display.pane)
p2 = plot(PS, color = c_signal, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 80), linewidth = 10, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 90), linewidth = 20, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 95), linewidth = 30, editable = false, force_overlay = true, display = display.pane)
plot(PS, color = color.new(c_signal, 98), linewidth = 45, editable = false, force_overlay = true, display = display.pane)
fill(p1, p2, top_value=crossover ? emaFast : emaSlow,
bottom_value =crossover ? emaSlow : emaFast,
top_color =color.new(c_signal, 80),
bottom_color =color.new(c_signal, 95)
)
// ✅ Usar colores configurables para señales
plotshape(crossoverConfirmed and MAV, style=shape.triangleup , location=location.belowbar, color=buySignalColor , size=size.small, force_overlay=true,display =display.pane)
plotshape(crossunderConfirmed and MAV, style=shape.triangledown, location=location.abovebar, color=sellSignalColor, size=size.small, force_overlay=true,display =display.pane)
string msg = '--------- '+"Buy volume ="+buyVolStr+" Buy Percent = "+buyPercentStr+" Sell volume = "+sellVolStr+" Sell Percent = "+sellPercentStr+" Net = "+volStr+' ---------'
if crossoverConfirmed
alert("Price (" + str.tostring(close) + ") Crossed over MA " + msg, alert_freq)
if crossunderConfirmed
alert("Price (" + str.tostring(close) + ") Crossed under MA " + msg, alert_freq)
Oscillator Matrix [Alpha Extract]A comprehensive multi-oscillator system that combines volume-weighted money flow analysis with enhanced momentum detection, providing traders with a unified framework for identifying high-probability market opportunities across all timeframes. By integrating two powerful oscillators with advanced confluence analysis, this indicator delivers precise entry and exit signals while filtering out market noise through sophisticated threshold-based regime detection.
🔶 Volume-Weighted Money Flow Analysis
Utilizes an advanced money flow calculation that tracks volume-weighted price movements to identify institutional activity and smart money flow. This approach provides superior signal quality by emphasizing high-volume price movements while filtering out low-volume market noise.
// Volume-weighted flows
up_volume = price_up ? volume : 0
down_volume = price_down ? volume : 0
// Money Flow calculation
up_vol_sum = ta.sma(up_volume, mf_length)
down_vol_sum = ta.sma(down_volume, mf_length)
total_volume = up_vol_sum + down_vol_sum
money_flow_ratio = total_volume > 0 ? (up_vol_sum - down_vol_sum) / total_volume : 0
🔶 Enhanced Hyper Wave Oscillator
Features a sophisticated MACD-based momentum oscillator with advanced normalization techniques that adapt to different price ranges and market volatility. The system uses percentage-based calculations to ensure consistent performance across various instruments and timeframes.
// Enhanced MACD-based oscillator
fast_ma = ta.ema(src, hw_fast)
slow_ma = ta.ema(src, hw_slow)
macd_line = fast_ma - slow_ma
signal_line = ta.ema(macd_line, hw_signal)
// Proper normalization using percentage of price
price_base = ta.sma(close, 50)
macd_normalized = macd_line / price_base
hyper_wave = macd_range > 0 ? macd_normalized / macd_range : 0
🔶 Multi-Factor Confluence System
Implements an intelligent confluence scoring mechanism that combines signals from both oscillators to identify high-probability trading opportunities. The system assigns strength scores based on multiple confirmation factors, significantly reducing false signals.
🔶 Fixed Threshold Levels
Uses predefined threshold levels optimized for standard oscillator ranges to distinguish between normal market fluctuations and significant momentum shifts. The dual-threshold system provides clear visual cues for overbought/oversold conditions while maintaining consistent signal criteria across different market conditions.
🔶 Overflow Detection Technology
Advanced overflow indicators identify extreme market conditions that often precede major reversals or continuation patterns. These signals highlight moments when market momentum reaches critical levels, providing early warning for potential turning points.
🔶 Dual Oscillator Integration
The indicator simultaneously tracks volume-weighted money flow and momentum-based price action through two independent oscillators. This dual approach ensures comprehensive market analysis by capturing both institutional activity and technical momentum patterns.
// Multi-factor confluence scoring
confluence_bull = (mf_bullish ? 1 : 0) + (hw_bullish ? 1 : 0) +
(mf_overflow_bull ? 1 : 0) + (hw_overflow_bull ? 1 : 0)
confluence_bear = (mf_bearish ? 1 : 0) + (hw_bearish ? 1 : 0) +
(mf_overflow_bear ? 1 : 0) + (hw_overflow_bear ? 1 : 0)
confluence_strength = confluence_bull > confluence_bear ? confluence_bull / 4 : -confluence_bear / 4
🔶 Intelligent Signal Generation
The system generates two tiers of reversal signals: strong signals that require multiple confirmations across both oscillators, and weak signals that identify early momentum shifts. This hierarchical approach allows traders to adjust position sizing based on signal strength.
🔶 Visual Confluence Zones
Background coloring dynamically adjusts based on confluence strength, creating visual zones that immediately communicate market sentiment. The intensity of background shading corresponds to the strength of the confluent signals, making pattern recognition effortless.
🔶 Threshold Visualization
Color-coded threshold zones provide instant visual feedback about oscillator positions relative to key levels. The fill areas between thresholds create clear overbought and oversold regions with graduated color intensity.
🔶 Candle Color Integration
Optional candle coloring applies confluence-based color logic directly to price bars, creating a unified visual framework that helps traders correlate indicator signals with actual price movements for enhanced decision-making.
🔶 Overflow Alert System
Specialized circular markers highlight extreme overflow conditions on both oscillators, drawing attention to potential climax moves that often precede significant reversals or accelerated trend continuation.
🔶 Customizable Display Options
Comprehensive display controls allow traders to toggle individual components on or off, enabling focused analysis on specific aspects of the indicator. This modularity ensures the indicator adapts to different trading styles and analytical preferences.
1 Week
1 Day
15 Min
This indicator provides a complete analytical framework by combining volume analysis with momentum detection in a single, coherent system. By offering multiple confirmation layers and clear visual hierarchies, it empowers traders to identify high-probability opportunities while maintaining precise risk management across all market conditions and timeframes. The sophisticated confluence system ensures that signals are both timely and reliable, making it an essential tool for serious technical analysts.
BOCS Channel Scalper Indicator - Mean Reversion Alert System# BOCS Channel Scalper Indicator - Mean Reversion Alert System
## WHAT THIS INDICATOR DOES:
This is a mean reversion trading indicator that identifies consolidation channels through volatility analysis and generates alert signals when price enters entry zones near channel boundaries. **This indicator version is designed for manual trading with comprehensive alert functionality.** Unlike automated strategies, this tool sends notifications (via popup, email, SMS, or webhook) when trading opportunities occur, allowing you to manually review and execute trades. The system assumes price will revert to the channel mean, identifying scalp opportunities as price reaches extremes and preparing to bounce back toward center.
## INDICATOR VS STRATEGY - KEY DISTINCTION:
**This is an INDICATOR with alerts, not an automated strategy.** It does not execute trades automatically. Instead, it:
- Displays visual signals on your chart when entry conditions are met
- Sends customizable alerts to your device/email when opportunities arise
- Shows TP/SL levels for reference but does not place orders
- Requires you to manually enter and exit positions based on signals
- Works with all TradingView subscription levels (alerts included on all plans)
**For automated trading with backtesting**, use the strategy version. For manual control with notifications, use this indicator version.
## ALERT CAPABILITIES:
This indicator includes four distinct alert conditions that can be configured independently:
**1. New Channel Formation Alert**
- Triggers when a fresh BOCS channel is identified
- Message: "New BOCS channel formed - potential scalp setup ready"
- Use this to prepare for upcoming trading opportunities
**2. Long Scalp Entry Alert**
- Fires when price touches the long entry zone
- Message includes current price, calculated TP, and SL levels
- Notification example: "LONG scalp signal at 24731.75 | TP: 24743.2 | SL: 24716.5"
**3. Short Scalp Entry Alert**
- Fires when price touches the short entry zone
- Message includes current price, calculated TP, and SL levels
- Notification example: "SHORT scalp signal at 24747.50 | TP: 24735.0 | SL: 24762.75"
**4. Any Entry Signal Alert**
- Combined alert for both long and short entries
- Use this if you want a single alert stream for all opportunities
- Message: "BOCS Scalp Entry: at "
**Setting Up Alerts:**
1. Add indicator to chart and configure settings
2. Click the Alert (⏰) button in TradingView toolbar
3. Select "BOCS Channel Scalper" from condition dropdown
4. Choose desired alert type (Long, Short, Any, or Channel Formation)
5. Set "Once Per Bar Close" to avoid false signals during bar formation
6. Configure delivery method (popup, email, webhook for automation platforms)
7. Save alert - it will fire automatically when conditions are met
**Alert Message Placeholders:**
Alerts use TradingView's dynamic placeholder system:
- {{ticker}} = Symbol name (e.g., NQ1!)
- {{close}} = Current price at signal
- {{plot_1}} = Calculated take profit level
- {{plot_2}} = Calculated stop loss level
These placeholders populate automatically, creating detailed notification messages without manual configuration.
## KEY DIFFERENCE FROM ORIGINAL BOCS:
**This indicator is designed for traders seeking higher trade frequency.** The original BOCS indicator trades breakouts OUTSIDE channels, waiting for price to escape consolidation before entering. This scalper version trades mean reversion INSIDE channels, entering when price reaches channel extremes and betting on a bounce back to center. The result is significantly more trading opportunities:
- **Original BOCS**: 1-3 signals per channel (only on breakout)
- **Scalper Indicator**: 5-15+ signals per channel (every touch of entry zones)
- **Trade Style**: Mean reversion vs trend following
- **Hold Time**: Seconds to minutes vs minutes to hours
- **Best Markets**: Ranging/choppy conditions vs trending breakouts
This makes the indicator ideal for active day traders who want continuous alert opportunities within consolidation zones rather than waiting for breakout confirmation. However, increased signal frequency also means higher potential commission costs and requires disciplined trade selection when acting on alerts.
## TECHNICAL METHODOLOGY:
### Price Normalization Process:
The indicator normalizes price data to create consistent volatility measurements across different instruments and price levels. It calculates the highest high and lowest low over a user-defined lookback period (default 100 bars). Current close price is normalized using: (close - lowest_low) / (highest_high - lowest_low), producing values between 0 and 1 for standardized volatility analysis.
### Volatility Detection:
A 14-period standard deviation is applied to the normalized price series to measure price deviation from the mean. Higher standard deviation values indicate volatility expansion; lower values indicate consolidation. The indicator uses ta.highestbars() and ta.lowestbars() to identify when volatility peaks and troughs occur over the detection period (default 14 bars).
### Channel Formation Logic:
When volatility crosses from a high level to a low level (ta.crossover(upper, lower)), a consolidation phase begins. The indicator tracks the highest and lowest prices during this period, which become the channel boundaries. Minimum duration of 10+ bars is required to filter out brief volatility spikes. Channels are rendered as box objects with defined upper and lower boundaries, with colored zones indicating entry areas.
### Entry Signal Generation:
The indicator uses immediate touch-based entry logic. Entry zones are defined as a percentage from channel edges (default 20%):
- **Long Entry Zone**: Bottom 20% of channel (bottomBound + channelRange × 0.2)
- **Short Entry Zone**: Top 20% of channel (topBound - channelRange × 0.2)
Long signals trigger when candle low touches or enters the long entry zone. Short signals trigger when candle high touches or enters the short entry zone. Visual markers (arrows and labels) appear on chart, and configured alerts fire immediately.
### Cooldown Filter:
An optional cooldown period (measured in bars) prevents alert spam by enforcing minimum spacing between consecutive signals. If cooldown is set to 3 bars, no new long alert will fire until 3 bars after the previous long signal. Long and short cooldowns are tracked independently, allowing both directions to signal within the same period.
### ATR Volatility Filter:
The indicator includes a multi-timeframe ATR filter to avoid alerts during low-volatility conditions. Using request.security(), it fetches ATR values from a specified timeframe (e.g., 1-minute ATR while viewing 5-minute charts). The filter compares current ATR to a user-defined minimum threshold:
- If ATR ≥ threshold: Alerts enabled
- If ATR < threshold: No alerts fire
This prevents notifications during dead zones where mean reversion is unreliable due to insufficient price movement. The ATR status is displayed in the info table with visual confirmation (✓ or ✗).
### Take Profit Calculation:
Two TP methods are available:
**Fixed Points Mode**:
- Long TP = Entry + (TP_Ticks × syminfo.mintick)
- Short TP = Entry - (TP_Ticks × syminfo.mintick)
**Channel Percentage Mode**:
- Long TP = Entry + (ChannelRange × TP_Percent)
- Short TP = Entry - (ChannelRange × TP_Percent)
Default 50% targets the channel midline, a natural mean reversion target. These levels are displayed as visual lines with labels and included in alert messages for reference when manually placing orders.
### Stop Loss Placement:
Stop losses are calculated just outside the channel boundary by a user-defined tick offset:
- Long SL = ChannelBottom - (SL_Offset_Ticks × syminfo.mintick)
- Short SL = ChannelTop + (SL_Offset_Ticks × syminfo.mintick)
This logic assumes channel breaks invalidate the mean reversion thesis. SL levels are displayed on chart and included in alert notifications as suggested stop placement.
### Channel Breakout Management:
Channels are removed when price closes more than 10 ticks outside boundaries. This tolerance prevents premature channel deletion from minor breaks or wicks, allowing the mean reversion setup to persist through small boundary violations.
## INPUT PARAMETERS:
### Channel Settings:
- **Nested Channels**: Allow multiple overlapping channels vs single channel
- **Normalization Length**: Lookback for high/low calculation (1-500, default 100)
- **Box Detection Length**: Period for volatility detection (1-100, default 14)
### Scalping Settings:
- **Enable Long Scalps**: Toggle long alert generation on/off
- **Enable Short Scalps**: Toggle short alert generation on/off
- **Entry Zone % from Edge**: Size of entry zone (5-50%, default 20%)
- **SL Offset (Ticks)**: Distance beyond channel for stop (1+, default 5)
- **Cooldown Period (Bars)**: Minimum spacing between alerts (0 = no cooldown)
### ATR Filter:
- **Enable ATR Filter**: Toggle volatility filter on/off
- **ATR Timeframe**: Source timeframe for ATR (1, 5, 15, 60 min, etc.)
- **ATR Length**: Smoothing period (1-100, default 14)
- **Min ATR Value**: Threshold for alert enablement (0.1+, default 10.0)
### Take Profit Settings:
- **TP Method**: Choose Fixed Points or % of Channel
- **TP Fixed (Ticks)**: Static distance in ticks (1+, default 30)
- **TP % of Channel**: Dynamic target as channel percentage (10-100%, default 50%)
### Appearance:
- **Show Entry Zones**: Toggle zone labels on channels
- **Show Info Table**: Display real-time indicator status
- **Table Position**: Corner placement (Top Left/Right, Bottom Left/Right)
- **Long Color**: Customize long signal color (default: darker green for readability)
- **Short Color**: Customize short signal color (default: red)
- **TP/SL Colors**: Customize take profit and stop loss line colors
- **Line Length**: Visual length of TP/SL reference lines (5-200 bars)
## VISUAL INDICATORS:
- **Channel boxes** with semi-transparent fill showing consolidation zones
- **Colored entry zones** labeled "LONG ZONE ▲" and "SHORT ZONE ▼"
- **Entry signal arrows** below/above bars marking long/short alerts
- **TP/SL reference lines** with emoji labels (⊕ Entry, 🎯 TP, 🛑 SL)
- **Info table** showing channel status, last signal, entry/TP/SL prices, risk/reward ratio, and ATR filter status
- **Visual confirmation** when alerts fire via on-chart markers synchronized with notifications
## HOW TO USE:
### For 1-3 Minute Scalping with Alerts (NQ/ES):
- ATR Timeframe: "1" (1-minute)
- ATR Min Value: 10.0 (for NQ), adjust per instrument
- Entry Zone %: 20-25%
- TP Method: Fixed Points, 20-40 ticks
- SL Offset: 5-10 ticks
- Cooldown: 2-3 bars to reduce alert spam
- **Alert Setup**: Configure "Any Entry Signal" for combined long/short notifications
- **Execution**: When alert fires, verify chart visuals, then manually place limit order at entry zone with provided TP/SL levels
### For 5-15 Minute Day Trading with Alerts:
- ATR Timeframe: "5" or match chart
- ATR Min Value: Adjust to instrument (test 8-15 for NQ)
- Entry Zone %: 20-30%
- TP Method: % of Channel, 40-60%
- SL Offset: 5-10 ticks
- Cooldown: 3-5 bars
- **Alert Setup**: Configure separate "Long Scalp Entry" and "Short Scalp Entry" alerts if you trade directionally based on bias
- **Execution**: Review channel structure on alert, confirm ATR filter shows ✓, then enter manually
### For 30-60 Minute Swing Scalping with Alerts:
- ATR Timeframe: "15" or "30"
- ATR Min Value: Lower threshold for broader market
- Entry Zone %: 25-35%
- TP Method: % of Channel, 50-70%
- SL Offset: 10-15 ticks
- Cooldown: 5+ bars or disable
- **Alert Setup**: Use "New Channel Formation" to prepare for setups, then "Any Entry Signal" for execution alerts
- **Execution**: Larger timeframes allow more analysis time between alert and entry
### Webhook Integration for Semi-Automation:
- Configure alert webhook URL to connect with platforms like TradersPost, TradingView Paper Trading, or custom automation
- Alert message includes all necessary order parameters (direction, entry, TP, SL)
- Webhook receives structured data when signal fires
- External platform can auto-execute based on alert payload
- Still maintains manual oversight vs full strategy automation
## USAGE CONSIDERATIONS:
- **Manual Discipline Required**: Alerts provide opportunities but execution requires judgment. Not all alerts should be taken - consider market context, trend, and channel quality
- **Alert Timing**: Alerts fire on bar close by default. Ensure "Once Per Bar Close" is selected to avoid false signals during bar formation
- **Notification Delivery**: Mobile/email alerts may have 1-3 second delay. For immediate execution, use desktop popups or webhook automation
- **Cooldown Necessity**: Without cooldown, rapidly touching price action can generate excessive alerts. Start with 3-bar cooldown and adjust based on alert volume
- **ATR Filter Impact**: Enabling ATR filter dramatically reduces alert count but improves quality. Track filter status in info table to understand when you're receiving fewer alerts
- **Commission Awareness**: High alert frequency means high potential trade count. Calculate if your commission structure supports frequent scalping before acting on all alerts
## COMPATIBLE MARKETS:
Works on any instrument with price data including stock indices (NQ, ES, YM, RTY), individual stocks, forex pairs (EUR/USD, GBP/USD), cryptocurrency (BTC, ETH), and commodities. Volume-based features are not included in this indicator version. Multi-timeframe ATR requires higher-tier TradingView subscription for request.security() functionality on timeframes below chart timeframe.
## KNOWN LIMITATIONS:
- **Indicator does not execute trades** - alerts are informational only; you must manually place all orders
- **Alert delivery depends on TradingView infrastructure** - delays or failures possible during platform issues
- **No position tracking** - indicator doesn't know if you're in a trade; you must manage open positions independently
- **TP/SL levels are reference only** - you must manually set these on your broker platform; they are not live orders
- **Immediate touch entry can generate many alerts** in choppy zones without adequate cooldown
- **Channel deletion at 10-tick breaks** may be too aggressive or lenient depending on instrument tick size
- **ATR filter from lower timeframes** requires TradingView Premium/Pro+ for request.security()
- **Mean reversion logic fails** in strong breakout scenarios - alerts will fire but trades may hit stops
- **No partial closing capability** - full position management is manual; you determine scaling out
- **Alerts do not account for gaps** or overnight price changes; morning alerts may be stale
## RISK DISCLOSURE:
Trading involves substantial risk of loss. This indicator provides signals for educational and informational purposes only and does not constitute financial advice. Past performance does not guarantee future results. Mean reversion strategies can experience extended drawdowns during trending markets. Alerts are not guaranteed to be profitable and should be combined with your own analysis. Stop losses may not fill at intended levels during extreme volatility or gaps. Never trade with capital you cannot afford to lose. Consider consulting a licensed financial advisor before making trading decisions. Always verify alerts against current market conditions before executing trades manually.
## ACKNOWLEDGMENT & CREDITS:
This indicator is built upon the channel detection methodology created by **AlgoAlpha** in the "Smart Money Breakout Channels" indicator. Full credit and appreciation to AlgoAlpha for pioneering the normalized volatility approach to identifying consolidation patterns. The core channel formation logic using normalized price standard deviation is AlgoAlpha's original contribution to the TradingView community.
Enhancements to the original concept include: mean reversion entry logic (vs breakout), immediate touch-based alert generation, comprehensive alert condition system with customizable notifications, multi-timeframe ATR volatility filtering, cooldown period for alert management, dual TP methods (fixed points vs channel percentage), visual TP/SL reference lines, and real-time status monitoring table. This indicator version is specifically designed for manual traders who prefer alert-based decision making over automated execution.
BOCS Channel Scalper Strategy - Automated Mean Reversion System# BOCS Channel Scalper Strategy - Automated Mean Reversion System
## WHAT THIS STRATEGY DOES:
This is an automated mean reversion trading strategy that identifies consolidation channels through volatility analysis and executes scalp trades when price enters entry zones near channel boundaries. Unlike breakout strategies, this system assumes price will revert to the channel mean, taking profits as price bounces back from extremes. Position sizing is fully customizable with three methods: fixed contracts, percentage of equity, or fixed dollar amount. Stop losses are placed just outside channel boundaries with take profits calculated either as fixed points or as a percentage of channel range.
## KEY DIFFERENCE FROM ORIGINAL BOCS:
**This strategy is designed for traders seeking higher trade frequency.** The original BOCS indicator trades breakouts OUTSIDE channels, waiting for price to escape consolidation before entering. This scalper version trades mean reversion INSIDE channels, entering when price reaches channel extremes and betting on a bounce back to center. The result is significantly more trading opportunities:
- **Original BOCS**: 1-3 signals per channel (only on breakout)
- **Scalper Version**: 5-15+ signals per channel (every touch of entry zones)
- **Trade Style**: Mean reversion vs trend following
- **Hold Time**: Seconds to minutes vs minutes to hours
- **Best Markets**: Ranging/choppy conditions vs trending breakouts
This makes the scalper ideal for active day traders who want continuous opportunities within consolidation zones rather than waiting for breakout confirmation. However, increased trade frequency also means higher commission costs and requires tighter risk management.
## TECHNICAL METHODOLOGY:
### Price Normalization Process:
The strategy normalizes price data to create consistent volatility measurements across different instruments and price levels. It calculates the highest high and lowest low over a user-defined lookback period (default 100 bars). Current close price is normalized using: (close - lowest_low) / (highest_high - lowest_low), producing values between 0 and 1 for standardized volatility analysis.
### Volatility Detection:
A 14-period standard deviation is applied to the normalized price series to measure price deviation from the mean. Higher standard deviation values indicate volatility expansion; lower values indicate consolidation. The strategy uses ta.highestbars() and ta.lowestbars() to identify when volatility peaks and troughs occur over the detection period (default 14 bars).
### Channel Formation Logic:
When volatility crosses from a high level to a low level (ta.crossover(upper, lower)), a consolidation phase begins. The strategy tracks the highest and lowest prices during this period, which become the channel boundaries. Minimum duration of 10+ bars is required to filter out brief volatility spikes. Channels are rendered as box objects with defined upper and lower boundaries, with colored zones indicating entry areas.
### Entry Signal Generation:
The strategy uses immediate touch-based entry logic. Entry zones are defined as a percentage from channel edges (default 20%):
- **Long Entry Zone**: Bottom 20% of channel (bottomBound + channelRange × 0.2)
- **Short Entry Zone**: Top 20% of channel (topBound - channelRange × 0.2)
Long signals trigger when candle low touches or enters the long entry zone. Short signals trigger when candle high touches or enters the short entry zone. This captures mean reversion opportunities as price reaches channel extremes.
### Cooldown Filter:
An optional cooldown period (measured in bars) prevents signal spam by enforcing minimum spacing between consecutive signals. If cooldown is set to 3 bars, no new long signal will fire until 3 bars after the previous long signal. Long and short cooldowns are tracked independently, allowing both directions to signal within the same period.
### ATR Volatility Filter:
The strategy includes a multi-timeframe ATR filter to avoid trading during low-volatility conditions. Using request.security(), it fetches ATR values from a specified timeframe (e.g., 1-minute ATR while trading on 5-minute charts). The filter compares current ATR to a user-defined minimum threshold:
- If ATR ≥ threshold: Trading enabled
- If ATR < threshold: No signals fire
This prevents entries during dead zones where mean reversion is unreliable due to insufficient price movement.
### Take Profit Calculation:
Two TP methods are available:
**Fixed Points Mode**:
- Long TP = Entry + (TP_Ticks × syminfo.mintick)
- Short TP = Entry - (TP_Ticks × syminfo.mintick)
**Channel Percentage Mode**:
- Long TP = Entry + (ChannelRange × TP_Percent)
- Short TP = Entry - (ChannelRange × TP_Percent)
Default 50% targets the channel midline, a natural mean reversion target. Larger percentages aim for opposite channel edge.
### Stop Loss Placement:
Stop losses are placed just outside the channel boundary by a user-defined tick offset:
- Long SL = ChannelBottom - (SL_Offset_Ticks × syminfo.mintick)
- Short SL = ChannelTop + (SL_Offset_Ticks × syminfo.mintick)
This logic assumes channel breaks invalidate the mean reversion thesis. If price breaks through, the range is no longer valid and position exits.
### Trade Execution Logic:
When entry conditions are met (price in zone, cooldown satisfied, ATR filter passed, no existing position):
1. Calculate entry price at zone boundary
2. Calculate TP and SL based on selected method
3. Execute strategy.entry() with calculated position size
4. Place strategy.exit() with TP limit and SL stop orders
5. Update info table with active trade details
The strategy enforces one position at a time by checking strategy.position_size == 0 before entry.
### Channel Breakout Management:
Channels are removed when price closes more than 10 ticks outside boundaries. This tolerance prevents premature channel deletion from minor breaks or wicks, allowing the mean reversion setup to persist through small boundary violations.
### Position Sizing System:
Three methods calculate position size:
**Fixed Contracts**:
- Uses exact contract quantity specified in settings
- Best for futures traders (e.g., "trade 2 NQ contracts")
**Percentage of Equity**:
- position_size = (strategy.equity × equity_pct / 100) / close
- Dynamically scales with account growth
**Cash Amount**:
- position_size = cash_amount / close
- Maintains consistent dollar exposure regardless of price
## INPUT PARAMETERS:
### Position Sizing:
- **Position Size Type**: Choose Fixed Contracts, % of Equity, or Cash Amount
- **Number of Contracts**: Fixed quantity per trade (1-1000)
- **% of Equity**: Percentage of account to allocate (1-100%)
- **Cash Amount**: Dollar value per position ($100+)
### Channel Settings:
- **Nested Channels**: Allow multiple overlapping channels vs single channel
- **Normalization Length**: Lookback for high/low calculation (1-500, default 100)
- **Box Detection Length**: Period for volatility detection (1-100, default 14)
### Scalping Settings:
- **Enable Long Scalps**: Toggle long entries on/off
- **Enable Short Scalps**: Toggle short entries on/off
- **Entry Zone % from Edge**: Size of entry zone (5-50%, default 20%)
- **SL Offset (Ticks)**: Distance beyond channel for stop (1+, default 5)
- **Cooldown Period (Bars)**: Minimum spacing between signals (0 = no cooldown)
### ATR Filter:
- **Enable ATR Filter**: Toggle volatility filter on/off
- **ATR Timeframe**: Source timeframe for ATR (1, 5, 15, 60 min, etc.)
- **ATR Length**: Smoothing period (1-100, default 14)
- **Min ATR Value**: Threshold for trade enablement (0.1+, default 10.0)
### Take Profit Settings:
- **TP Method**: Choose Fixed Points or % of Channel
- **TP Fixed (Ticks)**: Static distance in ticks (1+, default 30)
- **TP % of Channel**: Dynamic target as channel percentage (10-100%, default 50%)
### Appearance:
- **Show Entry Zones**: Toggle zone labels on channels
- **Show Info Table**: Display real-time strategy status
- **Table Position**: Corner placement (Top Left/Right, Bottom Left/Right)
- **Color Settings**: Customize long/short/TP/SL colors
## VISUAL INDICATORS:
- **Channel boxes** with semi-transparent fill showing consolidation zones
- **Colored entry zones** labeled "LONG ZONE ▲" and "SHORT ZONE ▼"
- **Entry signal arrows** below/above bars marking long/short entries
- **Active TP/SL lines** with emoji labels (⊕ Entry, 🎯 TP, 🛑 SL)
- **Info table** showing position status, channel state, last signal, entry/TP/SL prices, and ATR status
## HOW TO USE:
### For 1-3 Minute Scalping (NQ/ES):
- ATR Timeframe: "1" (1-minute)
- ATR Min Value: 10.0 (for NQ), adjust per instrument
- Entry Zone %: 20-25%
- TP Method: Fixed Points, 20-40 ticks
- SL Offset: 5-10 ticks
- Cooldown: 2-3 bars
- Position Size: 1-2 contracts
### For 5-15 Minute Day Trading:
- ATR Timeframe: "5" or match chart
- ATR Min Value: Adjust to instrument (test 8-15 for NQ)
- Entry Zone %: 20-30%
- TP Method: % of Channel, 40-60%
- SL Offset: 5-10 ticks
- Cooldown: 3-5 bars
- Position Size: Fixed contracts or 5-10% equity
### For 30-60 Minute Swing Scalping:
- ATR Timeframe: "15" or "30"
- ATR Min Value: Lower threshold for broader market
- Entry Zone %: 25-35%
- TP Method: % of Channel, 50-70%
- SL Offset: 10-15 ticks
- Cooldown: 5+ bars or disable
- Position Size: % of equity recommended
## BACKTEST CONSIDERATIONS:
- Strategy performs best in ranging, mean-reverting markets
- Strong trending markets produce more stop losses as price breaks channels
- ATR filter significantly reduces trade count but improves quality during low volatility
- Cooldown period trades signal quantity for signal quality
- Commission and slippage materially impact sub-5-minute timeframe performance
- Shorter timeframes require tighter entry zones (15-20%) to catch quick reversions
- % of Channel TP adapts better to varying channel sizes than fixed points
- Fixed contract sizing recommended for consistent risk per trade in futures
**Backtesting Parameters Used**: This strategy was developed and tested using realistic commission and slippage values to provide accurate performance expectations. Recommended settings: Commission of $1.40 per side (typical for NQ futures through discount brokers), slippage of 2 ticks to account for execution delays on fast-moving scalp entries. These values reflect real-world trading costs that active scalpers will encounter. Backtest results without proper cost simulation will significantly overstate profitability.
## COMPATIBLE MARKETS:
Works on any instrument with price data including stock indices (NQ, ES, YM, RTY), individual stocks, forex pairs (EUR/USD, GBP/USD), cryptocurrency (BTC, ETH), and commodities. Volume-based features require data feed with volume information but are optional for core functionality.
## KNOWN LIMITATIONS:
- Immediate touch entry can fire multiple times in choppy zones without adequate cooldown
- Channel deletion at 10-tick breaks may be too aggressive or lenient depending on instrument tick size
- ATR filter from lower timeframes requires higher-tier TradingView subscription (request.security limitation)
- Mean reversion logic fails in strong breakout scenarios leading to stop loss hits
- Position sizing via % of equity or cash amount calculates based on close price, may differ from actual fill price
- No partial closing capability - full position exits at TP or SL only
- Strategy does not account for gap openings or overnight holds
## RISK DISCLOSURE:
Trading involves substantial risk of loss. Past performance does not guarantee future results. This strategy is for educational purposes and backtesting only. Mean reversion strategies can experience extended drawdowns during trending markets. Stop losses may not fill at intended levels during extreme volatility or gaps. Thoroughly test on historical data and paper trade before risking real capital. Use appropriate position sizing and never risk more than you can afford to lose. Consider consulting a licensed financial advisor before making trading decisions. Automated trading systems can malfunction - monitor all live positions actively.
## ACKNOWLEDGMENT & CREDITS:
This strategy is built upon the channel detection methodology created by **AlgoAlpha** in the "Smart Money Breakout Channels" indicator. Full credit and appreciation to AlgoAlpha for pioneering the normalized volatility approach to identifying consolidation patterns. The core channel formation logic using normalized price standard deviation is AlgoAlpha's original contribution to the TradingView community.
Enhancements to the original concept include: mean reversion entry logic (vs breakout), immediate touch-based signals, multi-timeframe ATR volatility filtering, flexible position sizing (fixed/percentage/cash), cooldown period filtering, dual TP methods (fixed points vs channel percentage), automated strategy execution with exit management, and real-time position monitoring table.
Smart Money — Volume Panel + OBV Smart Money — Volume Panel + Scaled OBV
This indicator combines classic volume analysis with a scaled On-Balance Volume (OBV) line, helping spot smart money activity:
Volume bars – color changes dynamically:
🟢 green = high volume & OBV rising
🔴 red = high volume & OBV falling
🟠 orange = high volume but OBV neutral
⚪ gray = low volume
Yellow line – volume moving average (MA)
Purple line – high-volume threshold (MA × multiplier)
OBV line (green/red) – scaled OBV plotted in the same range as volume for easier comparison.
StratNinjaTable - VerticalA Pine Script v6 indicator that displays a vertical table with key The Strat data and supporting metrics.
✦ Table Structure:
Overview:
Ticker – the stock symbol.
TF – the chart’s main timeframe.
MFI – Money Flow Index with selectable timeframe.
ATR – Average True Range with color coding:
Green – below 3%.
Yellow – between 3% and 6%.
Red – above 6%.
Timeframes:
Displayed vertically (5m, 15m, 1H, D, W, M, etc.).
Each shows the current bar type according to The Strat (1, 2U, 2D, 3).
Text color reflects candle direction (green = close above open, red = close below open).
Includes a countdown timer to bar close.
Fundamentals:
Market Cap – in billions.
Sector – stock sector.
SMA20 Δ – distance from the 20-period SMA (in %).
Avg Volume (30d) – average 30-day volume (in millions).
✦ Adjustments Made:
Removed the Strat Pattern section completely.
Removed the DIR column – direction is now represented by Strat cell text color.
Reordered Overview section: Ticker → TF → MFI → ATR.
ATR now has three levels of coloring (Green/Yellow/Red) for >3% and >6%
MACD (The Moving Average Convergence Divergence)The Moving Average Convergence Divergence (MACD) is a momentum indicator used in technical analysis to identify trends, measure their strength, and signal potential reversals. It is calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA, creating the MACD line. A 9-period EMA of the MACD line, known as the signal line, is then plotted to generate buy or sell signals. Positive MACD values suggest upward momentum, while negative values indicate downward momentum. Traders often watch for crossovers, divergences, and movements relative to the zero line to make informed decisions.
Volume Profile + Pivot Levels [Jaxon007]This indicator combines Volume Profile analysis with Pivot Levels to help identify strong areas of support and resistance, as well as potential buy/sell zones.
🔎 Key Features:
Custom Volume Profile (VP):
Dynamically calculates the highest and lowest price levels within a user-defined lookback period, filtered by relative volume strength. These act as zones of market interest where price tends to react.
Pivot Levels (Daily/Weekly/Monthly):
Automatically plots pivot points based on your selected timeframe. Classic pivot levels are included, along with support (S1) and resistance (R1).
Buy & Sell Signal Markers:
Buy Signal: Plotted when price closes above both the pivot and VP High.
Sell Signal: Plotted when price closes below both the pivot and VP Low.
These signals highlight breakout and momentum opportunities.
Customizable Display:
Toggle on/off pivot levels, volume profile levels, and buy/sell signals to suit your trading style.
🎯 How to Use:
Look for confluence between Pivot Levels and VP High/Low to spot strong breakout or reversal points.
Use Buy signals for potential long entries when market momentum confirms above key levels.
Use Sell signals for potential short entries when price breaks below critical zones.
Best applied on higher-volume assets (Forex, Indices, Crypto, Stocks).
MYM Edge Booster MYM Long Trading Assistant - ATR-Based Edge Booster
Clean, simple indicator that tells you when MYM long setups meet high-probability criteria. No complicated charts - just clear numbers and signals.
• ATR Targets & Stops (whole numbers)
• Quality Score (0-3 stars)
• Green Circle when conditions perfect
• Warnings for choppy/high volatility
• ES/NQ sector confirmation
Eliminates guesswork. Trade when the green circle appears.
[MCN] Volume Weighted Average PriceStandard VWAP with custom stdv colourings and the ability to anchor by midnight price.
Volume Relativo - Candle Color - CriptoBraboAssinala pela cor do candle o volume relativo. Parametros customizáveis
RSI Momentum ScalperOverview
The "RSI Momentum Scalper" is a Pine Script v5 strategy crafted for trading highly volatile markets, with a special focus on newly listed cryptocurrencies. This strategy harnesses the Relative Strength Index (RSI) alongside volume analysis and momentum thresholds to pinpoint short-term trading opportunities. It supports both long and short trades, managed with customizable take profit, stop loss, and trailing stop levels, which are visually plotted on the chart for easy tracking.
Why I Created This Strategy
I developed the "RSI Momentum Scalper" because I was seeking a reliable trading strategy tailored to newly listed, highly volatile cryptocurrencies. These assets often experience rapid price fluctuations, rendering traditional strategies less effective. I aimed to create a tool that could exploit momentum and volume spikes while managing risk through adaptable exit parameters. This strategy is designed to address that need, offering a flexible approach for traders in dynamic crypto markets.
How It Works
The strategy utilizes RSI to identify momentum shifts, combined with volume confirmation, to trigger long or short entries. Trades are controlled with take profit, stop loss, and trailing stop levels, which adjust dynamically as the price moves in your favor. The trailing stop helps lock in profits, while the plotted exit levels provide clear visual cues for trade management.
Customizable Settings
The script is highly customizable, allowing you to adjust it to various market conditions and trading styles. Here’s a brief overview of the key settings:
Trade Mode: Select "Both," "Long Only," or "Short Only" to determine the trade direction.
(Default: Both)
RSI Length: Sets the lookback period for the RSI calculation (2 to 30).
(Default: 8)
A shorter length increases RSI sensitivity, suitable for volatile assets.
RSI Overbought: Defines the upper RSI threshold (60 to 99) for short entries.
(Default: 90)
Higher values signal stronger overbought conditions.
RSI Oversold: Defines the lower RSI threshold (1 to 40) for long entries.
(Default: 10)
Lower values indicate stronger oversold conditions.
RSI Momentum Threshold: Sets the minimum RSI momentum change (1 to 15) to trigger entries.
(Default: 14)
Adjusts the sensitivity to price momentum.
Volume Multiplier: Multiplies the volume moving average to filter high-volume bars (1.0 to 3.0).
(Default: 1)
Higher values require stronger volume confirmation.
Volume MA Length: Sets the lookback period for the volume moving average (5 to 50).
(Default: 13)
Influences the volume trend sensitivity.
Take Profit %: Sets the profit target as a percentage of the entry price (0.1 to 10.0).
(Default: 4.15)
Determines when to close a winning trade.
Stop Loss %: Sets the loss limit as a percentage of the entry price (0.1 to 6.0).
(Default: 1.85)
Protects against significant losses.
Trailing Stop %: Sets the trailing stop distance as a percentage (0.1 to 4.0).
(Default: 2.55)
Locks in profits as the price moves favorably.
Visual Features
Exit Levels: Take profit (green), fixed stop loss (red), and trailing stop (orange) levels are plotted when in a position.
Performance Table: Displays win rate, total trades, and net profit in the top-right corner.
How to Use
Add the strategy to your chart in TradingView.
Adjust the input settings based on the cryptocurrency and timeframe you’re trading.
Monitor the plotted exit levels for trade management.
Use the performance table to assess the strategy’s performance over time.
Notes
Test the strategy on a demo account or with historical data before live trading.
The strategy is optimized for short-term scalping; adjust settings for longer timeframes if needed.
Volume Aggregated (Lite)Volume Aggregated (Lite) is a lightweight yet powerful tool designed to provide traders with a consolidated view of trading volume across major perpetual futures markets. Instead of relying solely on the volume of a single exchange, this indicator aggregates and normalizes data from multiple venues, giving a broader and more representative measure of market activity.
Supported Exchanges:
Binance (USDT.P & USDC.P)
Bybit (USDT.P & USD.P)
OKX (USDT.P & USD.P)
Bitget (USDT.P & USD.P)
Coinbase (USDC.P)
Users can toggle each exchange individually, allowing flexible customization depending on which markets they consider most relevant.
Denomination Options:
COINS: Volume expressed in the base currency (e.g., BTC, ETH).
USD: Volume normalized to USD values by multiplying with price.
Why it’s useful:
Volume is a critical component of technical analysis, reflecting market participation and conviction behind price moves. However, relying on a single exchange can create blind spots, especially in crypto where liquidity is fragmented. By combining data from multiple large exchanges, this indicator offers:
A more comprehensive measure of market interest.
A normalized comparison between exchanges with different quote currencies (e.g., USDT, USD, USDC).
A volume stream that can be used as a custom source for other indicators, strategies, or overlays within TradingView.
Practical Applications:
Trend Confirmation: Check if aggregated volume supports price direction.
Breakout Validation: Identify whether breakouts are backed by broad participation across venues.
Divergence Detection: Spot situations where price moves without sufficient cross-exchange volume.
Custom Indicator Input: Since it outputs a clean series, it can be plugged into moving averages, oscillators, or custom-built scripts.
Technical Details:
The script uses request.security() to pull volume data across exchanges and normalizes values when required (e.g., USD-quoted pairs divided by the instrument’s price). It then aggregates all valid inputs into a single stream. The result is displayed as color-coded columns (green for bullish candles, red for bearish), making it easy to interpret at a glance.
This “Lite” version keeps the focus on core functionality: aggregation, normalization, and straightforward visualization—avoiding unnecessary complexity while remaining highly adaptable for custom analysis.
Anchored VWAP (Triple) MYRAXESAnchored VWAP Triple Indicator
The Anchored VWAP Triple indicator is a powerful tool for technical analysis, allowing traders to plot three customizable anchored Volume Weighted Average Price (VWAP) lines on a chart. Unlike traditional VWAP, which resets daily, this indicator lets you anchor each VWAP to a specific date and time, providing a unique perspective on price action relative to key market events.
Features
Three Independent VWAPs: Plot up to three VWAP lines, each anchored to a user-defined date and time.
Customizable Inputs: Set the year, month, day, hour, and minute for each VWAP anchor point. Choose distinct colors for easy identification.
Pure Anchored Design: VWAP lines start only from the anchor point, with no pre-anchor extensions, ensuring a clean and focused analysis.
Debug Mode: Optional display of hour and minute for troubleshooting or educational purposes.
Default Settings: Pre-configured with practical defaults (e.g., September 2025 dates) for immediate use.
How to Use
Add the indicator to your TradingView chart.
Adjust the anchor dates and times for each VWAP (VWAP 1, VWAP 2, VWAP 3) via the input settings.
Select custom colors for each VWAP line to differentiate them on the chart.
Enable Debug Mode if needed to verify time alignment.
Analyze price movements relative to the anchored VWAPs to identify support, resistance, or trend shifts.
Benefits
Ideal for swing traders and long-term analysts who need to anchor VWAP to significant price levels or events.
Enhances decision-making by comparing multiple VWAPs from different anchor points.
Fully compatible with TradingView’s Pine Script v6 for smooth performance.
This indicator is perfect for traders looking to deepen their market analysis with a flexible, multi-VWAP approach. Share your feedback or custom setups in the comments!
HFT Jude FootprintThis script is designed to detect potential High-Frequency Trader (HFT) activity based on unusual volume spikes and candle behavior, in order to identify potential intraday breakout opportunities. It is best suited for 3-minute and 5-minute charts across NSE-listed stocks.
How It Works
The strategy combines three core conditions:
Volume Spike Multiplier: Detects when current volume is > X times the rolling average (e.g., 5× 20-bar average volume).
Breakout Confirmation: Entry is considered only if the close is:
Near the high (for longs) or low (for shorts) of the candle.
Higher than the previous high (for longs), or lower than previous low (for shorts).
Visual Signal: When all conditions align, a Buy or Sell label is plotted on the chart, right at the candle where the footprint is detected.
This script is tailored for scalpers, intraday traders, and HFT watchers. It is not a mash-up of generic indicators and based on my backtesting and observation of large HFT firms that operate in the indian equities market,