Wyszukaj w skryptach "蔚山现代vs川崎前锋"
BTCUSD long vs short ratio+rsiJust a script I want to share with friends on a discord
orange/green line : longs vs short ratio (100 = only longs, 0 = only shorts)
purple line : RSI of (longs-shorts)
Bitcoin Exchanges Premium (Incl Int & GBTC) vs GdaxShows the exchange premiums internationally (Hong Kong, Luxembourg, Korea, Japan, China) vs Gdax. Also includes GBTC Trust price (adjusted).
Index Vs Futures v4.0 (dashed edition)Generalized script of
Originally designed for bitcoin, but can be used to compare between futures and index (or any two symbol expressions).
Conventions:
- green background := futures deviates 'way above' index
- red background := futures deviates 'way below' index
VS Score [SpiritualHealer117]An experimental indicator that uses historical prices and readings of technical indicators to give the probability that stock and crypto prices will be in a certain range on the next close. This indicator may be helpful for options traders or for traders who want to see the probability of a move.
It classifies returns into five categories:
Extreme Rise - Over 2 standard deviations above normal returns
Rise - Between 0.5 standard deviations and 2 standard deviations above normal returns
Flat - Falling in the range of +/- 0.5 standard deviations of normal returns
Fall - Between 0.5 standard deviations and 2 standard deviations below normal returns
Extreme Fall - Over 2 standard deviations below normal returns
It is an adaptive probability model, which trains on the previous 1000 data points, and is calculated by creating probability vectors for the current reading of the PPO, MA, volume histogram, and previous return, and combining them into one probability vector.
ICT HTF Volume Candles (Based on HTF Candles by Fadi)# ICT HTF Volume Candles - Multi-Timeframe Volume Analysis
## Overview
This indicator provides multi-timeframe volume visualization designed to complement price action analysis. It displays volume data from up to 6 higher timeframes simultaneously in a separate panel, allowing traders to identify volume spikes, divergences, and institutional activity without switching between timeframes.
**Original Concept Credits:** This indicator builds upon the HTF Candles framework by Fadi, adapting it specifically for volume analysis with enhanced features including gap-filling for extended hours, multiple scaling methods, and advanced synchronization.
## What Makes This Script Original
### Key Innovations:
1. **Three Volume Scaling Methods:**
- **Per-HTF Auto Scale:** Each timeframe scales independently for detailed comparison
- **Global Auto Scale:** All timeframes use unified scale for relative volume comparison
- **Manual Scale:** User-defined maximum for consistent analysis across sessions
2. **Bullish/Bearish Volume Differentiation:**
- Volume bars colored based on price movement (close vs open)
- Separate styling for bullish (green) and bearish (red) volume periods
- Helps identify whether volume supports price direction
3. **Advanced Time Synchronization:**
- Custom daily candle open times (Midnight, 8:30 AM, 9:30 AM ET)
- Timezone-aware calculations for New York trading hours
- Real-time countdown timers for each timeframe
- **Gap-filling technology** for continuous display during extended hours and weekends
4. **Flexible Display Options:**
- Configurable spacing and positioning
- Label placement (top, bottom, or both)
- Day-of-week or time interval labels on candles
- Works reliably in backtesting and live trading
## How It Works
### Volume Calculation
The indicator uses `request.security()` with optimized parameters to fetch volume data from higher timeframes:
- **Volume Open/High/Low/Close (OHLC):** Tracks volume changes within each HTF candle
- **Color Logic:** Compares HTF close vs open prices to determine bullish/bearish classification
- **Alignment:** All volume bars share a common baseline for easy visual comparison
- **Gap Handling:** Uses `gaps=barmerge.gaps_off` to maintain continuity during non-trading hours
### Technical Implementation
```
1. Monitors HTF timeframe changes using request.security() with lookahead
2. Creates new VolumeCandle object when HTF bar opens
3. Updates current candle's volume H/L/C on each chart bar
4. Applies selected scaling method to normalize display height
5. Repositions all candles and labels on each bar update
6. Fills gaps automatically during extended hours for consistent display
```
### Scaling Methods Explained
**Method 1 - Auto Scale per HTF:**
Each timeframe displays volume relative to its own maximum. Best for identifying patterns within each individual timeframe.
**Method 2 - Global Auto Scale:**
All timeframes share the same scale based on the highest volume across all HTFs. Best for comparing relative volume strength between timeframes.
**Method 3 - Manual Scale:**
User sets maximum volume value. Best for maintaining consistent scale across different trading sessions or instruments.
## How to Use This Indicator
### Setup
1. Add indicator to your chart (it appears in a separate panel below price)
2. Configure up to 6 higher timeframes (default: 5m, 15m, 1H, 4H, 1D, 1W)
3. Set number of candles to display for each timeframe
4. Choose volume scaling method based on your analysis needs
5. Enable "Fix gaps in non-trading hours" for extended hours trading (enabled by default)
### Interpretation
**Volume Spikes:**
- Sudden increase in volume height indicates institutional activity or strong conviction
- Compare volume between timeframes to identify where the real money is moving
- Look for volume spikes that appear across multiple timeframes simultaneously
**Bullish vs Bearish Volume:**
- **Green volume bars:** Price closed higher (buying pressure)
- **Red volume bars:** Price closed lower (selling pressure)
- High green volume during uptrend = confirmation of strength
- High red volume during downtrend = confirmation of weakness
- High volume opposite to trend = potential reversal warning
**Multi-Timeframe Context:**
- **5m/15m:** Scalping and day trading activity
- **1H/4H:** Swing trading and intraday institutional flows
- **Daily/Weekly:** Major position building and long-term trends
**Divergences:**
- Price making new highs but volume declining = weakening trend
- Volume increasing while price consolidates = potential breakout brewing
- Price breaks level but volume doesn't confirm = likely false breakout
### Practical Examples
**Example 1 - Institutional Confirmation:**
Price breaks above resistance. Check volume across timeframes:
- 5m shows spike = retail interest
- 15m + 1H + 4H all show spikes = institutional confirmation
- **Trade confidence: HIGH**
**Example 2 - False Breakout Detection:**
Price breaks resistance with:
- High volume on 5m only
- Normal/low volume on 1H and 4H
- **Interpretation:** Likely retail trap, institutions not participating
- **Action:** Wait for pullback or avoid
**Example 3 - Accumulation Phase:**
Price ranges sideways but:
- Daily volume gradually increasing
- Weekly volume above average
- **Interpretation:** Smart money accumulating
- **Action:** Prepare for breakout in direction of volume
**Example 4 - Volume Divergence:**
Price makes new high:
- Current high has lower volume than previous high across all timeframes
- **Interpretation:** Weakening momentum
- **Action:** Consider profit-taking or reversal trade
## Configuration Parameters
### Timeframe Settings
- **HTF 1-6:** Select timeframes (must be higher than chart timeframe)
- **Max Display:** Number of candles to show per timeframe (1-50)
- **Limit to Next HTFs:** Display only first N enabled timeframes (1-6)
### Styling
- **Bull/Bear Colors:** Separate colors for body, border, and wick
- **Padding from current candles:** Distance offset from live price action
- **Space between candles:** Gap between individual volume bars
- **Space between Higher Timeframes:** Gap between different timeframe groups
- **Candle Width:** Thickness of volume bars (1-4, multiplied by 2)
### Volume Settings
- **Volume Scale Method:** Choose 1, 2, or 3
- 1 = Auto Scale per HTF (each TF independent)
- 2 = Global Auto Scale (all TF unified)
- 3 = Manual Scale (user-defined max)
- **Auto Scale Volume:** Enable/disable automatic scaling
- **Manual Scale Max Volume:** Set maximum when using Method 3
### Label Settings
- **HTF Label:** Show/hide timeframe names with color and size options
- **Label Positions:** Display at Top, Bottom, or Both
- **Label Alignment:** Align centered or Follow Candles
- **Remaining Time:** Show countdown timer until next HTF candle
- **Interval Value:** Display day-of-week or time on each candle
### Custom Daily Candle
- **Enable Custom Daily:** Override default daily candle timing
- **Open Time Options:**
- **Midnight:** Standard 00:00 ET daily open
- **8:30 AM:** Align with economic data releases
- **9:30 AM:** Align with NYSE market open
- Useful for specific trading strategies or market alignment
### Advanced Settings
- **Fix gaps in non-trading hours:** Maintains alignment during extended hours and weekends (recommended: ON)
- Prevents visual gaps during forex weekend closures
- Ensures consistent display during crypto 24/7 trading
- Improves backtesting reliability
## Best Practices
1. **Pair with Price Action:** Use alongside HTF price candles indicator for complete picture
2. **Start Simple:** Enable 2-3 timeframes initially (e.g., 15m, 1H, 4H), add more as needed
3. **Match Settings:** Use same candle width/spacing as companion price indicator for visual alignment
4. **Scale Appropriately:**
- Use **Global scale** (Method 2) when comparing timeframes
- Use **Per-HTF scale** (Method 1) for pattern analysis within each timeframe
- Use **Manual scale** (Method 3) for consistent day-to-day comparison
5. **Watch for Volume Clusters:** High volume appearing simultaneously across multiple HTFs signals significant market events
6. **Confirm Breakouts:** Always check if volume supports the price movement across higher timeframes
7. **Extended Hours:** Keep "Fix gaps" enabled for 24/7 markets (Forex, Crypto) and weekend analysis
## Technical Notes
- **Timezone:** All calculations use America/New_York timezone for consistency
- **Real-time Updates:** Volume and timers update on each tick during market hours
- **Performance:** Optimized with max_bars_back=5000 for extensive historical analysis
- **Compatibility:** Works on all instruments with volume data (Stocks, Forex, Crypto, Futures)
- **Gap Handling:** Uses `barmerge.gaps_off` to fill data gaps during non-trading periods
- **Backtesting:** Uses `lookahead=barmerge.lookahead_on` for stable historical data without repainting
- **Data Continuity:** Automatically handles market closures, weekends, and extended hours
## Updates & Improvements
**Version 2.0 (Current):**
- ✅ Fixed alignment issues during extended hours and weekends
- ✅ Eliminated repainting in backtesting
- ✅ Added gap-filling technology for continuous display
- ✅ Improved data synchronization across all timeframes
- ✅ Enhanced NA value handling for data integrity
- ✅ Added advanced settings group for user control
## Support
For questions, suggestions, or feedback, please comment on the publication or message the author.
---
**Disclaimer:** This indicator is for educational and informational purposes only. It does not constitute financial advice. Past performance is not indicative of future results. Always perform your own analysis and implement proper risk management before making trading decisions.
Advanced Correlation Monitor📊 Advanced Correlation Monitor - Pine Script v6
🎯 What does this indicator do?
Monitors real-time correlations between 13 different asset pairs and alerts you when historically strong correlations break, indicating potential trading opportunities or changes in market dynamics.
🚀 Key Features
✨ Multi-Market Monitoring
7 Forex Pairs (GBPUSD/DXY, EURUSD/GBPUSD, etc.)
6 Index/Stock Pairs (SPY/S&P500, DAX/NASDAQ, TSLA/NVDA, etc.)
Fully configurable - change any pair from inputs
📈 Dual Correlation Analysis
Long Period (90 bars): Identifies historically strong correlations
Short Period (6 bars): Detects recent breakdowns
Pearson Correlation using Pine Script v6 native functions
🎨 Intuitive Visualization
Real-time table with 6 information columns
Color coding: Green (correlated), Red (broken), Gray (normal)
Visual states: 🟢 OK, 🔴 BROKEN, ⚫ NORMAL
🚨 Smart Alert System
Only alerts previously correlated pairs (>80% historical)
Detects breakdowns when short correlation <80%
Consolidated alert with all affected pairs
🛠️ Flexible Configuration
Adjustable Parameters:
📅 Periods: Long (30-500), Short (2-50)
🎯 Threshold: 50%-99% (default 80%)
🎨 Table: Configurable position and size
📊 Symbols: All pairs are configurable
Default Pairs:
FOREX: INDICES/STOCKS:
- GBPUSD vs DXY • SPY vs S&P500
- EURUSD vs GBPUSD • DAX vs S&P500
- EURUSD vs DXY • DAX vs NASDAQ
- USDCHF vs DXY • TSLA vs NVDA
- GBPUSD vs USDCHF • MSFT vs NVDA
- EURUSD vs USDCHF • AAPL vs NVDA
- EURUSD vs EURCAD
💡 Practical Use Cases
🔄 Pairs Trading
Detects when strong correlations break for:
Statistical arbitrage
Mean reversion trading
Divergence opportunities
🛡️ Risk Management
Identifies when "safe" assets start moving independently:
Portfolio diversification
Smart hedging
Regime change detection
📊 Market Analysis
Understand underlying market structure:
Forex/DXY correlations
Tech sector rotation
Regional market disconnection
🎓 Results Interpretation
Reading Example:
EURUSD vs DXY: -98.57% → -98.27% | 🟢 OK
└─ Perfect negative correlation maintained (EUR rises when DXY falls)
TSLA vs NVDA: 78.12% → 0% | ⚫ NORMAL
└─ Lost tech correlation (divergence opportunity)
Trading Signals:
🟢 → 🔴: Broken correlation = Possible opportunity
Large difference: Indicates correlation tension
Multiple breaks: Market regime change
Super EMA PrismThis script implements the Binary Trade Logic (BTL) algorithm to calculate two distinct scores that range from 0 to 7. One score is calculated assigning a power of 2 weight to the positive sign of 3 Phi^3 distant Moving Average (MA) slopes. The other score is calculated assigning a power of 2 weight to the sign of the difference between the price and the value of 3 Phi^3 distant Moving Average (MA).
For the first score, hereafter called as the angle score (AS), the largest MA slope positive sign receives weight 4, the middle length MA slope positive sign receives weight 2 and the shortest MA slope positive sign receives weight 1. The positive sign of an MA is defined as 1 if the slope of the MA is positive and 0, otherwise. Therefore, for MAs 305, 72 and 17, if slope(MA305) > 0, slope(MA72) < 0 and slope(MA17) > 0, then score will be 4*1 + 2*0 + 1*1 = 5. Up to my knowledge, this score was first proposed by Bo Williams and named by him as Prisma.
For the second score, hereafter called as the value score (VS), if the price > largest MA, it receives weight 4. If the price > the middle length MA, it receives weight 2 and if the price > the the shortest MA, it receives weight 1. Therefore, for MAs 305, 72 and 17, if price < MA305, price > MA72 and price > MA17, then score will be 4*0 + 2*1 + 1*1 = 3. Up to my knowledge, this score was first proposed by Bo Williams and named by him as Prisma.
Both AS and VS are calculated for Phi^3 lengths (610, 144, 34) and for Phi^3/2 lengths (305, 72, 17). The scores of the same kind calculated for each set of length are combined multiplying the Phi^3 length score by 10 and adding with with the Phi^3/2 score, therefore providing a 2 digit score ranging from 0 to 77. For instance, if we have AS(610, 144, 34) = 7 and AS(305, 72, 17) = 5, we have AS=75. At the same time, if we have VS(610, 144, 34) = 6 and VS(305, 72, 17) = 4, we have VS=64.
VS score is plotted by default in black, but it can be on white for dark themes. AS is plotted with the color of the longest MA used.
Chart background is colored according to the range of values for AS and VS, checked in the following order:
if AS >= 13 and VS <= 13 then back color = red
if AS >= 13 or VS <= 13 then back color = orange
if AS >= 64 and VS >= 64 then back color = green
if AS >= 64 or VS >= 64 then back color = blue
otherwise back color = none (white o black)
Cross-Correlation Lead/Lag AnalyzerCross-Correlation Lead/Lag Analyzer (XCorr)
Discover which instrument moves first with advanced cross-correlation analysis.
This indicator analyzes the lead/lag relationship between any two financial instruments using rolling cross-correlation at multiple time offsets. Perfect for pairs trading, market timing, and understanding inter-market relationships.
Key Features:
Universal compatibility - Works with any two symbols (stocks, futures, forex, crypto, commodities)
Multi-timeframe analysis - Automatically adjusts lag periods based on your chart timeframe
Real-time correlation table - Shows current correlation values for all lag scenarios
Visual lead/lag detection - Color-coded plots make it easy to spot which instrument leads
Smart "Best" indicator - Automatically identifies the strongest relationship
How to Use:
Set your symbols in the indicator settings (default: NQ1! vs RTY1!)
Adjust correlation length (default: 20 periods for smooth but responsive analysis)
Watch the colored lines:
• Red/Orange: Symbol 2 leads Symbol 1 by 1-2 periods
• Blue: Instruments move simultaneously
• Green/Purple: Symbol 1 leads Symbol 2 by 1-2 periods
Check the table for exact correlation values and the "Best" relationship
Interpreting Results:
Correlation > 0.7: Strong positive relationship
Correlation 0.3-0.7: Moderate relationship
Correlation < 0.3: Weak/no relationship
Highest line indicates the optimal timing relationship
Popular Use Cases:
Index Futures : NQ vs ES, RTY vs IWM
Sector Rotation : XLF vs XLK, QQQ vs SPY
Commodities : GC vs SI, CL vs NG
Currency Pairs : EURUSD vs GBPUSD
Crypto : BTC vs ETH correlation analysis
Technical Notes:
Cross-correlation measures linear relationships between two time series at different time lags. This implementation uses Pearson correlation with adjustable periods, calculating correlations from -2 to +2 period offsets to detect leading/lagging behavior.
Perfect for quantitative analysts, pairs traders, and anyone studying inter-market relationships.
Ichimoku Power Indicator# Ichimoku Power Indicator
## Overview
The Ichimoku Power Indicator is an advanced tool that combines the traditional Ichimoku Cloud system with a unique power ranking mechanism. This indicator provides traders with a comprehensive view of market trends and potential reversal points, all while quantifying the strength of bullish and bearish signals.
## Key Features
1. **Full Ichimoku Cloud Visualization:** Displays all components of the Ichimoku Cloud system, including Conversion Line (Tenkan-sen), Base Line (Kijun-sen), Leading Span A and B (Kumo), and Lagging Span (Chikou Span).
2. **Power Ranking System:** Calculates and displays a bullish and bearish power score based on 11 different Ichimoku-derived conditions.
3. **Real-time Updates:** Power scores are updated in real-time as market conditions change.
4. **Easy-to-Read Display:** A clear, color-coded table shows the current bullish and bearish power scores.
5. **Customizable Parameters:** Allows adjustment of key Ichimoku settings to suit different trading styles and timeframes.
## How It Works
The indicator evaluates 11 different conditions derived from Ichimoku Cloud components:
1. Cloud color
2. Price position relative to the cloud
3. Tenkan-sen vs Kijun-sen
4. Price vs Tenkan-sen
5. Price vs Kijun-sen
6. Tenkan-sen vs Cloud
7. Kijun-sen vs Cloud
8. Chikou Span vs Cloud
9. Chikou Span vs Tenkan-sen
10. Chikou Span vs Kijun-sen
11. Chikou Span vs Price
Each bullish condition adds a point to the bullish power score, while each bearish condition adds a point to the bearish power score. The maximum score for each is 11.
## Interpretation
- Higher bullish scores suggest stronger upward trends or potential bullish reversals.
- Higher bearish scores indicate stronger downward trends or potential bearish reversals.
- When scores are close, it may indicate a period of consolidation or uncertainty.
## Use Cases
- Trend Confirmation: Use in conjunction with price action to confirm the strength of current trends.
- Reversal Detection: Watch for changes in power scores as early indicators of potential trend reversals.
- Entry and Exit Signals: High power scores can be used to identify optimal entry or exit points.
- Market Analysis: Gain a quick overview of market conditions across multiple assets or timeframes.
## Note
This indicator is designed to complement your existing trading strategy. Always use it in conjunction with other forms of analysis and proper risk management techniques.
Experiment with different timeframes and settings to find the configuration that best suits your trading style and the assets you trade.
Happy trading!
Price Divergence IndicatorThis Price Divergence Indicator indicator modifies the standard Divergence Indicator to look for price divergences between the current chart and any other selected TradingView chart.
The thesis that this indicator is built upon:
Prices on assets or indices that are normally correlated move in lock step. Where there are deviations between the confirmed highs or lows of two assets or indices it is likely that they will "catch up" in the near future.
By default it will load the price data for the SPX and look for price divergences on the current chart timeframe. Any TradingView Symbol can be selected as the 'Comparison Source' and any timeframe. Some of the options I've been trying out include:
SPX vs NDQ
XAO vs SPX
UK100 vs NDQM
MSFT vs NDQM
GOOG vs NDQM
AMZN vs MSFT
BTC vs ETH
BTC vs NDQ
BTC vs DXY
I've found looking for divergences on a longer timeframe can be useful and don't expect any meaningful results if you set it to shorter than chart timeframes.
Alerts can be created based on any of the divergences and the 'Backtest Buy Signal' can be used to send notification to a backtester (bull = 2, hidden bull = 1, neutral = 0, hidden bear = -1, bear = -2), this is plotted to display.none, so enable it in Settings - Style and disable all other plots to see it.
Divergences are measured between the CONFIRMED peaks of the two charts. The confirmation timeframe is set using 'Pivot Lookback Right'. The lower the lookback the quicker the signal and the more likely it is to not have hit an actual peak, a higher lookback will give a much more dependable signal but the move may be finished by the time the alert actually fires. The "Plot When Alerts Fire" option should give you an idea (top and bottom triangles) of what to expect, but you should watch bar replays to understand how your setting will impact when alerts are created and potential false positives.
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.
Luxy Adaptive MA Cloud - Trend Strength & Signal Tracker V2Luxy Adaptive MA Cloud - Professional Trend Strength & Signal Tracker
Next-generation moving average cloud indicator combining ultra-smooth gradient visualization with intelligent momentum detection. Built for traders who demand clarity, precision, and actionable insights.
═══════════════════════════════════════════════
WHAT MAKES THIS INDICATOR SPECIAL?
═══════════════════════════════════════════════
Unlike traditional MA indicators that show static lines, Luxy Adaptive MA Cloud creates a living, breathing visualization of market momentum. Here's what sets it apart:
Exponential Gradient Technology
This isn't just a simple fill between two lines. It's a professionally engineered gradient system with 26 precision layers using exponential density distribution. The result? An organic, cloud-like appearance where the center is dramatically darker (15% transparency - where crossovers and price action occur), while edges fade gracefully (75% transparency). Think of it as a visual "heat map" of trend strength.
Dynamic Momentum Intelligence
Most MA clouds only show structure (which MA is on top). This indicator shows momentum strength in real-time through four intelligent states:
- 🟢 Bright Green = Explosive bullish momentum (both MAs rising strongly)
- 🔵 Blue = Weakening bullish (structure intact, but momentum fading)
- 🟠 Orange = Caution zone (bearish structure forming, weak momentum)
- 🔴 Deep Red = Strong bearish momentum (both MAs falling)
The cloud literally tells you when trends are accelerating or losing steam.
Conditional Performance Architecture
Every calculation is optimized for speed. Disable a feature? It stops calculating entirely—not just hidden, but not computed . The 26-layer gradient only renders when enabled. Toggle signals off? Those crossover checks don't run. This makes it one of the most efficient cloud indicators available, even with its advanced visual system.
Zero Repaint Guarantee
All signals and momentum states are based on confirmed bar data only . What you see in historical data is exactly what you would have seen trading live. No lookahead bias. No repainting tricks. No signals that "magically" appear perfect in hindsight. If a signal shows in history, it would have triggered in real-time at that exact moment.
Educational by Design
Every single input includes comprehensive tooltips with:
- Clear explanations of what each parameter does
- Practical examples of when to use different settings
- Recommended configurations for scalping, day trading, and swing trading
- Real-world trading impact ("This affects entry timing" vs "This is visual only")
You're not just getting an indicator—you're learning how to use it effectively .
═══════════════════════════════════════════════
THE GRADIENT CLOUD - TECHNICAL DETAILS
═══════════════════════════════════════════════
Architecture:
26 precision layers for silk-smooth transitions
Exponential density curve - layers packed tightly near center (where crossovers happen), spread wider at edges
75%-15% transparency range - center is highly opaque (15%), edges fade gracefully (75%)
V-Gradient design - emphasizes the action zone between Fast and Medium MAs
The Four Momentum States:
🟢 GREEN - Strong Bullish
Fast MA above Medium MA
Both MAs rising with momentum > 0.02%
Action: Enter/hold LONG positions, strong uptrend confirmed
🔵 BLUE - Weak Bullish
Fast MA above Medium MA
Weak or flat momentum
Action: Caution - bullish structure but losing strength, consider trailing stops
🟠 ORANGE - Weak Bearish
Medium MA above Fast MA
Weak or flat momentum
Action: Warning - bearish structure developing, consider exits
🔴 RED - Strong Bearish
Medium MA above Fast MA
Both MAs falling with momentum < -0.02%
Action: Enter/hold SHORT positions, strong downtrend confirmed
Smooth Transitions: The momentum score is smoothed using an 8-bar EMA to eliminate noise and prevent whipsaws. You see the true trend , not every minor fluctuation.
═══════════════════════════════════════════════
FLEXIBLE MOVING AVERAGE SYSTEM
═══════════════════════════════════════════════
Three Customizable MAs:
Fast MA (default: EMA 10) - Reacts quickly to price changes, defines short-term momentum
Medium MA (default: EMA 20) - Balances responsiveness with stability, core trend reference
Slow MA (default: SMA 200, optional) - Long-term trend filter, major support/resistance
Six MA Types Available:
EMA - Exponential; faster response, ideal for momentum and day trading
SMA - Simple; smooth and stable, best for swing trading and trend following
WMA - Weighted; middle ground between EMA and SMA
VWMA - Volume-weighted; reflects market participation, useful for liquid markets
RMA - Wilder's smoothing; used in RSI/ADX, excellent for trend filters
HMA - Hull; extremely responsive with minimal lag, aggressive option
Recommended Settings by Trading Style:
Scalping (1m-5m):
Fast: EMA(5-8)
Medium: EMA(10-15)
Slow: Not needed or EMA(50)
Day Trading (5m-1h):
Fast: EMA(10-12)
Medium: EMA(20-21)
Slow: SMA(200) for bias
Swing Trading (4h-1D):
Fast: EMA(10-20)
Medium: EMA(34-50)
Slow: SMA(200)
Pro Tip: Start with Fast < Medium < Slow lengths. The gradient works best when there's clear separation between Fast and Medium MAs.
═══════════════════════════════════════════════
CROSSOVER SIGNALS - CLEAN & RELIABLE
═══════════════════════════════════════════════
Golden Cross ⬆ LONG Signal
Fast MA crosses above Medium MA
Classic bullish reversal or trend continuation signal
Most reliable when accompanied by GREEN cloud (strong momentum)
Death Cross ⬇ SHORT Signal
Fast MA crosses below Medium MA
Classic bearish reversal or trend continuation signal
Most reliable when accompanied by RED cloud (strong momentum)
Signal Intelligence:
Anti-spam filter - Minimum 5 bars between signals prevents noise
Clean labels - Placed precisely at crossover points
Alert-ready - Built-in ALERTS for automated trading systems
No repainting - Signals based on confirmed bars only
Signal Quality Assessment:
High-Quality Entry:
Golden Cross + GREEN cloud + Price above both MAs
= Strong bullish setup ✓
Low-Quality Entry (skip or wait):
Golden Cross + ORANGE cloud + Choppy price action
= Weak bullish setup, likely whipsaw ✗
═══════════════════════════════════════════════
REAL-TIME INFO PANEL
═══════════════════════════════════════════════
An at-a-glance dashboard showing:
Trend Strength Indicator:
Visual display of current momentum state
Color-coded header matching cloud color
Instant recognition of market bias
MA Distance Table:
Shows percentage distance of price from each enabled MA:
Green rows : Price ABOVE MA (bullish)
Red rows : Price BELOW MA (bearish)
Gray rows : Price AT MA (rare, decision point)
Distance Interpretation:
+2% to +5%: Healthy uptrend
+5% to +10%: Getting extended, caution
+10%+: Overextended, expect pullback
-2% to -5%: Testing support
-5% to -10%: Oversold zone
-10%+: Deep correction or downtrend
Customization:
4 corner positions
5 font sizes (Tiny to Huge)
Toggle visibility on/off
═══════════════════════════════════════════════
HOW TO USE - PRACTICAL TRADING GUIDE
═══════════════════════════════════════════════
STRATEGY 1: Trend Following
Identify trend : Wait for GREEN (bullish) or RED (bearish) cloud
Enter on signal : Golden Cross in GREEN cloud = LONG, Death Cross in RED cloud = SHORT
Hold position : While cloud maintains color
Exit signals :
• Cloud turns ORANGE/BLUE = momentum weakening, tighten stops
• Opposite crossover = close position
• Cloud turns opposite color = full reversal
STRATEGY 2: Pullback Entries
Confirm trend : GREEN cloud established (bullish bias)
Wait for pullback : Price touches or crosses below Fast MA
Enter when : Price rebounds back above Fast MA with cloud still GREEN
Stop loss : Below Medium MA or recent swing low
Target : Previous high or when cloud weakens
STRATEGY 3: Momentum Confirmation
Your setup triggers : (e.g., chart pattern, support/resistance)
Check cloud color :
• GREEN = proceed with LONG
• RED = proceed with SHORT
• BLUE/ORANGE = skip or reduce size
Use gradient as confluence : Not as primary signal, but as momentum filter
Risk Management Tips:
Never enter against the cloud color (don't LONG in RED cloud)
Reduce position size during BLUE/ORANGE (transition periods)
Place stops beyond Medium MA for swing trades
Use Slow MA (200) as final trend filter - don't SHORT above it in uptrends
═══════════════════════════════════════════════
PERFORMANCE & OPTIMIZATION
═══════════════════════════════════════════════
Tested On:
Crypto: BTC, ETH, major altcoins
Stocks: SPY, AAPL, TSLA, QQQ
Forex: EUR/USD, GBP/USD, USD/JPY
Indices: S&P 500, NASDAQ, DJI
═══════════════════════════════════════════════
TRANSPARENCY & RELIABILITY
═══════════════════════════════════════════════
Educational Focus:
Detailed tooltips on every input
Clear documentation of methodology
Practical examples in descriptions
Teaches you why , not just what
Open Logic:
Momentum calculation: (Fast slope + Medium slope) / 2
Smoothing: 8-bar EMA to reduce noise
Thresholds: ±0.02% for strong momentum classification
Everything is transparent and explainable
═══════════════════════════════════════════════
COMPLETE FEATURE LIST
═══════════════════════════════════════════════
Visual Components:
26-layer exponential gradient cloud
3 customizable moving average lines
Golden Cross / Death Cross labels
Real-time info panel with trend strength
MA distance table
Calculation Features:
6 MA types (EMA, SMA, WMA, VWMA, RMA, HMA)
Momentum-based cloud coloring
Smoothed trend strength scoring
Conditional performance optimization
Customization Options:
All MA lengths adjustable
All colors customizable (when gradient disabled)
Panel position (4 corners)
Font sizes (5 options)
Toggle any feature on/off
Signal Features:
Anti-spam filter (configurable gap)
Clean, non-overlapping labels
Built-in alert conditions
No repainting guarantee
═══════════════════════════════════════════════
IMPORTANT DISCLAIMERS
═══════════════════════════════════════════════
This indicator is for educational and informational purposes only
Not financial advice - always do your own research
Past performance does not guarantee future results
Use proper risk management - never risk more than you can afford to lose
Test on paper/demo accounts before using with real money
Combine with other analysis methods - no single indicator is perfect
Works best in trending markets; less effective in choppy/sideways conditions
Signals may perform differently in different timeframes and market conditions
The indicator uses historical data for MA calculations - allow sufficient lookback period
═══════════════════════════════════════════════
CREDITS & TECHNICAL INFO
═══════════════════════════════════════════════
Version: 2.0
Release: October 2025
Special Thanks:
TradingView community for feedback and testing
Pine Script documentation for technical reference
═══════════════════════════════════════════════
SUPPORT & UPDATES
═══════════════════════════════════════════════
Found a bug? Comment below with:
Ticker symbol
Timeframe
Screenshot if possible
Steps to reproduce
Feature requests? I'm always looking to improve! Share your ideas in the comments.
Questions? Check the tooltips first (hover over any input) - most answers are there. If still stuck, ask in comments.
═══════════════════════════════════════════════
Happy Trading!
Remember: The best indicator is the one you understand and use consistently. Take time to learn how the cloud behaves in different market conditions. Practice on paper before going live. Trade smart, manage risk, and may the trends be with you! 🚀
PRO Scalper(EN)
## What it is
**PRO Scalper** is an intraday price–action and liquidity map that helps you see where the market is likely to move **now**, not just where it has been.
It combines five building blocks that professional scalpers often watch together:
1. **Session Volume-Weighted Average Price (VWAP)** — the intraday “fair value” anchor.
2. **Opening Range** — the first minutes of the session that set the day’s balance.
3. **Trend filter** — higher-timeframe bias using **Exponential Moving Averages (EMA)** and optional **Average Directional Index (ADX)** strength.
4. **Two independent Supply/Demand zone engines** — zones are drawn from confirmed swing pivots, with midlines and **touch counters**.
5. **Order-flow style visuals**:
* **Delta bubbles** (green/red circles) show where buying or selling pressure was unusually strong, using a safe **delta proxy** (no external feeds).
* **Liquidity densities** (subtle rectangular bands) highlight clusters of large activity that often act as magnets or barriers and disappear when “eaten” by strong moves.
This mix gives you a **complete intraday picture**: the mean (VWAP), the day’s initial balance (Opening Range), the higher-timeframe push (trend filter), the nearby fuel or brakes (zones), and the live pressure points (bubbles and densities).
---
## Why these components
* **VWAP** tracks where the bulk of traded value sits. Price tends to rotate around it or accelerate away from it — a perfect compass for scalps.
* **Opening Range** frames the early auction. Many intraday breaks, fades and retests start at its boundaries.
* **EMA bias + ADX strength** separates trending conditions from chop, so you can keep only the zones that agree with the bigger push.
* **Pivot-based zones (two pairs at once)** are simple, objective and fast. Midlines help with confirmations; touch counters quantify how many times the zone was tested.
* **Bubbles and densities** add the “effort” layer: where the push appeared and where liquidity is concentrated. You see **where** a move is likely to continue or fail.
Together they reduce ambiguity: **context + level + effort** — all on one screen.
---
## How it works (plain language)
* **VWAP** resets each day and is calculated as the cumulative sum of typical price multiplied by volume divided by total volume.
* **Opening Range** is either automatic (a multiple of your chart timeframe) or a manual number of minutes. While it is forming, the highest high and lowest low are captured and plotted as the range.
* **Trend filter**
* **EMA Fast** and **EMA Slow** define directional bias.
* **ADX (optional)** adds “trend strength”: only when the Average Directional Index is above the chosen threshold do we treat the move as strong. You can source this from a higher timeframe.
* **Zones**
* There are **two independent pairs** of pivots at the same time (for example 10-left 10-right and 5-left 5-right).
* Each detected pivot creates a **Supply** (from a swing high) or **Demand** (from a swing low) box. Box depth = **zone depth × Average True Range** for adaptive sizing; the boxes **extend forward**.
* Midline (optional dashed line inside the box) is the “balance” of the zone.
* **“Only in trend”** mode can hide boxes that go against the higher-timeframe bias.
* The **touch counter** increases when price revisits the box. Labels show the pair name and the number of touches.
* **Bubbles**
* A safe **delta proxy** measures bar pressure (for example, range-weighted close vs open).
* A **quantile filter** shows only unusually large pressure: choose lookback and percentile, and the script draws a circle sized by intensity (green = bullish pressure, red = bearish).
* **Densities**
* The script marks heavy activity clusters as **subtle bands** around price (depth = fraction of Average True Range).
* If price **breaks** a density with volume above its moving average, the band **disappears** (“eaten”), which often precedes continuation.
---
## How to use — practical playbooks
> Recommended chart: crypto or index futures, one to five minutes. Use **one hour** or **fifteen minutes** for the higher-timeframe bias.
### 1) Trend pullback scalp (continuation)
1. Enable **Only in trend** zones.
2. In an uptrend: wait for a pullback into a **Demand** zone that overlaps with VWAP or sits just below the Opening Range midpoint.
3. Look for **green bubbles** near the zone’s bottom or a fresh **density** under price.
4. Enter on a candle closing **back above the zone midline**.
5. Stop-loss: below the bottom of the zone or a small multiple of Average True Range.
6. Targets: previous swing high, Opening Range high, fixed risk multiples, or VWAP.
Mirror the logic for downtrends using Supply zones, red bubbles and densities above price.
### 2) Reversion with liquidity sweep (fade)
1. Bias neutral or countertrend allowed.
2. Price **wicks through** a zone boundary (or an Opening Range line) and **closes back inside** the zone.
3. The bubble color often flips (absorption).
4. Enter toward the **inside** of the zone; stop beyond the sweep wick; first target = zone midline, second = opposite side of the zone or VWAP.
### 3) Opening Range break and retest
1. Wait for the Opening Range to complete.
2. A break with a large bubble suggests intent.
3. Look for a **retest** into a nearby zone aligned with VWAP.
4. Trade continuation toward the next zone or the session extremes.
### 4) Density “eaten” continuation
1. When a density band **disappears** on high volume, it often means the resting liquidity was consumed.
2. Trade in the direction of the break, toward the nearest opposing zone.
---
## Settings — quick guide
**Core**
* *ATR Length* — used for zone and density depths.
* *Show VWAP / Show Opening Range*.
* *Opening Range*: Auto (multiple of timeframe minutes) or Manual minutes.
**Trend Filter**
* *Mode*: Off, EMA only, or EMA with ADX strength.
* *Use higher timeframe* and its value.
* *EMA Fast / EMA Slow*, *ADX Length*, *ADX threshold*.
* *Plot EMA filter* to display the moving averages.
**Zones (two pairs)**
* *Pivot A Left / Right* and *Pivot B Left / Right*.
* *Zone depth × ATR*, *Extend bars*.
* *Show zone midline*, *Only in trend zones*.
* Labels automatically show the touch counters.
**Bubbles**
* *Show Bubbles*.
* *Quantile lookback* and *Quantile percent* (higher percent = stricter filter, fewer bubbles).
**Densities**
* *Metric*: absolute delta proxy or raw volume.
* *Quantile lookback / percent*.
* *Depth × ATR*, *Extend bars*, *Merge distance* (in ATR),
* *Break condition*: volume moving average length and multiplier,
* *Midline for densities* (optional dashed line).
---
## Tips and risk management
* This script **does not use external order-flow feeds**. Delta is a **proxy** suitable for TradingView; tune quantiles per symbol and timeframe.
* Do not trade every bubble. Combine **context (trend + VWAP + Opening Range)** with **level (zone)** and **effort (bubble/density)**.
* Set stop-losses beyond the zone or at a fraction of Average True Range. Predefine risk per trade.
* Backtest your rules with a strategy script before using real funds.
* Markets differ. Parameters that work on Bitcoin may not transfer to low-liquidity altcoins or stocks.
* Nothing here is financial advice. Scalping is high-risk; slippage and over-trading can quickly damage your account.
---
## What makes PRO Scalper unique
* Two **independent** zone engines run in parallel, so you can see both **larger structure** and **fine intraday levels** at the same time.
* Clean **“only in trend” rendering** — zones and midlines against the bias can be hidden, reducing clutter and hesitation.
* **Touch counters** convert “feel” into numbers.
* **Self-contained order-flow visuals** (bubbles and densities) that require no extra data sources.
* Careful defaults: subtle colors for densities, clearer zones, and responsive auto Opening Range.
---
(RU)
## Что это такое
**PRO Scalper** — это индикатор для внутридневной торговли, который показывает **контекст и ликвидность прямо сейчас**.
Он объединяет пять модулей, которыми профессиональные скальперы пользуются вместе:
1. **VWAP** — средневзвешенная по объему цена за сессию, «справедливая стоимость» дня.
2. **Opening Range** — первая часть сессии, задающая баланс дня.
3. **Фильтр тренда** — направление старшего таймфрейма по **экспоненциальным средним** и при желании по силе тренда **Average Directional Index**.
4. **Две независимые системы зон спроса/предложения** — зоны строятся от подтвержденных экстремумов (пивотов), имеют **среднюю линию** и **счетчик касаний**.
5. **Визуализация «ордер-флоу»**:
* **Пузыри дельты** (зеленые/красные круги) — места повышенного покупательного/продажного давления, рассчитанные через безопасный **прокси-дельты**.
* **Плотности ликвидности** (ненавязчивые прямоугольные ленты) — скопления объема, которые нередко притягивают цену или удерживают ее и исчезают, когда «разъедаются» сильным движением.
Итог — **полная картинка момента**: среднее (VWAP), баланс дня (Opening Range), старшая сила (фильтр тренда), ближайшие уровни топлива/тормозов (зоны), текущие точки усилия (пузыри и плотности).
---
## Почему именно эти элементы
* **VWAP** показывает, где сосредоточена стоимость; цена либо вращается вокруг него, либо быстро уходит — идеальный ориентир скальпера.
* **Opening Range** фиксирует ранний аукцион — от его границ часто начинаются пробои, возвраты и ретесты.
* **EMA + ADX** отделяют тренд от «пилы», позволяя оставлять на графике только зоны по направлению старшего таймфрейма.
* **Зоны от пивотов** просты, объективны и быстры; средняя линия помогает подтверждать разворот, счетчик касаний переводит субъективность в цифры.
* **Пузыри и плотности** добавляют слой «усилия»: где именно возник толчок и где сконцентрирована ликвидность.
Комбинация **контекста + уровня + усилия** уменьшает двусмысленность и ускоряет принятие решения.
---
## Как это работает (простыми словами)
* **VWAP** каждый день стартует заново: сумма «типичной цены × объем» делится на суммарный объем.
* **Opening Range** — автоматический (кратный минутам вашего таймфрейма) или вручную заданный период; пока он формируется, фиксируются максимум и минимум.
* **Фильтр тренда**
* Две экспоненциальные средние задают направление.
* **ADX** (по желанию) добавляет «силу». Источник можно взять со старшего таймфрейма.
* **Зоны**
* Одновременно работает **две пары** пивотов (например 10-лево 10-право и 5-лево 5-право).
* От пивота строится зона **предложения** (от максимума) или **спроса** (от минимума). Глубина зоны = **коэффициент × Average True Range**; зона тянется вперед.
* Внутри рисуется **средняя линия** (по желанию).
* Режим **«только по тренду»** скрывает зоны против старшего направления.
* **Счетчик касаний** увеличивается, когда цена снова входит в зону; подпись показывает пару и количество касаний.
* **Пузыри**
* Используется безопасный **прокси-дельты** — измерение «напряжения» внутри свечи.
* Через **квантильный фильтр** выводятся только необычно сильные места: настраиваются окно и процент квантиля; размер кружка — сила, цвет: зеленый покупатели, красный продавцы.
* **Плотности**
* Крупные активности отмечаются **ненавязчивыми прямоугольниками** (глубина — доля Average True Range).
* Если плотность **пробивается** объемом выше среднего, она **исчезает** — часто это предвещает продолжение.
---
## Как пользоваться — практические схемы
> Рекомендация: крипто или фьючерсы, таймфрейм 1–5 минут. Для старшего фильтра удобно взять **1 час** или **15 минут**.
### 1) Скальп на откат по тренду
1. Включите **«только по тренду»**.
2. В восходящем тренде дождитесь отката в **зону спроса**, желательно рядом с **VWAP** или серединой **Opening Range**.
3. Подтверждение — **зеленые пузыри** у нижней границы зоны или свежая **плотность** под ценой.
4. Вход после закрытия свечи **выше средней линии** зоны.
5. Стоп-лосс: за нижнюю границу зоны или небольшой множитель Average True Range.
6. Цели: предыдущий максимум, верх Opening Range, фиксированные R-множители, либо VWAP.
Для нисходящего тренда зеркально: зоны предложения, красные пузыри и плотности над ценой.
### 2) Контрдвижение с «выбиванием ликвидности»
1. Нейтральный или контртрендовый режим.
2. Цена **выносит хвостом** границу зоны (или линию Opening Range) и **закрывается обратно внутри**.
3. Цвет пузыря часто меняется (поглощение).
4. Вход внутрь зоны; стоп — за хвост выбивания; цели: средняя линия, противоположная граница зоны или VWAP.
### 3) Пробой Opening Range + ретест
1. Дождитесь завершения диапазона.
2. Сильный пробой с крупным пузырем — признак намерения.
3. Ищите **ретест** в зоне по тренду рядом с линией диапазона и VWAP.
4. Торгуйте продолжение к следующей зоне.
### 4) Продолжение после «съеденной» плотности
1. Когда прямоугольник плотности **исчезает** на повышенном объеме, это значит, что ликвидность поглощена.
2. Торгуйте в сторону пробоя к ближайшей противоположной зоне.
---
## Настройки — краткая шпаргалка
**Core**
— Длина Average True Range (для размеров зон и плотностей).
— Включение VWAP и Opening Range.
— Длина Opening Range: автоматическая (кратная минутам ТФ) или ручная.
**Trend Filter**
— Режим: выкл., только средние, либо средние + ADX.
— Источник со старшего таймфрейма и его значение.
— Длины средних, длина ADX и порог силы.
— Показать/скрыть линий средних.
**Zones (две пары одновременно)**
— Пара A: лев/прав; Пара B: лев/прав.
— Глубина зоны × Average True Range, продление по барам.
— Средняя линия, режим **«только по тренду»**.
— Подписи со счетчиком касаний.
**Bubbles**
— Вкл./выкл., окно поиска и процент квантиля (чем выше процент — тем реже пузыри).
**Densities**
— Метрика: абсолютная прокси-дельты или чистый объем.
— Окно/квантиль, глубина × Average True Range, продление,
— Порог объединения (в Average True Range),
— Условие «разъедания» по объему,
— Средняя линия плотности (по желанию).
---
## Советы и риски
* Индикатор **не использует внешние потоки ордер-флоу**. Дельта — **прокси**, подходящая для TradingView; подбирайте квантили под инструмент и таймфрейм.
* Не торгуйте каждый пузырь. Склейте **контекст (тренд + VWAP + Opening Range)** с **уровнем (зона)** и **усилием (пузырь/плотность)**.
* Стоп-лосс — за границей зоны или по Average True Range. Риск на сделку задавайте заранее.
* Перед реальными деньгами протестируйте правила в стратегии.
* Разные рынки ведут себя по-разному; настройки из Биткоина могут не подойти малоликвидным альткоинам или акциям.
* Это не инвестиционная рекомендация. Скальпинг — высокий риск; проскальзывание и переизбыток сделок быстро наносят ущерб капиталу.
---
## Чем уникален PRO Scalper
* Две **одновременные** системы зон показывают и **крупную структуру**, и **точные локальные уровни**.
* Режим **«только по тренду»** чистит экран от лишних уровней и ускоряет решение.
* **Счетчики касаний** дают количественную опору.
* **Самодостаточные визуализации усилия** (пузыри и плотности) — без сторонних источников данных.
* Аккуратная цветовая схема: плотности — мягко, зоны — ясно; Opening Range — адаптивный.
Пусть он станет вашей «картой местности» для быстрых и дисциплинированных решений внутри дня.
Aladin Pair Trading System v1Aladin Pair Trading System v1
What is This Indicator?
The Aladin Pair Trading System is a sophisticated tool designed to help traders identify profitable opportunities by comparing two related stocks that historically move together. Think of it as finding when one twin is running ahead or lagging behind the other - these moments often present trading opportunities as they tend to return to moving together.
Who Should Use This?
Beginners: Learn about statistical arbitrage and pair trading
Intermediate Traders: Execute mean-reversion strategies with confidence
Advanced Traders: Fine-tune parameters for optimal pair relationships
Portfolio Managers: Implement market-neutral strategies
💡 What is Pair Trading?
Imagine two ice cream shops next to each other. They usually have similar customer traffic because they're in the same area. If one day Shop A is packed while Shop B is empty, you might expect this imbalance to correct itself soon.
Pair trading works the same way:
You find two stocks that normally move together (like TCS and Infosys)
When one stock moves too far from the other, you trade expecting them to realign
You buy the lagging stock and sell the leading stock
When they come back together, you profit from both sides
Key Features
1. Z-Score Analysis
What it is: A statistical measure showing how far the price relationship has deviated from normal
What it means:
Z-Score near 0 = Normal relationship
Z-Score at +2 = Stock A is expensive relative to Stock B (Sell A, Buy B)
Z-Score at -2 = Stock A is cheap relative to Stock B (Buy A, Sell B)
2. Multiple Timeframe Analysis
Long-term Z-Score (300 bars): Shows the big picture trend
Short-term Z-Score (100 bars): Shows recent movements
Signal Z-Score (20 bars): Generates quick trading signals
3. Statistical Validation
The indicator checks if the pair is suitable for trading:
Correlation (must be > 0.7): Confirms the stocks move together
1.0 = Perfect positive correlation
0.7 = Strong correlation
Below 0.7 = Warning: pair may not be reliable
ADF P-Value (should be < 0.05): Tests if the relationship is stable
Low value = Good for pair trading
High value = Relationship may be random
Cointegration: Confirms long-term equilibrium relationship
YES = Pair tends to revert to mean
NO = Pair may drift apart permanently
Visual Elements Explained
Chart Zones (Color-Coded Areas)
Yellow Zone (-1.5 to +1.5)
Normal Zone: Relationship is stable
Action: Wait for better opportunities
Blue Zone (±1.5 to ±2.0)
Entry Zone: Deviation is significant
Action: Prepare for potential trades
Green/Red Zone (±2.0 to ±3.0)
Opportunity Zone: Strong deviation
Action: High-probability trade setups
Beyond ±3.0
Risk Limit: Extreme deviation
Action: Either maximum opportunity or structural break
Signal Arrows
Green Arrow Up (Buy A + Sell B):
Stock A is undervalued relative to B
Buy Stock A, Short Stock B
Red Arrow Down (Sell A + Buy B):
Stock A is overvalued relative to B
Sell Stock A, Buy Stock B
Settings Guide
Symbol Inputs
Pair Symbol (Symbol B): Choose the second stock to compare
Default: NSE:INFY (Infosys)
Example pairs: TCS/INFY, HDFCBANK/ICICIBANK, RELIANCE/ONGC
Z-Score Parameters
Long Z-Score Period (300): Historical context
Short Z-Score Period (100): Recent trend
Signal Period (20): Trading signals
Z-Score Threshold (2.0): Entry trigger level
Higher = Fewer but stronger signals
Lower = More frequent signals
Statistical Parameters
Correlation Period (240): How many bars to check correlation
Hurst Exponent Period (50): Measures mean-reversion tendency
Probability Lookback (100): Historical probability calculations
Trading Parameters
Entry Threshold (0.0): Minimum Z-score for entry
Risk Threshold (1.5): Warning level
Risk Limit (3.0): Maximum deviation to trade
How to Use (Step-by-Step)
Step 1: Choose Your Pair
Add the indicator to your chart (this becomes Stock A)
In settings, select Stock B (the comparison stock)
Choose stocks from the same sector for best results
Step 2: Verify Pair Quality
Check the Statistics Table (top-right corner):
✅ Correlation > 0.70 (Green = Good)
✅ ADF P-value < 0.05 (Green = Good)
✅ Cointegrated = YES (Green = Good)
If all three are green, the pair is suitable for trading!
Step 3: Wait for Signals
BUY SIGNAL (Green Arrow Up)
Z-Score crosses above -2.0
Action: Buy Stock A, Sell Stock B
Exit: When Z-Score returns to 0
SELL SIGNAL (Red Arrow Down)
Z-Score crosses below +2.0
Action: Sell Stock A, Buy Stock B
Exit: When Z-Score returns to 0
Step 4: Risk Management
Yellow Zone: Monitor only
Blue Zone: Prepare for entry
Green/Red Zone: Active trading zone
Beyond ±3.0: Maximum risk - use caution
⚠️ Important Warnings
Not All Pairs Work: Always check the statistics table first
Market Conditions Matter: Correlation can break during market stress
Use Stop Losses: Set stops at Z-Score ±3.5 or beyond
Position Sizing: Trade both legs with appropriate hedge ratios
Transaction Costs: Factor in brokerage and slippage for both stocks
Example Trade
Scenario: TCS vs INFOSYS
Correlation: 0.85 ✅
Z-Score: -2.3 (TCS is cheap vs INFY)
Action to be taken:
Buy 1lot of TCS Future
Sell 1lot of INFOSYS Future
Expected Outcome:
As Z-Score moves toward 0, TCS outperforms INFOSYS
Close both positions when Z-Score crosses 0
Profit from the convergence
Best Practices
Test Before Trading: Use paper trading first
Sector Focus: Choose pairs from the same industry
Monitor Statistics: Check correlation daily
Avoid News Events: Don't trade pairs during earnings/major news
Size Appropriately: Start small, scale with experience
Be Patient: Wait for high-quality setups (±2.0 or beyond)
What Makes This Indicator Unique?
Multi-timeframe Z-Score analysis: Three different perspectives
Statistical validation: Built-in correlation and cointegration tests
Visual risk zones: Easy-to-understand color-coded areas
Real-time statistics: Live pair quality monitoring
Beginner-friendly: Clear signals with educational zones
Technical Background
The indicator uses:
Engle-Granger Cointegration Test: Validates pair relationship
ADF (Augmented Dickey-Fuller) Test: Tests stationarity
Pearson Correlation: Measures linear relationship
Z-Score Normalization: Standardizes deviations
Log Returns: Handles price differences properly
Support & Community
For questions, suggestions, or to share your pair trading experiences:
Comment below the indicator
Share your successful pair combinations
Report any issues for quick fixes
Disclaimer
This indicator is for educational and informational purposes only. It does not constitute financial advice. Pair trading involves risk, including the risk of loss.
Always:
Do your own research
Understand the risks
Trade with money you can afford to lose
Consider consulting a financial advisor
📌 Quick Reference Card
Z-ScoreInterpretationAction-3.0 to -2.0A very cheap vs BStrong Buy A, Sell B-2.0 to -1.5A cheap vs BBuy A, Sell B-1.5 to +1.5Normal rangeHold/Wait+1.5 to +2.0A expensive vs BSell A, Buy B+2.0 to +3.0A very expensive vs BStrong Sell A, Buy B
Good Pair Statistics:
Correlation: > 0.70
ADF P-value: < 0.05
Cointegration: YES
Version: 1.0
Last Updated: 10th October 2025
Compatible: TradingView Pine Script v6
Happy Trading!
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.
Flux Power Dashboard (Updated and Renamed)Flux Power Dashboard is a compact market-state heads-up display for TradingView. It blends trend, momentum, and volume-flow into a single on-chart panel with color-coded cues and minimal lag. You get:
Clean visual trend via fast/slow MA with slope/debounce filters
MACD state and most recent cross (with “freshness” tint)
OBV confirmation and gating to reduce noise
Session awareness (Asia/London/New York + pre-sessions + overlap)
Optional HTF Regime row and regime gate to align signals to higher-timeframe bias
Context from VIX/VXN (volatility regime)
A single Flux Score (0–100) as a top-level read
It is deliberately “dashboard-first”: fast to read, consistent between symbols/timeframes, and designed to limit overtrading in chop.
What it can do (capabilities)
Signal gating: You can require multiple pillars to agree (Trend, MACD, OBV) before a “strong” bias is shown.
Debounced trend: Uses slope + confirmation bars to avoid flip-flopping.
Session presets: Auto-adjust the minimum confirmation bars by session (e.g., NY vs London vs Asia) to better match liquidity/volatility.
MACD presets: Quick switch between Scalp / Classic / Slow or roll your own custom speeds.
OBV confirmation: Volume flow must agree for trend/entries to “count” (optional).
HTF Regime awareness: Shows the higher-timeframe backdrop and (optionally) gates signals so you don’t fight the dominant trend.
Volatility context: VIX/VXN auto-colored cells based on your thresholds.
Top-center Session Title: Broadcasts the active session (or Overlap) with a matched background color.
Customizable UI: Column fonts, params font, transparency, dashboard corner, marker styles, colors, widths—tune it to your chart.
Practical use: Start with Flux Score + Summary for a snapshot, confirm with Trend & MACD, check OBV agreement (implicit in signal strength), glance at Regime to avoid counter-trend trades, and use Session + VIX/VXN for timing and risk context.
How it avoids common pitfalls
Repaint-aware: “Confirm on Close” can be enabled to read prior bar states, reducing intrabar noise.
Auto MA sanity: If fast ≥ slow length, it auto-swaps under the hood to keep calculations valid.
Debounce & confirm: Trend flips only after X bars satisfy conditions, cutting false flips in chop.
Freshness tint: New Cross/Signal rows tint slightly brighter for a few bars, so you can spot recency at a glance.
Every line of the dashboard (what it shows, how it’s colored)
Flux Score
What: Composite 0–100 built from three pillars: Trend (40%), MACD (30%), OBV (30%).
Read: ≥70 Bullish, ≤30 Bearish, else Neutral.
Use: Quick “state of play” gauge—stronger alignment pushes the score toward extremes.
Regime (optional row)
What: Higher-timeframe (your Regime TF) backdrop using the same MA pair with HTF slope/ATR buffer.
Values: Bull / Bear / Range.
Gate (optional): If Regime Gate is ON, Trend/Signals only go directional when HTF agrees.
Summary
What: One-line narrative combining the three pillars: MACD (up/down/flat), OBV (up/down/flat), Trend (up/down/flat).
Use: Human-readable cross-check; should rhyme with Flux Score.
Trend
What: Debounced MA relationship on the current chart.
Strict: needs fast > slow and slow rising (mirror for down) + slope debounce + confirmation bars.
Lenient: allows fast > slow or slow rising (mirror for down) with the same debounce/confirm.
Color: Green = UP, Red = DOWN, Gray = FLAT.
Use: Your structural bias on the trading timeframe.
MACD
What: Current MACD line vs signal, using your selected preset (or custom).
Values: Bull (line above), Bear (below), Flat (equal/indeterminate).
Color: Green/Red/Gray.
Cross
What: Most recent MACD cross and how many bars ago it occurred (e.g., “MACD XUP | 3 bars”).
Freshness: If the cross happened within Fresh Signal Tint bars, the cell brightens slightly.
Use: Timing helper for inflection points.
Signal
What: Latest directional shift (from short-bias to long-bias or vice versa) and age in bars.
Strength:
Strong = Trend + MACD + OBV all align
Weak = partial alignment (e.g., Trend + MACD, or Trend + OBV)
Color: Green for long bias, Red for short bias; fresh signals tint brighter.
Use: Action cue—treat Strong as higher quality; Weak as situational.
MA
What: Your slow MA type and length, plus slope direction (“up”/“down”).
Use: Context even when Trend is FLAT; slope often turns before full trend flips.
Session
What: Current market session by Eastern Time: New York / London / Asia, Pre- windows, Overlap, or Off-hours.
Logic: If ≥2 main sessions are active, shows Overlap (and grays the top title background).
Use: Timing and expectations for liquidity/volatility; also drives session-based confirmation presets if enabled.
VIX
What: Real-time CBOE:VIX on your chosen TF.
Auto-color (if on):
Calm (< Calm) → Green
Watch (< Watch) → Yellow
Elevated (< Elevated) → Orange
Very High (≥ Elevated) → Red
Use: Equity market–wide risk mood; higher = bigger moves, lower = quieter.
VXN
What: CBOE:VXN (Nasdaq volatility index) on your chosen TF.
Auto-color thresholds like VIX.
Use: Tech-heavy risk mood; helpful for growth/QQQ/NDX names.
Footer (params row, bottom-right)
What: Key live settings so you always know the context:
P= Trend Confirmation Bars
O= OBV Confirmation Bars
Strict/Lenient (trend mode)
MACD preset (or “Custom”)
swap if MA lengths were auto-swapped for validity
Regime gate if enabled
Candles for clarity
Use: Quick integrity check when comparing charts/screenshots or changing presets.
Recommended workflow
Start at Flux Score & Summary → snapshot of alignment.
Check Trend (color) and MACD (Bull/Bear).
Look at Signal (Strong vs Weak, and age).
Glance at Regime (and use gate if you’re trend-following).
Use Session + VIX/VXN to adjust expectations (breakout vs mean-revert, risk sizing, patience).
Keep Confirm on Close ON when you want stability; turn it OFF for faster (but noisier) reads.
Notes & limitations
Not advice: This is an informational tool; always combine with your own risk rules.
Repaint vs responsiveness: With “Confirm on Close” OFF you’ll see faster state changes but may get more churn intrabar.
Presets matter: Scalp MACD reacts fastest; Slow reduces whipsaw. Choose for your timeframe.
Session windows depend on the strings you set; adjust if your broker’s feed or DST handling needs tweaks.