HTFStructCore_v2Library "HTFStructCore_v2"
f_structure_from_pivots(phSeries, plSeries)
Parameters:
phSeries (float)
plSeries (float)
f_adx_from_series(plusDMSeries, minusDMSeries, trSeries, adxLen)
Parameters:
plusDMSeries (float)
minusDMSeries (float)
trSeries (float)
adxLen (simple int)
f_retest_triggers(trendRaw, lastHigh, lastLow, retestTol, enableRetest)
Parameters:
trendRaw (int)
lastHigh (float)
lastLow (float)
retestTol (float)
enableRetest (bool)
f_sweep_triggers(trendRaw, sweepLookback, enableSweep)
Parameters:
trendRaw (int)
sweepLookback (int)
enableSweep (bool)
f_risk(lastLow, lastHigh, atrLen, atrStopMult, atrTpMult, preferTightStop)
Parameters:
lastLow (float)
lastHigh (float)
atrLen (simple int)
atrStopMult (float)
atrTpMult (float)
preferTightStop (bool)
Göstergeler ve stratejiler
Breakout Pro_V2Advanced breakout/breakdown indicator featuring multi-pattern detection, quality tier scoring (S/A/B/C), strength analysis (0-10), VWAP integration, multi-timeframe filters, and adaptive R-based take-profit/stop-loss framework. Includes comprehensive dashboard with real-time metrics and market regime detection.
Breakout ProAdvanced breakout/breakdown indicator featuring multi-pattern detection, quality tier scoring (S/A/B/C), strength analysis (0-10), VWAP integration, multi-timeframe filters, and adaptive R-based take-profit/stop-loss framework. Includes comprehensive dashboard with real-time metrics and market regime detection.
CoreLibrary "Core"
inRTH()
gapFlags(prevDayClose, gapPct)
Parameters:
prevDayClose (float)
gapPct (float)
gapInfo(prevClose)
Parameters:
prevClose (float)
relativeVolume(len)
Parameters:
len (int)
barSeconds()
barSecondsOpt(rthSecondsDefault)
Parameters:
rthSecondsDefault (int)
relVolRealtime(len)
Parameters:
len (int)
mtfAlign(htfEma, tol)
Parameters:
htfEma (float)
tol (float)
htfDistanceAbs(htfEma, fallback)
Parameters:
htfEma (float)
fallback (float)
mtfState(htfEma, tol)
Parameters:
htfEma (float)
tol (float)
adaptiveLength(rocLen, minSmooth, maxSmooth, useAdaptive, baseSmoothing, speedLookback)
Parameters:
rocLen (int)
minSmooth (int)
maxSmooth (int)
useAdaptive (bool)
baseSmoothing (int)
speedLookback (int)
adaptiveTrend(src, adaptiveLen)
Parameters:
src (float)
adaptiveLen (float)
atrBands(atrLen, atrMult, basis)
Parameters:
atrLen (simple int)
atrMult (float)
basis (float)
calcTrendStrength(closePrice, fastEMA, slowEMA, volumeConfirmed, speedConfirmed)
Parameters:
closePrice (float)
fastEMA (float)
slowEMA (float)
volumeConfirmed (bool)
speedConfirmed (bool)
calcMovementPotential(inExpansionZone, trendStrength, speedConfirmed)
Parameters:
inExpansionZone (bool)
trendStrength (int)
speedConfirmed (bool)
combineSignalScore(trendStrength, movementPotential, mtfBonus, volumeSurgeBonus)
Parameters:
trendStrength (int)
movementPotential (int)
mtfBonus (int)
volumeSurgeBonus (int)
strength10(dirLong, volRatio, htfDistance, isTraditional, isAltPattern, bodySize, rsi)
Parameters:
dirLong (bool)
volRatio (float)
htfDistance (float)
isTraditional (bool)
isAltPattern (bool)
bodySize (float)
rsi (float)
sessionProfile()
microstructure(lookback)
Parameters:
lookback (int)
normalizePressure(pressure, lookback)
Parameters:
pressure (float)
lookback (int)
tickPressureNorm(lb)
Parameters:
lb (int)
zscore(x, lb)
Parameters:
x (float)
lb (int)
tickPressureZ(lb)
Parameters:
lb (int)
strength10DayTrade(dirLong, volRatio, htfDistance, isTraditional, isAltPattern, bodySize, rsi, sessionBonus, tickPressure)
Parameters:
dirLong (bool)
volRatio (float)
htfDistance (float)
isTraditional (bool)
isAltPattern (bool)
bodySize (float)
rsi (float)
sessionBonus (bool)
tickPressure (float)
vwapBands(vwap, length)
Parameters:
vwap (float)
length (int)
vwapChop(vwap, dev, atrPct, rsi)
Parameters:
vwap (float)
dev (float)
atrPct (float)
rsi (float)
calcRiskReward(entry, stop, tp1, tp2, tp3, shares)
Parameters:
entry (float)
stop (float)
tp1 (float)
tp2 (float)
tp3 (float)
shares (float)
squeezeBBKC()
marketRegime(lookback)
Parameters:
lookback (int)
squeezeBucket(ratio)
Parameters:
ratio (float)
dynamicCooldown(baseBars, atrPct, inChop, maxBars)
Parameters:
baseBars (int)
atrPct (float)
inChop (bool)
maxBars (int)
vwapMode(inChop)
Parameters:
inChop (bool)
toPctStr(x)
Parameters:
x (float)
yesNo(b)
Parameters:
b (bool)
trendLabel(state)
Parameters:
state (int)
minRByPct(price, pct)
Parameters:
price (float)
pct (float)
vwapChopScore(vwap, dev, atrPct, rsi)
Parameters:
vwap (float)
dev (float)
atrPct (float)
rsi (float)
strengthGateSuggest(isQualityTime, inChop, baseGate)
Parameters:
isQualityTime (bool)
inChop (bool)
baseGate (int)
cooldownReason(atrPct, inChop)
Parameters:
atrPct (float)
inChop (bool)
readyGates(isQualityTime, inChop, relVol, atrPct, baseGate)
Parameters:
isQualityTime (bool)
inChop (bool)
relVol (float)
atrPct (float)
baseGate (int)
readyVerdict(isLong, mtfStateVal, relVol, atrPercent, strengthScore, strengthGate)
Parameters:
isLong (bool)
mtfStateVal (int)
relVol (float)
atrPercent (float)
strengthScore (int)
strengthGate (int)
structuralStops(isLong, sigLow, sigHigh, vwap, dev, atr, stopBufAtr)
Parameters:
isLong (bool)
sigLow (float)
sigHigh (float)
vwap (float)
dev (float)
atr (float)
stopBufAtr (float)
emaSlopePct(ema, bars)
Parameters:
ema (float)
bars (int)
atrPct(len)
Parameters:
len (simple int)
cooldownStatus(lastSigBar, cooldownBars)
Parameters:
lastSigBar (int)
cooldownBars (int)
emaSlopeSign(ema, bars)
Parameters:
ema (float)
bars (int)
barProgress()
rthMarkers()
badge(ok)
Parameters:
ok (bool)
triBadge(x)
Parameters:
x (int)
priceAcceptanceAdaptive(minBodyFrac)
Parameters:
minBodyFrac (float)
speedConfirmed(rocLen, emaLen, smaLen)
Parameters:
rocLen (int)
emaLen (simple int)
smaLen (int)
setupScore(isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, microOK, cooldownOK)
Parameters:
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
microOK (bool)
cooldownOK (bool)
setupTier(score)
Parameters:
score (int)
setupQuality(score)
Parameters:
score (int)
setupQualityColor(score)
Parameters:
score (int)
setupScoreDir(isLong, isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, priceAccept, tickNorm, cooldownOK)
Parameters:
isLong (bool)
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
priceAccept (bool)
tickNorm (float)
cooldownOK (bool)
setupScoresBoth(isLoose, isNormal, vwapTrend, emaUp, mtfBull, relVolOK, priceAccept, tickNorm, cooldownOK)
Parameters:
isLoose (bool)
isNormal (bool)
vwapTrend (bool)
emaUp (bool)
mtfBull (bool)
relVolOK (bool)
priceAccept (bool)
tickNorm (float)
cooldownOK (bool)
ruleGatesDir(isLong, squeezeTight, emaUp, vwapTrend, relVol, relVolThresh, tickNorm, useSqzGate, useEmaGate, useVwapGate, useVolGate, useMicroGate)
Parameters:
isLong (bool)
squeezeTight (bool)
emaUp (bool)
vwapTrend (bool)
relVol (float)
relVolThresh (float)
tickNorm (float)
useSqzGate (bool)
useEmaGate (bool)
useVwapGate (bool)
useVolGate (bool)
useMicroGate (bool)
ruleGates(squeezeTight, emaUp, vwapTrend, relVol, relVolThresh, tickNorm, useSqzGate, useVwapGate, useVolGate, useMicroGate)
Parameters:
squeezeTight (bool)
emaUp (bool)
vwapTrend (bool)
relVol (float)
relVolThresh (float)
tickNorm (float)
useSqzGate (bool)
useVwapGate (bool)
useVolGate (bool)
useMicroGate (bool)
arrowColor(bucket, baseColor, useRegimeColor)
Parameters:
bucket (string)
baseColor (color)
useRegimeColor (bool)
orbHiLo(minutes)
Parameters:
minutes (int)
prevDayHL()
Risk Size Calculator - Indices/Metals This indicator is a universal position sizing tool that automatically calculates how many contracts or units to trade based on your defined dollar risk and stop size, while intelligently adapting to the asset you’re trading.
Key Features
Works on any asset: indices, metals, futures, stocks, crypto, etc.
Auto stop interpretation:
Metals (GC, MGC, SI, SIL, etc.) → Ticks
Everything else → Points
Single stop input (no switching between points/ticks manually)
Auto preset stops per asset class (optional)
Uses TradingView’s native contract data (pointvalue, mintick) for accuracy
Clean, readable top-right panel with:
Risk ($)
Stop (Points or Ticks, auto-labeled)
Contracts / Units
Actual Risk ($)
Optional manual $-per-point override for edge cases or custom instruments
Designed for fast execution with zero mental math and minimal chart disruption.
Today's Total Volume (Floating)Floating bubble showing total volume today of stock. Resets at midnight
Previous Close Percentage LevelsInstitutional Previous Close Percentage Levels (Visual).
This indicator plots percentage-based levels calculated from the previous daily close, designed for clean intraday context and Replay analysis.
Features:
• Automatic daily recalculation
• Levels displayed only for the current trading day
• Clear 0% reference line (previous close) without label
• Configurable percentage steps (+ / −)
• Right-side percentage labels
• Visual TOUCH markers (price interaction)
• Visual BREAK markers (confirmed close beyond level)
• Replay-safe logic (no infinite lines)
• Pine Script v6 compatible
This script is focused on visual clarity and price context.
No audible or popup alerts are used — only on-chart visual signals.
Ideal for:
• Intraday bias
• Mean reversion
• Breakout confirmation
• Futures, Forex, Crypto, Stocks
GATS_LibLibrary "GATS_Lib"
GATS 선물/현물 자동매매를 위한 신호 생성 라이브러리
init(password, exchange, ticker, leverage, start_time, end_time)
Parameters:
password (string)
exchange (string)
ticker (string)
leverage (int)
start_time (int)
end_time (int)
method entry_long(bot, id, qty, comment)
Namespace types: Bot
Parameters:
bot (Bot)
id (string)
qty (float)
comment (string)
method entry_short(bot, id, qty, comment)
Namespace types: Bot
Parameters:
bot (Bot)
id (string)
qty (float)
comment (string)
method close(bot, id, comment)
Namespace types: Bot
Parameters:
bot (Bot)
id (string)
comment (string)
method close_all(bot, comment)
Namespace types: Bot
Parameters:
bot (Bot)
comment (string)
Bot
Fields:
password (series string)
exchange (series string)
ticker (series string)
leverage (series int)
start_time (series int)
end_time (series int)
Dynamic ATR-based Renko Overlay - Non repaintingDaily ATR-Based Renko Overlay
Overview
This Pine Script v5 indicator creates a dynamic Renko overlay on your time-based charts (optimized for 1-minute timeframes), using the previous period's ATR from a user-specified higher timeframe (default: 1-hour) to determine brick sizes. Unlike traditional Renko charts, this is an overlay that draws Renko bricks directly on top of your existing candles, allowing you to combine the noise-filtering power of Renko with the full features of time-based charts.
It's designed for traders who want Renko's trend-clarity benefits without switching chart types, especially useful for intraday trading in volatile markets like forex, stocks, or crypto.
Key Features
- Adaptive Brick Sizing: Brick size is calculated as a percentage (default 40%) of the previous period's ATR (Average True Range, default length 14) from the selected higher timeframe (default: 1-hour). This makes bricks volatility-adjusted—larger in high-vol periods to reduce noise, smaller in low-vol for more detail.
- Periodic Recalculation: Resets brick size at the start of each new period based on the user-specified reset timeframe (default: daily), using the prior period's ATR from the chosen timeframe. This ensures relevance without unwanted disruptions.
- Traditional Renko Logic: Uses 1-box reversal (a full brick against the trend to reverse). Bricks form based on closing prices, ignoring time and minor fluctuations.
- Visual Style: Stepped lines with green (up) and red (down) fills for a box-like appearance. Semi-transparent for easy overlay on candles.
- Customizable Inputs:
- ATR Length: Adjust the ATR period (default: 14).
- Percentage of ATR: Fine-tune brick sensitivity (default: 0.4 or 40%; range 0-1).
- ATR Timeframe: Specify the timeframe for ATR calculation (default: "60" for 1-hour; enter as a string like "240" for 4-hour, "D" for daily, etc.).
- Reset Timeframe: Specify the period for recalculating the brick size (default: "D" for daily; enter as a string like "W" for weekly, "M" for monthly, etc.).
How It Works
1. Fetches ATR from the user-specified timeframe via `request.security` for higher-timeframe volatility data.
2. On new periods based on the reset timeframe (or first load), sets brick size to `percent * ATR_HTF`.
3. Tracks Renko "close" and "previous close" to calculate bricks:
- Upward moves add green bricks in multiples of the size.
- Downward moves add red bricks.
- Reversals require a full brick against the direction.
4. Plots and fills create the overlay, updating on each 1-min bar close.
Add it to a 1-minute chart for best results—bricks will adapt periodically while you retain full candle visibility.
Why This Indicator is Helpful
TradingView's native Renko charts are powerful but come with limitations that can frustrate serious traders:
- No Bar Replay: Native Renko doesn't support TradingView's bar replay feature, making it hard to simulate historical trading sessions.
- Inaccurate/Repainting Strategy Testing: Strategies on native Renko can repaint or lack precision due to the non-time-based nature, leading to unreliable backtests.
- Limited Data History: Fast Renko timeframes (e.g., small bricks) often load very little historical data, restricting long-term analysis.
This overlay solves these by building Renko on a time-based chart:
- Full Bar Replay Support: Replay sessions as usual on your 1-min chart—the Renko follows along.
- Accurate, Non-Repainting Testing: Test strategies on the underlying time chart without repainting issues, as Renko is derived from closes.
- Unlimited Data Depth: Access TradingView's full historical data for 1-min charts (up to years of bars), not limited by Renko's data constraints.
- Hybrid Analysis: Overlay Renko on candles to spot trends while using volume, indicators (e.g., RSI, MAs), or drawing tools that don't work well on native Renko.
It's a game-changer for trend-following, breakout strategies, or filtering noise in short-term trades. No more switching charts—get the best of both worlds!
Usage Tips
- Best on 1-min charts for intraday precision, but experiment with others.
- Tune the percentage lower (e.g., 0.3) for more bricks/sensitivity, higher (e.g., 0.5) for fewer/false-signal reduction.
- Adjust the ATR timeframe to match your strategy—e.g., "240" for longer-term volatility or "15" for shorter.
- Customize the reset timeframe for different recalculation frequencies—e.g., "W" for weekly resets to capture broader market shifts, or "240" for every 4 hours.
- Combine with alerts: right now I am experimenting with 90 period EMA and the Renko brick pullbacks to find some EDGE
If you find this useful, give it a thumbs up or share your tweaks in the comments. Feedback welcome—happy trading! 🚀
Demand Index - Metastock VersionThis script implements the Demand Index, a complex technical indicator originally developed by James Sibbet. This specific version is adapted from the classic MetaStock formula to ensure accuracy and consistency with the original methodology.
The Demand Index combines price and volume data to relate price pressure to volume intensity. It is often used as a leading indicator to predict price trends by assessing the balance between buying pressure (Demand) and selling pressure (Supply).
How It Works
The calculation involves several steps to normalize volume and price changes:
Weighted Close: It calculates a weighted close price giving extra weight to the closing price (High + Low + 2*Close) / 4.
Volatility & Volume Averages: It computes the Average True Range (ATR) proxy and an Exponential Moving Average (EMA) of the volume to establish a baseline.
Buying & Selling Pressure: The core logic compares the current weighted close to the previous one.
If prices rise, the volume is assigned to Buying Pressure.
If prices fall, the volume is assigned to Selling Pressure.
A decay factor (Constant) is applied based on volatility to smooth the reaction to extreme price moves.
The Index: The final oscillator is derived from the ratio of smoothed Buying Pressure to Selling Pressure.
How to Use It
The Demand Index oscillates around a zero line. Traders typically look for the following signals:
Divergence: This is the most common use.
Bullish Divergence: Prices are making new lows, but the Demand Index is making higher lows. This suggests selling pressure is waning and a reversal may be imminent.
Bearish Divergence: Prices are making new highs, but the Demand Index is making lower highs. This suggests buying pressure is drying up.
Zero Line Crossovers:
A cross above zero indicates that Buying Pressure has overtaken Selling Pressure (Bullish).
A cross below zero indicates that Selling Pressure has overtaken Buying Pressure (Bearish).
Trend Confirmation: In a strong trend, the Demand Index should generally move in the same direction as the price.
Settings
Length: The lookback period for the moving averages (Default is 19, consistent with the standard MetaStock setting).
Originality & Credits
This script is a direct translation of the mathematical formula used in MetaStock software. While the Demand Index concept belongs to James Sibbet, this specific Pine Script implementation is provided as open source for the community to study and utilize.
Disclaimer:
This script is for educational and informational purposes only. It DOES NOT constitute financial advice. Trading involves significant risk, and past performance is not indicative of future results. Always do your own research before making investment decisions.
Candle Anatomy (feat. Dr. Rupward)# Candle Anatomy (feat. Dr. Rupward)
## Overview
This indicator dissects a single Higher Timeframe (HTF) candle and displays it separately on the right side of your chart with detailed anatomical analysis. Instead of cluttering your entire chart with analysis on every candle, this tool focuses on what matters most: understanding the structure and strength of the most recent HTF candle.
---
## Why I Built This
When analyzing price action, I often found myself manually calculating wick-to-body ratios, estimating retracement levels, and trying to gauge candle strength. This indicator automates that process and presents it in a clean, visual format.
The "Dr. Rupward" theme is just for fun – a lighthearted way to present technical analysis. Think of it as your chart's "health checkup." Don't take it too seriously, but do take the data seriously!
---
## How It Works
### 1. Candle Decomposition
The indicator breaks down the HTF candle into three components:
- **Upper Wick %** = (High - max(Open, Close)) / Range × 100
- **Body %** = |Close - Open| / Range × 100
- **Lower Wick %** = (min(Open, Close) - Low) / Range × 100
Where Range = High - Low
### 2. Strength Assessment
Based on body percentage:
- **Strong** (≥70%): High conviction move, trend likely to continue
- **Moderate** (40-69%): Normal price action
- **Weak** (<40%): Indecision, potential reversal or consolidation
### 3. Pressure Analysis
- **Upper Wick** indicates selling pressure (bulls pushed up, but sellers rejected)
- **Lower Wick** indicates buying pressure (bears pushed down, but buyers rejected)
Thresholds:
- ≥30%: Strong pressure
- 15-29%: Moderate pressure
- <15%: Weak pressure
### 4. Pattern Recognition
The indicator automatically detects:
| Pattern | Condition |
|---------|-----------|
| Doji | Body < 10% |
| Hammer | Lower wick ≥ 60%, Upper wick < 10%, Body < 35% |
| Shooting Star | Upper wick ≥ 60%, Lower wick < 10%, Body < 35% |
| Marubozu | Body ≥ 90% |
| Spinning Top | Body < 30%, Both wicks > 25% |
### 5. Fibonacci Levels
Displays key Fibonacci retracement and extension levels based on the candle's range:
**Retracement:** 0, 0.236, 0.382, 0.5, 0.618, 0.786, 1.0
**Extension:** 1.272, 1.618, 2.0, 2.618
**Negative Extension:** -0.272, -0.618, -1.0
These levels help identify potential support/resistance if price retraces into or extends beyond the analyzed candle.
### 6. Comparison with Previous Candle
When enabled, displays the previous HTF candle (semi-transparent) alongside the current one. This allows you to:
- Compare range expansion/contraction
- Observe momentum shifts
- Identify continuation or reversal setups
---
## Settings Explained
### Display Settings
- **Analysis Timeframe**: The HTF candle to analyze (default: Daily)
- **Offset from Chart**: Distance from the last bar (default: 15)
- **Candle Width**: Visual width of the anatomy candle
- **Show Previous Candle**: Toggle comparison view
### Fibonacci Levels
- Toggle individual levels on/off based on your preference
- Retracement levels for pullback analysis
- Extension levels for target projection
### Diagnosis Panel
- Shows pattern name, strength assessment, and expected behavior
- Can be toggled off if you prefer minimal display
---
## Use Cases
1. **Swing Trading**: Analyze daily candle structure before entering on lower timeframes
2. **Trend Confirmation**: Strong body % with minimal upper wick = healthy trend
3. **Reversal Detection**: Hammer/Shooting Star patterns with high wick %
4. **Target Setting**: Use Fibonacci extensions for take-profit levels
---
## Notes
- This indicator is designed for analysis, not for generating buy/sell signals
- Works best on liquid markets with clean price action
- The "diagnosis" is algorithmic interpretation, not financial advice
- Combine with your own analysis and risk management
---
## About the Name
"Dr. Rupward" is a playful persona I created – combining "Right" + "Upward" (my trading philosophy) with a doctor theme because we're "diagnosing" candle health. It's meant to make technical analysis a bit more fun and approachable. Enjoy!
---
## Feedback Welcome
If you find this useful or have suggestions for improvement, feel free to leave a comment. Happy trading!
Daily ATR (Shown on All Timeframes)Daily ATR (Shown on All Timeframes) displays the Daily timeframe ATR on any chart you’re viewing, so you always know the current day’s average range without switching timeframes.
True Daily ATR (not chart ATR): The script pulls ATR from the Daily chart using request.security() and shows that value on every timeframe.
On-chart table (top-right): A clean 2-row table shows:
The label: Daily ATR (Length)
The ATR value, with an optional ATR-as-% of price readout.
Custom display controls:
ATR Length input (default 14)
Toggle to show ATR % of current price
Toggle to show/hide the table
Choose table text color
Choose table text size (Tiny → Huge)
Data Window output: The Daily ATR value is also plotted invisibly so it appears in TradingView’s Data Window for quick reference.
This is useful for gauging daily volatility, setting risk/position sizing, and comparing intraday movement to the stock’s typical daily range.
Intrabar Volume Flow IntelligenceIntrabar Volume Flow Intelligence: A Comprehensive Analysis:
The Intrabar Volume Flow Intelligence indicator represents a sophisticated approach to understanding market dynamics through the lens of volume analysis at a granular, intrabar level. This Pine Script version 5 indicator transcends traditional volume analysis by dissecting price action within individual bars to reveal the true nature of buying and selling pressure that often remains hidden when examining only the external characteristics of completed candlesticks. At its core, this indicator operates on the principle that volume is the fuel that drives price movement, and by understanding where volume is being applied within each bar—whether at higher prices indicating buying pressure or at lower prices indicating selling pressure—traders can gain a significant edge in anticipating future price movements before they become obvious to the broader market.
The foundational innovation of this indicator lies in its use of lower timeframe data to analyze what happens inside each bar on your chart timeframe. While most traders see only the open, high, low, and close of a five-minute candle, for example, this indicator requests data from a one-minute timeframe by default to see all the individual one-minute candles that comprise that five-minute bar. This intrabar analysis allows the indicator to calculate a weighted intensity score based on where the price closed within each sub-bar's range. If the close is near the high, that volume is attributed more heavily to buying pressure; if near the low, to selling pressure. This methodology is far more nuanced than simple tick volume analysis or even traditional volume delta calculations because it accounts for the actual price behavior and distribution of volume throughout the formation of each bar, providing a three-dimensional view of market participation.
The intensity calculation itself demonstrates the coding sophistication embedded in this indicator. For each intrabar segment, the indicator calculates a base intensity using the formula of close minus low divided by the range between high and low. This gives a value between zero and one, where values approaching one indicate closes near the high and values approaching zero indicate closes near the low. However, the indicator doesn't stop there—it applies an open adjustment factor that considers the relationship between the close and open positions within the overall range, adding up to twenty percent additional weighting based on directional movement. This adjustment ensures that strongly directional intrabar movement receives appropriate emphasis in the final volume allocation. The adjusted intensity is then bounded between zero and one to prevent extreme outliers from distorting the analysis, demonstrating careful consideration of edge cases and data integrity.
The volume flow calculation multiplies this intensity by the actual volume transacted in each intrabar segment, creating buy volume and sell volume figures that represent not just quantity but quality of market participation. These figures are accumulated across all intrabar segments within the parent bar, and simultaneously, a volume-weighted average price is calculated for the entire bar using the typical price of each segment multiplied by its volume. This intrabar VWAP becomes a critical reference point for understanding whether the overall bar is trading above or below its fair value as determined by actual transaction levels. The deviation from this intrabar VWAP is then used as a weighting mechanism—when the close is significantly above the intrabar VWAP, buying volume receives additional weight; when below, selling volume is emphasized. This creates a feedback loop where volume that moves price away from equilibrium is recognized as more significant than volume that keeps price near balance.
The imbalance filter represents another layer of analytical sophistication that separates meaningful volume flows from normal market noise. The indicator calculates the absolute difference between buy and sell volume as a percentage of total volume, and this imbalance must exceed a user-defined threshold—defaulted to twenty-five percent but adjustable from five to eighty percent—before the volume flow is considered significant enough to register on the indicator. This filtering mechanism ensures that only bars with clear directional conviction contribute to the cumulative flow measurements, while bars with balanced buying and selling are essentially ignored. This is crucial because markets spend considerable time in equilibrium states where volume is simply facilitating position exchanges without directional intent. By filtering out these neutral periods, the indicator focuses trader attention exclusively on moments when one side of the market is demonstrating clear dominance.
The decay factor implementation showcases advanced state management in Pine Script coding. Rather than allowing imbalanced volume to simply disappear after one bar, the indicator maintains decayed values using variable state that persists across bars. When a new significant imbalance occurs, it replaces the decayed value; when no significant imbalance is present, the previous value is multiplied by the decay factor, which defaults to zero point eight-five. This means that a large volume imbalance continues to influence the indicator for several bars afterward, gradually diminishing in impact unless reinforced by new imbalances. This decay mechanism creates persistence in the flow measurements, acknowledging that large institutional volume accumulation or distribution campaigns don't execute in single bars but rather unfold across multiple bars. The cumulative flow calculation then sums these decayed values over a lookback period, creating a running total that represents sustained directional pressure rather than momentary spikes.
The dual moving average crossover system applied to these volume flows creates actionable trading signals from the underlying data. The indicator calculates both a fast exponential moving average and a slower simple moving average of the buy flow, sell flow, and net flow values. The use of EMA for the fast line provides responsiveness to recent changes while the SMA for the slow line provides a more stable baseline, and the divergence or convergence between these averages signals shifts in volume flow momentum. When the buy flow EMA crosses above its SMA while volume is elevated, this indicates that buying pressure is not only present but accelerating, which is the foundation for the strong buy signal generation. The same logic applies inversely for selling pressure, creating a symmetrical approach to detecting both upside and downside momentum shifts based on volume characteristics rather than price characteristics.
The volume threshold filtering ensures that signals only generate during periods of statistically significant market participation. The indicator calculates a simple moving average of total volume over a user-defined period, defaulted to twenty bars, and then requires that current volume exceed this average by a multiplier, defaulted to one point two times. This ensures that signals occur during periods when the market is actively engaged rather than during quiet periods when a few large orders can create misleading volume patterns. The indicator even distinguishes between high volume—exceeding the threshold—and very high volume—exceeding one point five times the threshold—with the latter triggering background color changes to alert traders to exceptional participation levels. This tiered volume classification allows traders to calibrate their position sizing and conviction levels based on the strength of market participation supporting the signal.
The flow momentum calculation adds a velocity dimension to the volume analysis. By calculating the rate of change of the net flow EMA over a user-defined momentum length—defaulted to five bars—the indicator measures not just the direction of volume flow but the acceleration or deceleration of that flow. A positive and increasing flow momentum indicates that buying pressure is not only dominant but intensifying, which typically precedes significant upward price movements. Conversely, negative and decreasing flow momentum suggests selling pressure is building upon itself, often preceding breakdowns. The indicator even calculates a second derivative—the momentum of momentum, termed flow acceleration—which can identify very early turning points when the rate of change itself begins to shift, providing the most forward-looking signal available from this methodology.
The divergence detection system represents one of the most powerful features for identifying potential trend reversals and continuations. The indicator maintains separate tracking of price extremes and flow extremes over a lookback period defaulted to fourteen bars. A bearish divergence is identified when price makes a new high or equals the recent high, but the net flow EMA is significantly below its recent high—specifically less than eighty percent of that high—and is declining compared to its value at the divergence lookback distance. This pattern indicates that while price is pushing higher, the volume support for that movement is deteriorating, which frequently precedes reversals. Bullish divergences work inversely, identifying situations where price makes new lows without corresponding weakness in volume flow, suggesting that selling pressure is exhausted and a reversal higher is probable. These divergence signals are plotted as distinct diamond shapes on the indicator, making them visually prominent for trader attention.
The accumulation and distribution zone detection provides a longer-term context for understanding institutional positioning. The indicator uses the bars-since function to track consecutive periods where the net flow EMA has remained positive or negative. When buying pressure has persisted for at least five consecutive bars, average intensity exceeds zero point six indicating strong closes within bar ranges, and volume is elevated above the threshold, the indicator identifies an accumulation zone. These zones suggest that smart money is systematically building long positions across multiple bars despite potentially choppy or sideways price action. Distribution zones are identified through the inverse criteria, revealing periods when institutions are systematically exiting or building short positions. These zones are visualized through colored fills on the indicator pane, creating a backdrop that helps traders understand the broader volume flow context beyond individual bar signals.
The signal strength scoring system provides a quantitative measure of conviction for each buy or sell signal. Rather than treating all signals as equal, the indicator assigns point values to different signal components: twenty-five points for the buy flow EMA-SMA crossover, twenty-five points for the net flow EMA-SMA crossover, twenty points for high volume presence, fifteen points for positive flow momentum, and fifteen points for bullish divergence presence. These points are summed to create a buy score that can range from zero to one hundred percent, with higher scores indicating that multiple independent confirmation factors are aligned. The same methodology creates a sell score, and these scores are displayed in the information table, allowing traders to quickly assess whether a signal represents a tentative suggestion or a high-conviction setup. This scoring approach transforms the indicator from a binary signal generator into a nuanced probability assessment tool.
The visual presentation of the indicator demonstrates exceptional attention to user experience and information density. The primary display shows the net flow EMA as a thick colored line that transitions between green when above zero and above its SMA, indicating strong buying, to a lighter green when above zero but below the SMA, indicating weakening buying, to red when below zero and below the SMA, indicating strong selling, to a lighter red when below zero but above the SMA, indicating weakening selling. This color gradient provides immediate visual feedback about both direction and momentum of volume flows. The net flow SMA is overlaid in orange as a reference line, and a zero line is drawn to clearly delineate positive from negative territory. Behind these lines, a histogram representation of the raw net flow—scaled down by thirty percent for visibility—shows bar-by-bar flow with color intensity reflecting whether flow is strengthening or weakening compared to the previous bar. This layered visualization allows traders to simultaneously see the raw data, the smoothed trend, and the trend of the trend, accommodating both short-term and longer-term trading perspectives.
The cumulative delta line adds a macro perspective by maintaining a running sum of all volume deltas divided by one million for scale, plotted in purple as a separate series. This cumulative measure acts similar to an on-balance volume calculation but with the sophisticated volume attribution methodology of this indicator, creating a long-term sentiment gauge that can reveal whether an asset is under sustained accumulation or distribution across days, weeks, or months. Divergences between this cumulative delta and price can identify major trend exhaustion or reversal points that might not be visible in the shorter-term flow measurements.
The signal plotting uses shape-based markers rather than background colors or arrows to maximize clarity while preserving chart space. Strong buy signals—meeting multiple criteria including EMA-SMA crossover, high volume, and positive momentum—appear as full-size green triangle-up shapes at the bottom of the indicator pane. Strong sell signals appear as full-size red triangle-down shapes at the top. Regular buy and sell signals that meet fewer criteria appear as smaller, semi-transparent circles, indicating they warrant attention but lack the full confirmation of strong signals. Divergence-based signals appear as distinct diamond shapes in cyan for bullish divergences and orange for bearish divergences, ensuring these critical reversal indicators are immediately recognizable and don't get confused with momentum-based signals. This multi-tiered signal hierarchy helps traders prioritize their analysis and avoid signal overload.
The information table in the top-right corner of the indicator pane provides real-time quantitative feedback on all major calculation components. It displays the current bar's buy volume and sell volume in millions with appropriate color coding, the imbalance percentage with color indicating whether it exceeds the threshold, the average intensity score showing whether closes are generally near highs or lows, the flow momentum value, and the current buy and sell scores. This table transforms the indicator from a purely graphical tool into a quantitative dashboard, allowing discretionary traders to incorporate specific numerical thresholds into their decision frameworks. For example, a trader might require that buy score exceed seventy percent and intensity exceed zero point six-five before taking a long position, creating objective entry criteria from subjective chart reading.
The background shading that occurs during very high volume periods provides an ambient alert system that doesn't require focused attention on the indicator pane. When volume spikes to one point five times the threshold and net flow EMA is positive, a very light green background appears across the entire indicator pane; when volume spikes with negative net flow, a light red background appears. These backgrounds create a subliminal awareness of exceptional market participation moments, ensuring traders notice when the market is making important decisions even if they're focused on price action or other indicators at that moment.
The alert system built into the indicator allows traders to receive notifications for strong buy signals, strong sell signals, bullish divergences, bearish divergences, and very high volume events. These alerts can be configured in TradingView to send push notifications to mobile devices, emails, or webhook calls to automated trading systems. This functionality transforms the indicator from a passive analysis tool into an active monitoring system that can watch markets continuously and notify the trader only when significant volume flow developments occur. For traders monitoring multiple instruments, this alert capability is invaluable for efficient time allocation, allowing them to analyze other opportunities while being instantly notified when this indicator identifies high-probability setups on their watch list.
The coding implementation demonstrates advanced Pine Script techniques including the use of request.security_lower_tf to access intrabar data, array manipulation to process variable-length intrabar arrays, proper variable scoping with var keyword for persistent state management across bars, and efficient conditional logic that prevents unnecessary calculations. The code structure with clearly delineated sections for inputs, calculations, signal generation, plotting, and alerts makes it maintainable and educational for those studying Pine Script development. The use of input groups with custom headers creates an organized settings panel that doesn't overwhelm users with dozens of ungrouped parameters, while still providing substantial customization capability for advanced users who want to optimize the indicator for specific instruments or timeframes.
For practical trading application, this indicator excels in several specific use cases. Scalpers and day traders can use the intrabar analysis to identify accumulation or distribution happening within the bars of their entry timeframe, providing early entry signals before momentum indicators or price patterns complete. Swing traders can use the cumulative delta and accumulation-distribution zones to understand whether short-term pullbacks in an uptrend are being bought or sold, helping distinguish between healthy retracements and trend reversals. Position traders can use the divergence detection to identify major turning points where price extremes are not supported by volume, providing low-risk entry points for counter-trend positions or warnings to exit with-trend positions before significant reversals.
The indicator is particularly valuable in ranging markets where price-based indicators produce numerous false breakout signals. By requiring that breakouts be accompanied by volume flow imbalances, the indicator filters out failed breakouts driven by low participation. When price breaks a range boundary accompanied by a strong buy or sell signal with high buy or sell score and very high volume, the probability of successful breakout follow-through increases dramatically. Conversely, when price breaks a range but the indicator shows low imbalance, opposing flow direction, or low volume, traders can fade the breakout or at minimum avoid chasing it.
During trending markets, the indicator helps traders identify the healthiest entry points by revealing where pullbacks are being accumulated by smart money. A trending market will show the cumulative delta continuing in the trend direction even as price pulls back, and accumulation zones will form during these pullbacks. When price resumes the trend, the indicator will generate strong buy or sell signals with high scores, providing objective entry points with clear invalidation levels. The flow momentum component helps traders stay with trends longer by distinguishing between healthy momentum pauses—where momentum goes to zero but doesn't reverse—and actual momentum reversals where opposing pressure is building.
The VWAP deviation weighting adds particular value for traders of liquid instruments like major forex pairs, stock indices, and high-volume stocks where VWAP is widely watched by institutional participants. When price deviates significantly from the intrabar VWAP and volume flows in the direction of that deviation with elevated weighting, it indicates that the move away from fair value is being driven by conviction rather than mechanical order flow. This suggests the deviation will likely extend further, creating continuation trading opportunities. Conversely, when price deviates from intrabar VWAP but volume flow shows reduced intensity or opposing direction despite the weighting, it suggests the deviation will revert to VWAP, creating mean reversion opportunities.
The ATR normalization option makes the indicator values comparable across different volatility regimes and different instruments. Without normalization, a one-million share buy-sell imbalance might be significant for a low-volatility stock but trivial for a high-volatility cryptocurrency. By normalizing the delta by ATR, the indicator accounts for the typical price movement capacity of the instrument, making signal thresholds and comparison values meaningful across different trading contexts. This is particularly valuable for traders running the indicator on multiple instruments who want consistent signal quality regardless of the underlying instrument characteristics.
The configurable decay factor allows traders to adjust how persistent they want volume flows to remain influential. For very short-term scalping, a lower decay factor like zero point five will cause volume imbalances to dissipate quickly, keeping the indicator focused only on very recent flows. For longer-term position trading, a higher decay factor like zero point nine-five will allow significant volume events to influence the indicator for many bars, revealing longer-term accumulation and distribution patterns. This flexibility makes the single indicator adaptable to trading styles ranging from one-minute scalping to daily chart position trading simply by adjusting the decay parameter and the lookback bars.
The minimum imbalance percentage setting provides crucial noise filtering that can be optimized per instrument. Highly liquid instruments with tight spreads might show numerous small imbalances that are meaningless, requiring a higher threshold like thirty-five or forty percent to filter noise effectively. Thinly traded instruments might rarely show extreme imbalances, requiring a lower threshold like fifteen or twenty percent to generate adequate signals. By making this threshold user-configurable with a wide range, the indicator accommodates the full spectrum of market microstructure characteristics across different instruments and timeframes.
In conclusion, the Intrabar Volume Flow Intelligence indicator represents a comprehensive volume analysis system that combines intrabar data access, sophisticated volume attribution algorithms, multi-timeframe smoothing, statistical filtering, divergence detection, zone identification, and intelligent signal scoring into a cohesive analytical framework. It provides traders with visibility into market dynamics that are invisible to price-only analysis and even to conventional volume analysis, revealing the true intentions of market participants through their actual transaction behavior within each bar. The indicator's strength lies not in any single feature but in the integration of multiple analytical layers that confirm and validate each other, creating high-probability signal generation that can form the foundation of complete trading systems or provide powerful confirmation for discretionary analysis. For traders willing to invest time in understanding its components and optimizing its parameters for their specific instruments and timeframes, this indicator offers a significant informational advantage in increasingly competitive markets where edge is derived from seeing what others miss and acting on that information before it becomes consensus.
Daily ATR (Shown on All Timeframes)Daily ATR (Shown on All Timeframes) displays the Daily timeframe ATR on any chart you’re viewing, so you always know the current day’s average range without switching timeframes.
True Daily ATR (not chart ATR): The script pulls ATR from the Daily chart using request.security() and shows that value on every timeframe.
On-chart table (top-right): A clean 2-row table shows:
The label: Daily ATR (Length)
The ATR value, with an optional ATR-as-% of price readout.
Custom display controls:
ATR Length input (default 14)
Toggle to show ATR % of current price
Toggle to show/hide the table
Choose table text color
Choose table text size (Tiny → Huge)
Data Window output: The Daily ATR value is also plotted invisibly so it appears in TradingView’s Data Window for quick reference.
This is useful for gauging daily volatility, setting risk/position sizing, and comparing intraday movement to the stock’s typical daily range.
Intermarket Divergence (Futures vs Equity)Intermarket Divergence (Futures vs Equity)
This indicator detects intermarket divergence between a traded instrument (futures, CFD, or spot) and a related equity or ETF.
It highlights moments where price and its underlying market drivers disagree, often appearing before reversals or expansions.
🎯 What It Shows
Bullish divergence:
Price makes a lower low while the equity makes a higher low
Bearish divergence:
Price makes a higher high while the equity makes a lower high
Based on swing pivots, not candle noise
Designed for intraday context, not mechanical entries
✅ Recommended Use
XAUUSD (Gold) → GDX (default)
XAGUSD (Silver) → SIL
USOIL / WTI → XLE
(These guidelines are included directly in the indicator settings.)
🧭 How to Use
Apply on 15m–30m
Look for signals near key levels (PDH/PDL, Asia high/low, HTF structure)
Use price action for entries
Divergence is context, not a signal.
⚠️ Notes
Non-repainting
Signals are selective by design
Best during London & New York sessions
Overlay MACD + EMA 12/26A price-overlay indicator that plots EMA 12 and EMA 26 on the chart and displays a normalized MACD and signal line slightly offset from price to visualize momentum directly on the main chart without using a separate pane.
VSA Effort Result v1.0VSA Effort vs Result by StupidRich
Detects volume-spread divergence:
- "Er": High volume, narrow spread (absorption)
- "eR": Low volume, wide spread (momentum)
Features:
• Clean text labels (customizable size)
• Wide vertical lines matching candle range
• Adjustable thresholds & volume SMA
• Works on all timeframes/assets
Perfect for spotting institutional absorption at key levels.
if u wanna buy me a coffee, just dm @stupidrichboy on Telegram
hope it help
Premarket High/Low (Today + Yesterday)Plots Premarket High and Low (04:00–09:30 ET) for the current day and previous day.
Designed for intraday traders who use premarket structure as key levels.
Stochastic RSI with DivergencesStochastic RSI with Divergences - Enhanced Edition
DESCRIPTION
- This is an enhanced version of the classic Stochastic RSI indicator with divergence detection, originally created by @fskrypt (Log RSI), @RicardoSantos (Divergences), @JustUncleL (edits), and @NeoButane (2018 modifications). Full credit to these talented developers for the foundational work.
ENHANCEMENTS & MODIFICATIONS
- This version adds several user-requested features for improved customization and clarity:
- Divergence Signal Labels: Regular divergence signals now display "Buy" (green) and "Sell" (red) instead of generic "R" markers. Hidden divergences show "H-Buy" and "H-Sell" for clearer identification.
- Customizable Colors: User-adjustable colors for both K line (default: blue) and D line (default: orange) allow traders to match their chart themes.
- Adjustable Transparency: Separate opacity controls for the K/D fill shading (default: 70%) and background zones (default: 98%) provide precise visual customization without overwhelming the chart.
- Optional Divergence Lines: Toggle the green and red divergence connecting lines on/off while keeping the Buy/Sell labels visible, reducing visual clutter when desired.
- Organized Settings: All inputs are logically grouped (StochRSI Settings, Divergence Settings, Colors, Opacity) for easier navigation and configuration.
HOW IT WORKS
- The indicator identifies regular and hidden divergences between price action and the Stochastic RSI oscillator:
- Regular Bullish Divergence (Buy): Price makes lower lows while StochRSI makes higher lows - potential reversal signal
- Regular Bearish Divergence (Sell): Price makes higher highs while StochRSI makes lower highs - potential reversal signal
- Hidden Bullish Divergence (H-Buy): Price makes higher lows while StochRSI makes lower lows - trend continuation signal
- Hidden Bearish Divergence (H-Sell): Price makes lower highs while StochRSI makes higher highs - trend continuation signal
- The Stochastic RSI oscillates between 0-100, with readings above 80 indicating overbought conditions and below 20 indicating oversold conditions.
SETTINGS
StochRSI Settings
RSI Length: 14 (default)
Stoch Length: 14 (default)
K Smoothing: 3 (default)
D Smoothing: 3 (default)
Log Scale: Optional logarithmic transformation
Average K & D: Optional blending of both lines
Divergence Settings
Show Divergences: Toggle all divergence signals
Show Hidden Divergences: Toggle H-Buy/H-Sell signals
Show Divergence Lines: Toggle connecting lines between divergence points
Show Divergences Channel: Display fractal channels
Colors
K Line Color: Customize the fast line
D Line Color: Customize the slow line
Opacity
- Background Opacity: Control 20-80 zone shading (0-100)
K/D Fill Opacity: Control area between K and D lines (0-100)
USE CASES
- Momentum trading: Identify overbought/oversold conditions
Divergence trading: Spot potential reversals and trend continuations
Multi-timeframe analysis: Confirm signals across different timeframes
Trend confirmation: Use with other indicators for confluence
CREDITS
- Original concept and code: @fskrypt (Log RSI), @RicardoSantos (Divergence detection), @JustUncleL (modifications), @NeoButane (2018 updates)
Enhanced by: NPR21 (User interface improvements, label modifications, transparency controls)
BB37BB37
WHAT IS SUPPORT AND RESISTANT ?
Support and resistance are fundamental concepts in technical analysis used to identify price levels on charts that are likely to act as barriers, preventing the price from moving in a certain direction.
Support:
Definition: Support refers to a price level at which an asset tends to stop falling because demand is strong enough to prevent further declines. It acts as a "floor" for the price, where buyers step in to buy the asset, causing the price to rebound or stabilize.
Example: If a stock is trading at $50 and repeatedly fails to drop below that level, $50 would be considered a support level.
Resistance:
Definition: Resistance is the opposite of support. It refers to a price level at which selling pressure is strong enough to prevent the price from rising further. It acts as a "ceiling," where sellers are more willing to sell, causing the price to reverse or consolidate.
Example: If the price of an asset repeatedly fails to rise above $100, $100 would be considered a resistance level.
In Practice:
Support and resistance levels are used by traders to make decisions about buying and selling. If the price approaches support, traders may see it as a potential buying opportunity. If the price approaches resistance, they may consider selling or shorting the asset.
If price breaks through a support or resistance level, it can signal a significant price movement. For example, a price moving above resistance may indicate an uptrend, while a price falling below support could indicate a downtrend.
These levels are not always exact and may vary slightly, often being identified as areas rather than precise lines on a chart. They are key tools for understanding market psychology and price behavior.
HTR Reclaim Hunter
🏹 HTR Reclaim Hunter
(1H Execution + Zones + 4H Bias)
HTR Reclaim Hunter is a trend-continuation indicator designed to identify high-probability pullback & reclaim entries using multi-timeframe bias, EMA structure, and dynamic reclaim zones.
This indicator is best suited for swing trading and intraday continuation setups, especially in trending markets.
🔑 CORE CONCEPT
Trade WITH the higher-timeframe trend.
Enter on pullbacks.
Confirm strength on reclaim.
HTR Reclaim Hunter combines:
4H trend bias
1H execution logic
EMA reclaim structure
Supply & demand reclaim zones
Built-in SL / TP visualization
🧭 RECOMMENDED SETTINGS
Best timeframe: 1H (designed for this)
Markets: Stocks, Crypto, Futures, Forex
Works best in: Trending markets (not chop)
📊 WHAT YOU SEE ON THE CHART
🔹 EMA Structure
EMA 50 (green): Trend filter
EMA 9 (colored): Momentum & pullback guide
🔹 Reclaim Zones
Green boxes: Support / demand zones
Red boxes: Resistance / supply zones
These zones highlight areas where price previously reacted and may reclaim.
🔹 Trade Signals
LONG label: Bullish reclaim setup
SHORT label: Bearish reclaim setup
🔹 Risk Levels (Optional)
Stop Loss (Red)
TP1 (Orange)
TP2 (Green)
🟢 LONG TRADE RULES
A LONG signal appears when ALL of the following are true:
4H trend is bullish
Price above 4H EMA 50
EMA 50 is rising
1H trend is bullish
Price above EMA 50
EMA 9 above EMA 50
Pullback occurs
Price pulls back below EMA 9
Reaches or taps EMA 50
Reclaim confirmation
Strong bullish candle closes back above EMA 9
Candle is not a doji
Signal prints
A green LONG label appears
👉 This indicates a trend continuation entry, not a reversal.
🔴 SHORT TRADE RULES
A SHORT signal appears when ALL of the following are true:
4H trend is bearish
Price below 4H EMA 50
EMA 50 is falling
1H trend is bearish
Price below EMA 50
EMA 9 below EMA 50
Pullback occurs
Price pulls back above EMA 9
Reaches or taps EMA 50
Reclaim confirmation
Strong bearish candle closes back below EMA 9
Candle is not a doji
Signal prints
A red SHORT label appears
🛑 STOP LOSS & TAKE PROFIT
When enabled, the indicator automatically plots:
Stop Loss
Based on recent swing high / low
TP1
1R (1× risk)
TP2
Configurable runner target (default 2R)
These are visual guides only — always manage risk according to your plan.
⚠️ IMPORTANT NOTES
This indicator is not meant for ranging or choppy markets
Best results occur when:
EMA 50 is clearly sloped
Price respects reclaim zones
Always confirm with:
Market structure
Volume
Higher-timeframe context
🔔 ALERTS
Alerts are available for:
HRH LONG
HRH SHORT
Alerts trigger on confirmed reclaim signals, not on every pullback.
❗ DISCLAIMER
This indicator is for educational purposes only.
It does not provide financial advice.
Always test and manage risk appropriately.
🏹 FINAL TIP
HTR Reclaim Hunter works best when you are patient.
Skip chop.
Wait for clean trends.
Hunt only high-quality reclaims.
If you want, I can also:
Write a short description version
Create a “Quick Start” section
Add example captions for screenshots
Help you choose TradingView tags & category
trend-following
ema reclaim
pullback strategy
multi-timeframe
price action
Order Blocks Volume Delta 3D | Flux ChartsGENERAL OVERVIEW:
Order Blocks Volume Delta 3D by Flux Charts is a rule-based order block and volume delta visualization tool. It detects bullish and bearish order blocks using a profile-of-price approach: the indicator finds the most actively traded price area (Point of Control, or POC) between a swing high/low and the Break of Structure (BOS), then anchors the order block to the earliest still-valid candle that traded through that POC band. From there, it tracks all candles that continue to interact with that zone and overlays both 2D and 3D volume delta views directly inside the order block.
Unlike traditional order block tools that simply use candle bodies or wicks, this indicator is volume-aware. It lets you optionally pull volume from a lower timeframe feed (for example, using 1-minute data while watching a 5-minute chart) to build a much more accurate picture of how buyers and sellers actually traded inside the zone. This makes every block not just a price box, but a volume story: which side dominated, where, and by how much.
All order blocks printed by this indicator are confirmed: BOS and retests are evaluated strictly on closed candles. Nothing is drawn or alerted on partially formed bars, which helps avoid repaint-style flicker and keeps the signals clean and stable.
What is the theory behind the indicator?:
The core idea behind Order Blocks Volume Delta 3D is that not all price levels inside an order block are equal. Some prices are barely touched, while others act like magnets where candles repeatedly trade and heavy volume passes through.
The indicator first finds a swing high or swing low, waits for a clear Break of Structure (BOS), then scans the candles between the swing point and the BOS to find the price level that was touched the most. That level is treated as the POC.
From all candles in the swing-to-BOS range that interact with this POC band, the indicator looks for the earliest candle that is not already mitigated and uses that as the anchor candle for the order block:
The top of the block equals the anchor candle’s high (for a bearish OB) or the top of its wick zone.
The bottom equals the anchor candle’s low (for a bullish OB) or the bottom of its wick zone.
This “earliest valid POC-touching candle” rule makes it easier to visualize how price and volume developed from the very start of a meaningful zone, while ignoring POC touches that are already fully mitigated by the time the structure is confirmed. On top of that, each candle is split into bullish and bearish volume. If you choose a lower timeframe volume input, the tool aggregates lower timeframe candles into your chart timeframe, giving a more granular bull-versus-bear breakdown for each bar. The result is
an order block that not only shows where price moved but also which side pushed it, how aggressively, and how that balance shifted over time.
ORDER BLOCKS VOLUME DELTA 3D FEATURES:
The Order Blocks Volume Delta 3D indicator includes 4 main features:
1. Order Blocks
2. Volume Delta
3. 3D Visualization
4. Alerts
ORDER BLOCKS:
🔹What is an Order Block
An order block is a price zone where a clear displacement move began after liquidity was taken. It usually forms around the last consolidation or cluster of candles before price breaks structure with a strong move.
In this indicator, order blocks are defined as structured zones that:
Begin at the earliest unmitigated candle that interacted with the most-touched price level (POC) between swing and BOS.
Extend through the full wick range of that anchor candle.
Stretch forward in time, tracking how price continues to trade through, respect, retest, or invalidate the zone.
Are only printed once the BOS is fully confirmed on closed candles (confirmed order blocks only).
Example of bullish and bearish order blocks anchored at the earliest unmitigated candle in the POC zone:
🔹How are Order Blocks detected
The indicator uses a step-by-step, rules-based process to detect bullish and bearish order blocks. The logic is designed to match discretionary Smart Money concepts but with strict, repeatable rules.
Step 1: Detect swing highs and swing lows
Swing High: a candle whose high is higher than the highs of surrounding candles.
Swing Low: a candle whose low is lower than the lows of surrounding candles.
The Swing Length input controls how many candles are checked to the left and right.
Example of swing high and swing low detection:
Step 2: Confirm Break of Structure (BOS)
Once a swing is confirmed, the indicator waits for price to break past that swing:
Bullish BOS: price closes above a previous swing high.
Bearish BOS: price closes below a previous swing low.
To avoid “live” flicker, BOS logic is evaluated based on the previous closed candle. The order block is only confirmed once the BOS candle has fully closed and the next bar has opened. This is one of the reasons the script only shows confirmed, non-repainting order blocks.
Example of bullish BOS and bearish BOS:
Step 3: Build the POC range between swing and BOS
Between the swing candle and the BOS candle, the indicator:
Scans all candles in that range.
Tracks every price level touched using binning (POC bins).
Counts how many times each price band was touched by candle wicks.
The bin with the highest touch count becomes the POC band. This is where price traded most often, not necessarily where volume was highest.
Example of the POC band between swing and BOS.
Step 4 – Anchor the order block to the earliest valid POC candle
From all candles in the swing-to-BOS range, the indicator finds the earliest candle whose high/low overlaps the POC band and whose zone is not already mitigated. That candle becomes the anchor candle for the order block:
For a bearish OB, the block spans the anchor candle’s full wick range, with its top at the high.
For a bullish OB, the block spans the anchor candle’s full wick range, with its bottom at the low.
By requiring the anchor to be the earliest unmitigated interaction with POC, the script avoids building blocks from price action that has already been fully traded through and is less relevant.
Step 5: Extend and manage the order block
Once created, the block:
Extends to the right by a configurable number of candles (Extend Zones).
Continues until it is invalidated by wick or close, depending on the chosen method.
Can show retest labels when price revisits the zone after creation.
Is included or excluded from display depending on the Show Nearest and Hide Invalidated Zones settings.
Example of active and invalidated OB.
🔹Order Block Settings
◇ Swing Length
Swing Length controls how sensitive swing highs and lows are.
Lower Swing Length: Swings form more frequently, which leads to more frequent BOS events and order block formations.
Higher Swing Length: Only larger, more meaningful swings are detected, which leads to less frequent BOS events and less order block formations.
◇ Invalidation
Invalidation determines how an order block is considered “mitigated” or no longer valid.
Wick: For bullish OBs, if price wicks completely through the bottom of the zone, the order block is invalidated. For bearish OBs, if price wicks completely through the top, the order block is invalidated.
Close: For bullish OBs, the block is invalidated only when a candle closes below the bottom. For bearish OBs, it is invalidated only when a candle closes above the top.
Example of wick invalidation:
Example of close invalidation:
◇ Show Nearest
Show Nearest limits how many active order blocks are displayed based on proximity to current price. For example, a value of 2 will display only the two nearest bullish order blocks and two nearest bearish order blocks.
Chart with Show Nearest set to 3:
◇ Extend Zones
Extend Zones define how many candles forward each order block should project beyond the right most candle on the chart.
Chart with Extend Zones set to 10:
◇ Retest Labels
When enabled, the indicator prints labels on every clean retest of an active order block, as long as that block remains valid. Key points:
A retest label is only printed once the retest candle has fully closed – you always see confirmed retests, not intrabar tests.
Retest labels are positioned on the actual retest candle so you can visually see which bar interacted with the zone.
In addition, if multiple retests occur in quick succession, the indicator applies a built-in three-candle buffer between retests. That means only the first valid retest within each three-bar window is labeled (and can trigger an alert), helping to reduce clutter while still highlighting meaningful interactions with the zone.
Example of retest labels on bullish and bearish order blocks.
◇ Hide Invalidated Zones
Hide Invalidated Zones controls whether mitigated/invalidated blocks stay drawn.
Enabled: Only currently valid, unmitigated order blocks are shown (subject to Show Nearest)
Disabled: Both active and invalidated order blocks are displayed.
VOLUME DELTA:
🔹What is Volume Delta
Volume delta measures the difference between buying and selling volume. Instead of only showing “how much volume traded”, it separates volume into bullish and bearish components.
In this indicator:
Bullish volume = volume from candles (or lower timeframe candles) that closed higher.
Bearish volume = volume from candles that closed lower.
Delta % shows how dominant one side was compared to the total.
Example of bullish and bearish order blocks with volume delta and total volume.
🔹How is Volume Delta calculated?
The indicator uses a flexible, timeframe-aware volume engine.
1. Choose a Volume Delta Timeframe.
If the selected timeframe is equal to or higher than the chart timeframe, the indicator simply uses chart-volume per candle.
If the selected timeframe is lower than the chart timeframe (for example, 1‑minute volume on a 5‑minute chart), the indicator pulls all lower timeframe candles for each chart bar and sums them.
2. Split each bar into bull and bear volume.
For each contributing candle:
If close > open → its volume is added to bullish volume.
If close < open → its volume is added to bearish volume.
If close == open → its volume is split evenly between bullish and bearish.
3. Aggregate for each order block.
For each order block:
The indicator loops once from the swing candle to the BOS candle.
It records every candle that touches the POC band.
For each touching candle, it adds its bull and bear volumes (either directly from chart candles or from aggregated lower timeframe candles).
Total volume = bullish volume + bearish volume
Delta % = (bullish volume or bearish volume / total volume ) * 100, depending on which side is dominant.
🔹Volume Delta Settings:
◇ Display Style
Display Style controls how the volume delta is drawn inside each order block:
Horizontal:
Bullish and bearish fills extend horizontally from left to right.
The filled strip sits along the base of the block, with a bull vs bear gradient.
Vertical:
Bullish and bearish fills stretch vertically inside the zone.
The bullish percentage controls how much of the block is filled with the “dominant” color.
Example of Horizontal display style.
Example of Vertical display style.
◇ Volume Delta Timeframe
Volume Delta Timeframe tells the indicator whether to use chart volume or lower timeframe volume. When set to a lower timeframe, the indicator aggregates all lower timeframe candles that fall inside each chart bar, splitting their volume into bullish and bearish components before summing.
Using a lower timeframe:
Increases precision for how volume truly behaved inside each bar.
Helps reveal hidden absorption and aggressive flows that a higher timeframe candle might hide.
Example of volume delta based on chart timeframe.
Example of volume delta based on lower timeframe than chart(same OB as above)
◇ Display Total Volume
When enabled, the indicator prints the total volume for each order block as a label positioned inside the zone, near the bottom-right corner. This total is the sum of bullish and bearish volume used in the delta calculation and gives you a quick sense of how “heavy” the trading was in that block compared to others.
Example of total volume label inside multiple order blocks.
◇ Show Delta %
Show Delta % draws a small text label on the strip of the block that displays the dominant side’s percentage. For example, a bullish block might show “72%” if 72% of all volume inside that POC band came from bullish volume.
Example of Delta %:
3D VISUALIZATION:
The 3D Visualization feature turns each order block into a 3D plot.
🔹What the 3D Visualization does:
Wraps the order block with side faces and a top face to create a 3D bar effect.
Uses delta percentages to tilt the top face toward the dominant side.
Projects blocks into the future using Extend Zones, making the 3D blocks visually stand out.
🔹How it works:
The front face of the OB shows the standard 2D zone.
The side face extends forward in time based on the 3D depth setting.
The top face is angled depending on the Display Style and bull vs bear delta, making strong bullish blocks “rise” and strong bearish blocks “sink”.
🔹How the 3D depth setting affects visuals
Lower 3D depth:
Shorter side faces.
Subtle 3D effect.
Higher 3D depth:
Longer side faces projecting further into the future.
Stronger 3D effect that visually highlights key zones.
Example of lower 3D depth:
Example of higher 3D depth:
ALERTS:
The indicator supports alert conditions through TradingView’s AnyAlert() engine, allowing you to set alerts for the following:
New Bullish Order Block formed
New Bearish Order Block formed
Bullish OB Retest
Bearish OB Retest
Important alert behavior:
Order block alerts only fire when a new block is confirmed (after BOS closes and the next bar opens).
Retest alerts only fire when a retest candle has completely finished, matching the behavior of the visual retest labels.
IMPORTANT NOTES:
3D faces for order blocks are built using polylines. In some situations, especially when an order block’s starting point (its left edge) is beyond the chart’s left-most visible bar, the top 3D face may appear slightly irregular, skewed, or incomplete. This is purely a drawing limitation related to how the chart engine handles off-screen polyline points. Once the starting point of that order block comes into view (by zooming out or scrolling back), the 3D top face corrects itself and the visual becomes fully consistent. This issue affects only the 3D top face drawing, not the actual order-block box itself. The underlying zone, prices, and volume calculations remain accurate at all times.
If all conditions are met to create a new order block but the resulting zone would overlap an existing active order block, the new block is intentionally not created. A built-in guard prevents overlapping active zones to keep the structure clean and easier to interpret.
3D face drawing is implemented using an adaptive polyline method, which can be relatively calculation-heavy on certain symbols, timeframes, or chart histories. In some cases this may lead to calculation timeout error from TradingView.
UNIQUENESS:
This indicator is unique because it:
Anchors each order block to the earliest unmitigated candle that traded through the most-touched POC band between swing and BOS, rather than a generic “last up/down candle” or a random volume spike.
Builds a dedicated volume engine that can pull either chart timeframe volume or aggregated lower timeframe volume, then splits it into bull and bear components.
Adds 3D visualization on top of standard zones, turning each OB into a visually weighted slab rather than a flat rectangle.
Provides clean toggles (Show Nearest, Hide Invalidated Zones, Extend Zones, Display Style, Delta %, and total volume labels) so you can dial the indicator from extremely minimal to fully detailed, depending on your trading workflow.
Combined, these features make the indicator not just an order block plotter, but a complete volume‑informed structure tool tailored for traders who want to see where price actually traded and whether bulls or bears truly controlled the move inside each order block.






















