頻帶和通道
Swing Points - Liquidity DR📌 Description
This indicator highlights swing points and liquidity levels with clean visuals and flexible options. It automatically detects significant highs and lows, then plots liquidity zones using customizable lines, boxes, and labels. Volume and Open Interest Δ (OI Δ) filters are integrated to validate the strength of each level.
⚙️ Features
Liquidity boxes plotted at swing highs and lows with customizable colors and styles.
Toggle visibility for lines, boxes, and labels to keep charts clean.
Filter swing levels using Volume thresholds and Open Interest Δ polarity (positive/negative).
Multi-exchange OI data support: Binance, BitMEX, Kraken.
Extend until fill or auto-remove levels once price interacts with them.
Dark/Light theme support with full text/label styling controls.
Lookback filter (days) to limit displayed levels for clarity.
🎯 Use Cases
Identify liquidity pools where price is likely to react.
Track smart money behavior around highs and lows.
Combine volume + OI confirmation to focus only on high-value zones.
DBG X WOLONG📊 USER GUIDE – DBG X WOLONG ALGORITHM
🎯 OVERVIEW
The DBG X WOLONG Future Algorithm is a Pine Script v5 that integrates multiple advanced technical indicators, enabling traders to analyze markets and make precise trading decisions.
⚙️ MAIN SETTINGS
🔹 Sensitivity
Value: 1–20 (Default: 6)
Function: Adjusts the sensitivity of the SuperTrend signal
Guidelines:
Low value (1–5): Fewer signals, higher accuracy
High value (15–20): More signals, but with possible noise
🎨 DISPLAY SETTINGS
🔹 Candle Colors
Version 1: Based on MACD histogram
Version 2: Based on SuperTrend
🔹 Color Themes
Theme 1: Traditional Green/Red
Theme 2: Gold/Purple
Theme 3: Blue/Orange
No Fill: No background color displayed
📊 TRADING SIGNALS
🔹 Buy/Sell Signals
BUY 🚀 appears when:
SuperTrend shifts from bearish to bullish
Closing price > SMA 13
Braid Filter confirms
SELL appears when:
SuperTrend shifts from bullish to bearish
Closing price < SMA 13
Braid Filter confirms
🔹 Reversal Signals
▲ (Up Arrow): Buy signal when RSI crosses above 30
▼ (Down Arrow): Sell signal when RSI crosses below 70
🔹 Pullback Signals
▲ Purple: Pullback in bullish trend
▼ Purple: Pullback in bearish trend
🎯 TAKE PROFIT & STOP LOSS
🔹 TP Modes
Version 1: TP based on pivot points
Version 2: TP based on regression line
Close Price: TP at candle close
🔹 TP/SL Settings
TP Ratio: 2.0 (Default)
TP Length: 150 (Default)
ATR SL Length: 10
ATR SL Risk: 1.9
🔹 Labels Displayed
ENTRY: Entry point
STOP LOSS: Stop loss point
TP 1/2/3: 3 take profit levels
☁️ MOVING AVERAGE CLOUD
🔹 Supported MA Types
SMA – Simple Moving Average
EMA – Exponential Moving Average
WMA – Weighted Moving Average
HMA – Hull Moving Average
ALMA – Arnaud Legoux Moving Average
McGinley – McGinley Dynamic
FRAMA – Fractal Adaptive Moving Average
🔹 Cloud Cycles
Default: 2, 6, 11, 18, 21, 24, 28, 34
Customizable: All 8 cycles
🔹 Ribbon Cycles
Default: 6, 13, 20, 28, 36, 45, 55, 444
Customizable: All 8 cycles
🔧 BRAID FILTER
🔹 Function
Filters out noise signals
Confirms strong trends
🔹 Settings
MA Filter: McGinley (Recommended)
Filter Strength: 80% (Default)
📈 TRENDS & INDICATORS
🔹 SuperTrend
Main trend indicator
Generates primary buy/sell signals
🔹 Advanced Ichimoku
Tenkan-Sen: Blue line
Kijun-Sen: Orange line
Senkou Span A/B: Ichimoku cloud
🔹 Trend Tracking
Based on EMA 10 vs EMA 20
Candle colors follow trend direction
🔹 Trend Catcher
Range Filter with multiple options
Adjustable sensitivity
📊 MULTI-TIMEFRAME TREND PANEL
🔹 Displayed Timeframes
1m, 3m, 5m
15m, 30m, 1H
2H, 4H, 8H, Daily
🔹 Displayed Info
Current Position: Bullish/Bearish
Trend: Per timeframe
Volume: Current trading volume
🔹 Panel Positioning
9 selectable positions
Sizes: Large, Normal, Small, Extra Small
🚀 TRADE EXECUTION
📈 LONG ENTRY
✅ Entry Conditions
BUY 🚀 signal appears
SuperTrend turns from red to green
Price > SMA 13
Braid Filter confirms (green)
Trend Panel shows "Bullish" across multiple TFs
📊 Additional Confirmations
MACD Histogram > 0 and rising
RSI crosses above 30 (if reversal signal)
EMA Pullback shows ▲ purple
🎯 Trade Management
Entry: According to ENTRY label
Stop Loss: According to STOP LOSS label
Take Profit: TP1 → TP2 → TP3
📉 SHORT ENTRY
✅ Entry Conditions
SELL signal appears
SuperTrend turns from green to red
Price < SMA 13
Braid Filter confirms (red)
Trend Panel shows "Bearish" across multiple TFs
📊 Additional Confirmations
MACD Histogram < 0 and declining
RSI crosses below 70 (if reversal signal)
EMA Pullback shows ▼ purple
🎯 Trade Management
Entry: According to ENTRY label
Stop Loss: According to STOP LOSS label
Take Profit: TP1 → TP2 → TP3
🎛️ RECOMMENDED SETTINGS
👥 For Beginners
Sensitivity: 6
Candle Colors: Version 1
Buy/Sell Signals: ON
Reversal Signals: OFF
Trend Panel: ON
🏆 For Experienced Traders
Sensitivity: 4–8 (depending on market)
Reversal Signals: ON
Pullback: ON
All indicators: ON
ATR SL Risk: 1.5–2.0
⚡ For Scalping
Sensitivity: 8–12
Timeframes: 1m, 3m, 5m
Use only: SuperTrend + Braid Filter
Quick TP: Only TP1
📊 For Swing Trading
Sensitivity: 4–6
Timeframes: 1H, 4H, 1D
Use all: Full signals
TP: All 3 levels (TP1, TP2, TP3)
⚠️ IMPORTANT NOTES
🔴 Avoid Trading When
Signals conflict across timeframes
Market is strongly ranging/sideways
Abnormally low volume
Price is at major support/resistance zones
🟢 Prefer Trading When
At least 2–3 confirmations align
Clear trend across multiple timeframes
Strong volume surge
Breakout from consolidation zone
💡 Usage Tips
Always wait for confirmation: Never enter with just 1 signal
Risk management: Place SL according to STOP LOSS label
Follow trend panel: Prioritize overall trend
Use multiple timeframes: Analyze top-down
Backtest first: Test strategy on historical data
🛠️ TROUBLESHOOTING
❓ No signals appear
Check if inputs are enabled
Adjust sensitivity
Try switching timeframe
❓ Too many false signals
Lower sensitivity
Increase Braid Filter strength
Trade only with main trend
❓ Trend panel not showing
Enable "Display Dashboard"
Select proper panel position
Adjust panel size
📞 SUPPORT
If you encounter issues using this script, please:
Carefully read this guide
Practice on a demo account
Backtest thoroughly before live trading
📈 Wishing you successful trading! 🚀
Trend + RSI + Volume//@version=5
strategy("SPY Trend RSI Volume Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// === Inputs ===
emaFastLen = input.int(20, title="Fast EMA")
emaSlowLen = input.int(50, title="Slow EMA")
rsiLen = input.int(14, title="RSI Period")
rsiLongThresh = input.int(55, title="RSI Threshold for Long")
rsiShortThresh = input.int(45, title="RSI Threshold for Short")
volumeMultiplier = input.float(1.5, title="Volume Multiplier")
atrLen = input.int(14, title="ATR Length")
riskReward = input.float(2.0, title="Risk-Reward Ratio")
atrMult = input.float(1.5, title="ATR Multiplier")
// === Indicators ===
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
rsi = ta.rsi(close, rsiLen)
avgVolume = ta.sma(volume, 20)
atr = ta.atr(atrLen)
// === Conditions ===
// Trend
isBullish = emaFast > emaSlow
isBearish = emaFast < emaSlow
// Volume
volSpike = volume > avgVolume * volumeMultiplier
// Entry conditions
longCondition = isBullish and rsi > rsiLongThresh and volSpike and close > emaFast
shortCondition = isBearish and rsi < rsiShortThresh and volSpike and close < emaFast
// === Entries ===
if (longCondition)
stopLoss = close - atr * atrMult
takeProfit = close + (close - stopLoss) * riskReward
strategy.entry("Long", strategy.long)
strategy.exit("TP/SL Long", from_entry="Long", stop=stopLoss, limit=takeProfit)
if (shortCondition)
stopLoss = close + atr * atrMult
takeProfit = close - (stopLoss - close) * riskReward
strategy.entry("Short", strategy.short)
strategy.exit("TP/SL Short", from_entry="Short", stop=stopLoss, limit=takeProfit)
// === Plotting ===
plot(emaFast, title="EMA 20", color=color.orange)
plot(emaSlow, title="EMA 50", color=color.blue)
BB Crosses Optimized - [JTCAPITAL]BB Crosses Optimized is a modified way to use Bollinger Bands for Trend-Following
The indicator works by calculating in the following steps:
1. The source gets smoothed out using a moving average
2. Calculating the Bollinger Bands using the SMA of the smoothed source and the standard deviation of the smoothed source.
3. Trigger a signal based on current price and the buy/sell conditions.
--Buy and sell conditions--
-The buy and sell conditions are defined by the price going above/below the first standard deviation. When this goes on the opposite direction of the current trend, the trend changes. If this goes in the same direction of the current trend, the line follows the price by moving up with the standard deviation.
-When using the ATR filter the ATR gets subtracted from the lows or added onto the highs to eliminate false signals in choppy markets.
--Features and Parameters--
-Allows the usage of different sources
-Allows the usage of different moving average types
-Allows the changing of the length of the ATR
-Allows the changing of the length of the bollinger bands period
-Allows the changing of the standard deviation used from the bollinger bands
-Allows the changing of the length for smoothing out the price data
--Details--
This script is using multiple moving averages, sometimes even stacked upon eachother. And it also uses the moving average of the raw data on a short period to calculate the standard deviations. This in combination with the ATR filter is meant to eliminate as much false signals as I could. Without making all the entries and exits extremely delayed.
Be aware that disabling the ATR will allow for faster entries and exits but also allow for more false signals. It is recommended to change the parameters to fit your liking and to adjust to the timeframe you are working on.
Enjoy!
Scalping, Swing Pro: Urban Towers + Bollinger(0.5)+ WMA by KidevThis indicator combines narrow Bollinger Bands (σ = 0.5) with a Weighted Moving Average (WMA-96) to provide traders with a reliable framework for identifying both short-term scalps and medium-term swing setups.
Bollinger Bands (0.5σ):
Traditional Bollinger Bands at 2σ cover ~95% of price movement, while 0.5σ bands narrow the focus to ~50% of price activity. This tighter structure makes them ideal for detecting volatility contractions, consolidations, and early breakout signals.
WMA-96 as Trend Reference:
The 96-period WMA acts as a slower, more stable directional guide. Unlike shorter WMAs, this longer setting filters noise and serves as a reference line for the dominant trend. Traders can use it as an anchor for intraday or swing positions.
Scalping & Swing Benefits:
Price holding above the WMA-96 while staying near the upper 0.5σ band often signals strength.
Contractions (squeezes) in the 0.5σ band followed by expansion frequently mark breakout zones.
Pullbacks toward the WMA-96 combined with band signals can act as re-entry or risk-defined trade areas.
This script provides a balanced view of momentum and stability — the 0.5σ bands reveal short-term volatility shifts, while the WMA-96 grounds the trader in the prevailing trend.
Session Open Candle MarkerThe "Session Open Candle Marker" is a Pine Script indicator designed for forex and futures traders using Smart Money Concepts (SMC) and RP Profits-inspired strategies. It marks the 15-minute opening range candles for the Asia, London, and NY sessions, where institutional "big players" often gather liquidity. Each session’s range is drawn as a rectangle with a customizable midpoint line, ideal for spotting breakouts, retests, and liquidity sweeps.
Features
Session Open Ranges: Plots rectangles for the 15m open candles of Asia (03:00 EEST), London (10:00 EEST), and NY (15:00 EEST), corresponding to 01:00, 08:00, and 13:00 GMT+1.
Customizable Visualization:
Toggle each session (Asia, London, NY) on/off.
Independent high/low label toggles for each session.
Adjustable rectangle color, midpoint line color, style (solid/dashed/dotted), and width.
Customizable rectangle duration (default: 96 bars, ~24 hours on 15m).
Timezone Flexibility: Default times are set for EEST (UTC+3). Adjust session inputs for your chart’s timezone (e.g., GMT+1: Asia 01:00, London 08:00, NY 13:00; UTC: Asia 00:00, London 07:00, NY 12:00).
Clean Design: Rectangles and labels update dynamically, with proper cleanup to avoid clutter.
Usage:
Setup: Add to a 15m chart (e.g., EURUSD, ES1!). Check your chart’s timezone (Chart Settings > Symbol > Timezone) and adjust session times if needed.
Settings:
Toggle sessions and labels to focus on desired ranges (e.g., London and NY for high volatility).
Customize colors, midpoint line style/width, and rectangle duration.
Trading:
Breakouts/Retests: Trade breakouts above/below the rectangle high/low, with retests back to the range or midpoint (aligned with RP Profits scalping).
Liquidity Sweeps: Watch for price sweeping session highs/lows, reversing for entries (SMC concept).
Bitcoin: The Golden Ratio Multiplier advanced with Z-scoreWhat this does: We took the classic Golden Ratio / 350DMA idea and ported it to TradingView, then standardized it with a single Z-score. The three core bands are the 350DMA multiples (1.0×, 1.6×, 2.0×). We define their Z values and add two outer bands to complete a 5-level scale:
0.625× 350DMA → Z = +2
1.0× 350DMA → Z = +1
1.6× 350DMA → Z = 0 (golden-ratio mid)
2.0× 350DMA → Z = −1
2.5× 350DMA → Z = −2
How the Z-score is computed:
We take the **price-to-350DMA ratio**, locate it **between the two nearest bands**, and then measure its **position on a log scale** (because the bands are multiplicative). That position is **linearly mapped** so each band-to-band step equals **1 Z unit**: 0.625×→1.0×→1.6×→2.0×→2.5× becomes **+2 → +1 → 0 → −1 → −2**. If price sits **outside** the outer bands, the Z-score simply **extends past ±2** (optionally clamped in settings). Positive Z means price is **below** the 1.6× mid; negative Z means it’s **above** the 1.6× mid.
Mean Reversion Bands & SL Levelsfor identifying stop loss levels and in 4h you can identify the deviation from ema 34 line
VXN Darvas BoxThis indicator is based on other open source scripts. It's designed for Nasdaq futures (NQ or MNQ). It is based on the Darvas Box concept, plotting boxes to identify price breakouts, with buy/sell signals filtered by the VXN index direction to align with bullish or bearish trends.
Previous Day High/Low (with Right-Edge Labels) Tracks previous days High and Low; Helps with SPX or other ETF's
NQ–2Y CorrelationThis indicator tracks how NQ (Nasdaq futures) moves compared to the US 2-Year yield (US02Y). Most of the time, they go in opposite directions. This tool highlights when that relationship breaks down or moves too far from normal. This is an important fundamental indicator of overbought and oversold conditions in the market.
Features:
Stretch Measure (Z-Score): Shows when NQ is moving much more than you’d expect relative to the 2Y. Extreme readings (above the upper red band or below the lower blue band) often indicate overbought (red) or oversold (blue) conditions.
Correlation Tracking: Monitors whether NQ and 2Y are moving together or apart. Very useful to know when they are moving together, because one of those moves is false and represents an opportunity more often than not if combined with logical support or resistance.
Signal Dots: Green dots = both moving strongly in the same direction (rare). Red dots = strong move in opposite directions.
How I like to use it:
Watch the Z-Score bands (red/blue) for signs on the H1 or H4 that the move is really stretched. I use this for reversals in the direction of the trend.
Use the green/red dots to catch unusual synchronized or opposing moves between equities and yields.You can use this with your favourite equities that make up the nasdaq 100 too.
Staggered Exponential PullbacksIndicator Description: Staggered Exponential Pullbacks (Final)
Core Concept
This indicator is designed to dynamically track and visualize price pullbacks from a recent high. It serves as an intelligent alert system and a tool for visualizing potential support levels that follow a predefined, non-linear logic.
Instead of a fixed percentage interval, the indicator calculates the levels based on a fixed, exponentially increasing sequence of percentages. The distance between the levels increases as the price falls further. This models a strategy where larger price movements are tolerated as a pullback deepens before the next signal level is reached. The basis for this calculation is always the highest close of the last x candles.
Key Features
This indicator goes far beyond a simple calculation, offering a range of intelligent features for professional use:
Cascading, Fixed Levels: The levels are based on a fixed sequence of percentage distances (3.0%, 3.6%, 4.3%, etc.), where each new level is calculated from the previous level.
Persistent Support Levels ("Floors"): Once an alert level is breached, it transforms into a fixed support line ("floor"). This line will never move down, even if the market high subsequently drops.
Automatic Upward Adjustment: Established floors are automatically pulled upwards when the market shows new strength and makes higher highs. A once-reached -3% floor will therefore rise with the market.
Intelligent, Self-Cleaning Reset Logic: The indicator recognizes when a pullback sequence has ended and a new one has begun. "Ghost lines" from old, irrelevant price movements are automatically removed from the chart to ensure maximum clarity.
Cascade-Proof Alerts: Even during extremely fast sell-offs that break through multiple levels in a single candle, the indicator correctly captures every single level breach.
Customizable Visualization: All key parameters, such as the lookback period and the colors of the lines, can be easily adjusted in the settings.
Visual Elements on the Chart
The Orange Line (Highest Close): This is the reference line. It always shows the highest closing price within the defined lookback period and has a step-line shape.
The 'Floor' Lines (Default: Yellow): These are solid lines that indicate which percentage levels have already been breached in the current sequence. They function as established support levels.
The 'Next Due' Line (Default: Purple): This is a step-line that displays the next expected alert level. It moves dynamically with the calculation. As soon as the price crosses this line, an alert is triggered, and it transforms into a yellow "Floor" line.
Settings (Inputs)
Number of Candles (Lookback): Defines how many past candles are used to determine the highest closing price.
Displayed Alert Levels (Max 10): Determines the maximum number of levels the indicator will calculate and display.
Color of Floors: Allows you to freely choose the color for the solid, established support lines.
Color of Next Due Line: Allows you to freely choose the color for the next, untriggered alert line.
Setting Up Alerts (Important!)
Since the indicator uses dynamic alert messages, the alert must be set up as follows:
Add the indicator to the chart.
Click the clock icon ("Alert") in the top toolbar.
In the "Condition" field, select the name of this indicator: Staggered Exponential Pullbacks.
In the second dropdown menu, you must select the option "Any alert() function call".
Message: The message box can be left empty. The indicator automatically generates a detailed message (e.g., "Price Alert: Level 2 (3.6%) reached!").
Click "Create".
You only need one single alert to cover all 10 levels.
Important Disclaimer: Not Financial Advice
This indicator is purely a technical analysis tool for visualizing price movements. The displayed lines and triggered alerts do not constitute buy or sell recommendations and are not a form of financial or investment advice. They serve for informational and analytical purposes only.
Trading decisions based on the information from this indicator are made solely at your own risk and responsibility. The author and developer of this script assume no liability for any trading losses. Always conduct your own comprehensive analysis and, if necessary, consult a qualified financial advisor before making any trading decisions.
RSI with Background & Out-of-Range Alert
RSI with Out-of-Range Alert
This indicator enhances the classic Relative Strength Index (RSI) by adding a visual mid-zone highlight and a simple, effective alert system:
Key Features
• RSI Calculation: Standard RSI with customizable length and source.
• range between oversold (30) and overbought (70). This makes it easy to visually separate trend-neutral conditions from potential reversal zones.
• Clear Overbought/Oversold Levels: Horizontal lines at 70 and 30 to mark key thresholds.
• Out-of-Range Alert: Built-in alert condition triggers when RSI moves above 70 or below 30 — a single alert for both extremes.
Why Use It?
This indicator helps traders:
• Quickly identify when the market is in a neutral zone versus extreme conditions.
• Avoid missing potential breakout/reversal setups by receiving an automatic alert when RSI exits the normal range.
• Keep charts clean and focused by shading only the mid-zone, leaving extreme areas visually clear.
Best Use Cases
• Works on any market and timeframe.
• Ideal for traders who combine RSI extremes with price action, trend filters, or divergence strategies.
• Perfect for those who want simple visual clarity and minimal distractions.
Estrategia REGLA DE OROit is an indicator that allows you to design the nearest support and resistance + buy and sell alert.
Crypto Breakout Buy/Sell Sequence
⚙️ Components & Sequence Multiple Timeframe (What It Does)
1. Bollinger Bands – Form the foundation by measuring volatility and creating the dynamic range where squeezes and breakouts occur.
2. Squeeze Dots – Show when price compresses inside the bands, signaling reduced volatility before expansion.
3. Breakout Event (Brk Dot) – Fires when price expands beyond the squeeze zone, confirming volatility expansion. (This paints Intra, before candle close)
4. Buy Signal – Confirms entry after a breakout is validated. (This paints at candle close)
5. Pump Signal – Flags sudden surges that extend sharply from the bands, often linked to strong inflows.
6. Momentum Stream – Tracks the strength of movement following the breakout, from continuation (🟢) to slowing (🟡) to exhaustion (🔴). (Resets at Pump Signal)
7. Overbought Indicator – Confirms when momentum has reached overheated conditions, often aligning with band extremes.
8. Sell Signal – Prints when exhaustion/reversal conditions are met, closing the trade cycle.
The Crypto Breakout Buy/Sell Sequence is a no-repaint event indicator that maps a full trade cycle using Bollinger-band-based volatility states: Bollinger Bands → Squeeze → Breakout → Buy → Pump → Momentum → Top Test → Overbought → Sell. Each stage is rule-based and designed to be read on standard candlesticks.
How It Works (System Logic)
Volatility framework: Bollinger Bands define dynamic range and compression/expansion.
Initiation: Squeeze → Breakout confirms expansion; Buy validates participation after expansion begins.
Management: Pump highlights unusual acceleration; Momentum stream tracks continuation → slowing → exhaustion.
Exhaustion/Exit: Top Testing + Overbought build the exhaustion case; Sell marks the sequence end.
How To Use (Quick Guide)
Wait for Squeeze → Breakout → Buy to establish a structured start.
Manage with Momentum:
🟢 continuation, 🟡 slowing, 🔴 exhaustion pressure.
Monitor extremes: Top Testing and/or Overbought = tighten risk.
Exit on Sell or on your risk rules when exhaustion builds.
Limitations & Good Practice
Signals reflect price/volatility behavior, not certainty.
Strong trends can remain extended; Overbought/Top Test ≠ instant reversal.
Always confirm with your own risk rules, position sizing, and market context.
Initial public release: integrated Squeeze/Breakout/Buy → Momentum → Exhaustion → Sell cycle; improved label clarity; cleaned defaults.
Disclaimer
For educational purposes only. Not financial advice. Past performance does not guarantee future results. Test before live use.
Thank You
Adaptive Rolling Quantile Bands [CHE] Adaptive Rolling Quantile Bands
Part 1 — Mathematics and Algorithmic Design
Purpose. The indicator estimates distribution‐aware price levels from a rolling window and turns them into dynamic “buy” and “sell” bands. It can work on raw price or on *residuals* around a baseline to better isolate deviations from trend. Optionally, the percentile parameter $q$ adapts to volatility via ATR so the bands widen in turbulent regimes and tighten in calm ones. A compact, latched state machine converts these statistical levels into high-quality discretionary signals.
Data pipeline.
1. Choose a source (default `close`; MTF optional via `request.security`).
2. Optionally compute a baseline (`SMA` or `EMA`) of length $L$.
3. Build the *working series*: raw price if residual mode is off; otherwise price minus baseline (if a baseline exists).
4. Maintain a FIFO buffer of the last $N$ values (window length). All quantiles are computed on this buffer.
5. Map the resulting levels back to price space if residual mode is on (i.e., add back the baseline).
6. Smooth levels with a short EMA for readability.
Rolling quantiles.
Given the buffer $X_{t-N+1..t}$ and a percentile $q\in $, the indicator sorts a copy of the buffer ascending and linearly interpolates between adjacent ranks to estimate:
* Buy band $\approx Q(q)$
* Sell band $\approx Q(1-q)$
* Median $Q(0.5)$, plus optional deciles $Q(0.10)$ and $Q(0.90)$
Quantiles are robust to outliers relative to means. The estimator uses only data up to the current bar’s value in the buffer; there is no look-ahead.
Residual transform (optional).
In residual mode, quantiles are computed on $X^{res}_t = \text{price}_t - \text{baseline}_t$. This centers the distribution and often yields more stationary tails. After computing $Q(\cdot)$ on residuals, levels are transformed back to price space by adding the baseline. If `Baseline = None`, residual mode simply falls back to raw price.
Volatility-adaptive percentile.
Let $\text{ATR}_{14}(t)$ be current ATR and $\overline{\text{ATR}}_{100}(t)$ its long SMA. Define a volatility ratio $r = \text{ATR}_{14}/\overline{\text{ATR}}_{100}$. The effective quantile is:
Smoothing.
Each level is optionally smoothed by an EMA of length $k$ for cleaner visuals. This smoothing does not change the underlying quantile logic; it only stabilizes plots and signals.
Latched state machines.
Two three-step processes convert levels into “latched” signals that only fire after confirmation and then reset:
* BUY latch:
(1) HLC3 crosses above the median →
(2) the median is rising →
(3) HLC3 prints above the upper (orange) band → BUY latched.
* SELL latch:
(1) HLC3 crosses below the median →
(2) the median is falling →
(3) HLC3 prints below the lower (teal) band → SELL latched.
Labels are drawn on the latch bar, with a FIFO cap to limit clutter. Alerts are available for both the simple band interactions and the latched events. Use “Once per bar close” to avoid intrabar churn.
MTF behavior and repainting.
MTF sourcing uses `lookahead_off`. Quantiles and baselines are computed from completed data only; however, any *intrabar* cross conditions naturally stabilize at close. As with all real-time indicators, values can update during a live bar; prefer bar-close alerts for reliability.
Complexity and parameters.
Each bar sorts a copy of the $N$-length window (practical $N$ values keep this inexpensive). Typical choices: $N=50$–$100$, $q_0=0.15$–$0.25$, $k=2$–$5$, baseline length $L=20$ (if used), adaptation strength $s=0.2$–$0.7$.
Part 2 — Practical Use for Discretionary/Active Traders
What the bands mean in practice.
The teal “buy” band marks the lower tail of the recent distribution; the orange “sell” band marks the upper tail. The median is your dynamic equilibrium. In residual mode, these tails are deviations around trend; in raw mode they are absolute price percentiles. When ATR adaptation is on, tails breathe with regime shifts.
Two core playbooks.
1. Mean-reversion around a stable median.
* Context: The median is flat or gently sloped; band width is relatively tight; instrument is ranging.
* Entry (long): Look for price to probe or close below the buy band and then reclaim it, especially after HLC3 recrosses the median and the median turns up.
* Stops: Place beyond the most recent swing low or $1.0–1.5\times$ ATR(14) below entry.
* Targets: First scale at the median; optional second scale near the opposite band. Trail with the median or an ATR stop.
* Symmetry: Mirror the rules for shorts near the sell band when the median is flat to down.
2. Continuation with latched confirmations.
* Context: A developing trend where you want fewer but cleaner signals.
* Entry (long): Take the latched BUY (3-step confirmation) on close, or on the next bar if you require bar-close validation.
* Invalidation: A close back below the median (or below the lower band in strong trends) negates momentum.
* Exits: Trail under the median for conservative exits or under the teal band for trend-following exits. Consider scaling at structure (prior swing highs) or at a fixed $R$ multiple.
Parameter guidance by timeframe.
* Scalping / LTF (1–5m): $N=30$–$60$, $q_0=0.20$, $k=2$–3, residual mode on, baseline EMA $L=20$, adaptation $s=0.5$–0.7 to handle micro-vol spikes. Expect more signals; rely on latched logic to filter noise.
* Intraday swing (15–60m): $N=60$–$100$, $q_0=0.15$–0.20, $k=3$–4. Residual mode helps but is optional if the instrument trends cleanly. $s=0.3$–0.6.
* Swing / HTF (4H–D): $N=80$–$150$, $q_0=0.10$–0.18, $k=3$–5. Consider `SMA` baseline for smoother residuals and moderate adaptation $s=0.2$–0.4.
Baseline choice.
Use EMA for responsiveness (fast trend shifts) and SMA for stability (smoother residuals). Turning residual mode on is advantageous when price exhibits persistent drift; turning it off is useful when you explicitly want absolute bands.
How to time entries.
Prefer bar-close validation for both band recaptures and latched signals. If you must act intrabar, accept that crosses can “un-cross” before close; compensate with tighter stops or reduced size.
Risk management.
Position size to a fixed fractional risk per trade (e.g., 0.5–1.0% of equity). Define invalidation using structure (swing points) plus ATR. Avoid chasing when distance to the opposite band is small; reward-to-risk degrades rapidly once you are deep inside the distribution.
Combos and filters.
* Pair with a higher-timeframe median slope as a regime filter (trade only in the direction of the HTF median).
* Use band width relative to ATR as a range/trend gauge: unusually narrow bands suggest compression (mean-reversion bias); expanding bands suggest breakout potential (favor latched continuation).
* Volume or session filters (e.g., avoid illiquid hours) can materially improve execution.
Alerts for discretion.
Enable “Cross above Buy Level” / “Cross below Sell Level” for early notices and “Latched BUY/SELL” for conviction entries. Set alerts to “Once per bar close” to avoid noise.
Common pitfalls.
Do not interpret band touches as automatic signals; context matters. A strong trend will often ride the far band (“band walking”) and punish counter-trend fades—use the median slope and latched logic to separate trend from range. Do not oversmooth levels; you will lag breaks. Do not set $q$ too small or too large; extremes reduce statistical meaning and practical distance for stops.
A concise checklist.
1. Is the median flat (range) or sloped (trend)?
2. Is band width expanding or contracting vs ATR?
3. Are we near the tail level aligned with the intended trade?
4. For continuation: did the 3 steps for a latched signal complete?
5. Do stops and targets produce acceptable $R$ (≥1.5–2.0)?
6. Are you trading during liquid hours for the instrument?
Summary. ARQB provides statistically grounded, regime-aware bands and a disciplined, latched confirmation engine. Use the bands as objective context, the median as your equilibrium line, ATR adaptation to stay calibrated across regimes, and the latched logic to time higher-quality discretionary entries.
Disclaimer
No indicator guarantees profits. Adaptive Rolling Quantile Bands is a decision aid; always combine with solid risk management and your own judgment. Backtest, forward test, and size responsibly.
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Enhance your trading precision and confidence 🚀
Best regards
Chervolino
Anchored Grids ft. VolumeINTRO
The 'Volume Profile' is a great tool, isn’t it? It shows us where volume has accumulated on the chart and helps guide trading decisions. The only catch is that we can’t really choose the levels—it’s all based on where volume happens to cluster. But what if we reversed the logic and measured the volume at the levels we define? That’s exactly what this script does, giving you a fresh way to spot support and resistance :)
OVERVIEW
'Anchored Grids ft. Volume' is a sophisticated technical analysis tool that combines price grid analysis with volume accumulation metrics. This indicator dynamically calculates and displays custom support and resistance levels based on a user-defined timeframe, while simultaneously tracking and visualizing volume accumulation at each specific price level. Unlike traditional volume profile indicators that use complex statistical clustering, this tool provides straightforward volume measurement at predetermined technical levels. It answers a critical question: "How much trading activity occurred near the key price levels I care about?".
HOW DOES THIS INDICATOR WORK?
This indicator builds a customizable grid system anchored to the opening price of any user-selected timeframe (hourly, daily, weekly, etc.). From that anchor point, it continuously tracks the highest high and lowest low, then calculates equidistant grid levels within that range. Two calculation modes are available—Arithmetic and Geometric—allowing flexibility in how the levels are distributed.
Once the grid is established, a volume accumulation engine comes into play. For each price bar, the script checks whether the bar’s range intersects with any level’s tolerance zone (default 0.01%). If a touch is detected, that bar’s volume is added to the corresponding level. Over time, this process builds a clear picture of where significant trading activity has clustered.
The visualization system highlights these dynamics by applying a color gradient based on volume intensity and adjusting line thickness proportional to accumulated volume. Each level is also labeled with four key data points:
The grid number (in square brackets)
The price of the level
The percentage distance between the level and the opening price of the selected timeframe
The total volume accumulated within the level’s tolerance range
PARAMETERS
Timeframe: Defines the anchor period for grid calculation. Then, the indicator automatically determines the open, high, and low prices.
Mode: This option determines how the distance between levels is calculated: Arithmetic (linear) means equal price spacing between levels, while Geometric (logarithmic) means equal percentage spacing between levels.
Grids: It's the number of levels between high and low.
Color: Base color for grid lines and labels. When volume data is displayed, lower values are darkened by 50%.
Show Volume Accumulation: When this parameter is activated, the volume calculation is enabled.
Tolerance : The Tolerance parameter (default range: 0.01%) defines the price range around each grid level where volume accumulation is registered. It acts as a sensitivity control that determines how close price must be to a level to count trading volume toward that level's accumulation.
ORIGINALITY
It’s possible to find comprehensive grid-drawing tools among community indicators, but I haven’t come across an example that combines this concept with volume data. More importantly, I wanted to demonstrate how volume accumulation can be generated for any data modeled as an array on the chart by developers.
SUMMARY
In conclusion, the selected timeframe and the number of grids are only used as a reference to determine where the levels are drawn. The true value of this indicator lies in its ability to calculate volume accumulation directly from the chart’s own candles, showing how much trading activity occurred around each level. The result is a hybrid framework that merges structural price analysis with volume distribution, offering traders deeper insights into where markets are likely to react.
NOTE
While powerful, this tool should be used as part of a comprehensive trading strategy rather than as a standalone system. Always combine with risk management principles and market context awareness. I hope it helps everyone. Trade as safely as possible. Best of luck!
S&R ZonesThis indicator automatically detects swing highs and swing lows on the chart using a 3-bar swing structure. Once a swing point is confirmed, it evaluates the price movement and body size of subsequent candles. If the movement meets a volume-based range condition (2.5× the average body size of the last 5 candles), the indicator creates a zone around that swing.
Swing High Zones: Drawn from the highest price of the swing cluster down to its midpoint.
Swing Low Zones: Drawn from the lowest price of the swing cluster up to its midpoint.
These zones act as dynamic support and resistance levels and remain on the chart until they are either:
Broken (price closes beyond the zone), or
Expired (more than 200 bars old).
Zones are color-coded for clarity:
🔴 Red shaded areas = Swing High resistance zones.
🟢 Green shaded areas = Swing Low support zones.
This makes the indicator useful for identifying high-probability reversal areas, liquidity zones, and supply/demand imbalances that persist until invalidated.
MULTI-STRATEGY SYSTEMThis trading system combines three different strategies to help you trade better.
The first strategy follows trends using a 50-period EMA and confirms signals with volume spikes and RSI momentum.
The second strategy catches trends early by watching for EMA 9 and 21 crossovers to get in at the beginning of moves.
The third strategy uses multiple technical indicators like RSI, MACD, and EMAs to find precise entry points.
Each strategy shows triangle signals on your chart, green for long trades and red for short trades. The system also displays colored zones between the moving averages to visualize market conditions.
You can use just one strategy or combine all three for more trading opportunities. This works on any timeframe whether you're day trading, swing trading, or position trading.