Fixed Volume ProfileFixed Volume Profile is a price-based volume tool.
Instead of showing volume over time (bottom of the chart), it shows where trading activity happened at each price level (on the side of the chart).
👉 In simple words, it answers:
“At which prices did the market trade the most?”
Key Features (Plain English)
1. Smooth Profile Shape (Polyline Style)
Traditional volume profiles use blocky histogram bars
T21 uses a smooth, filled polyline (mountain-like shape)
Cleaner, modern Orderflow-style visualization
How to read it:
Wide areas → High volume → Strong acceptance
Thin areas → Low volume → Weak acceptance (price moves fast here)
2. Fixed Time Range
You manually select a Start Date and End Date
The profile only calculates volume inside that time window
A gray background box shows:
Highest price
Lowest price
reached during that range
This lets you analyze:
A full trend
A range
A session
A specific market event
3. Key Levels (Most Important Part)
🟡 POC – Point of Control (Yellow Line)
The single price level with the highest traded volume
Often acts as a price magnet
Strong reference for balance vs imbalance
VAH / VAL – Value Area High & Low (Dashed Lines)
Encloses ~70% of total volume (default)
Represents Fair Value
Price acceptance usually happens inside this zone
Interpretation:
Above VAH → Acceptance higher
Below VAL → Acceptance lower
Inside VA → Balance / rotation
4. Clean Visual Design
POC, VAH, VAL lines extend fully across the profile box
Makes key levels easy to see at a glance
No clutter, focused on structure
Göstergeler ve stratejiler
Hazmeed HTF Candles Aligned)HTF Candles Overlay (v6, Aligned + Accurate Wicks)
This indicator overlays higher timeframe candles on your current chart.
It allows you to visually compare HTF price action directly on your lower timeframe chart without switching timeframes.
⭐ Features
Displays Higher Timeframe (HTF) candles on the current chart
Fully aligned to HTF candle start time
Option to show accurate wicks
Supports configurable:
HTF timeframe (e.g., 1D, 4H, 1W)
Number of HTF candles displayed
Candle width (in bars)
Bull/Bear colors and wick color
Performance Table: Standard DCA | Last 6-12-24-48MThis indicator visualizes Standard Dollar-Cost Averaging (DCA) performance across multiple time horizons (6M, 12M, 24M, 48M).
It summarizes invested capital, current portfolio value, net profit, and return percentage in a compact table, allowing quick comparison of short- and long-term DCA outcomes.
Designed for long-term investors, it helps evaluate how consistent periodic investments perform over time without relying on market timing.
The indicator is asset-agnostic and works on any symbol supported by TradingView.
Key use cases:
Long-term portfolio tracking
DCA strategy validation
Performance comparison across periods
Educational and analytical purposes
This tool focuses on clarity and realism, avoiding over-optimization and short-term noise.
--
I hope this table helps investors better understand long-term DCA performance.
Feedback and suggestions for improvement are always welcome.
BK AK-King Quazi🦁👑 BK AK–KING QUAZI — MEASURED HAND, CLEAN BLADE. 👑🦁
All glory to Gd — the true source of wisdom, restraint, and endurance.
AK is honor — my mentor’s standard: clarity, patience, no shortcuts, no gambling.
Update / Record: A previous version of this publication was hidden by PineCoders moderation due to insufficient description. This republish includes a fully self-contained explanation of what the script does, how it works, and how to use it.
1) What this script does (outputs)
BK AK–King Quazi is a Quasimodo (QM) structure manager that turns the pattern into a permissioned process:
PROTO → BOS proof → RETEST → CONFIRM → resolve or invalidate
On-chart you get:
Stage labels: P↑ / P↓ (PROTO), R↑ / R↓ (RETEST), C↑ / C↓ (CONFIRM), X (INVALIDATED), ✓ (TARGET HIT)
Execution map lines: QM, BOS, INV (invalidation)
Optional projection extension forward (QM/BOS/INV + optional T1/T2)
Optional entry zone around QM (ATR buffer)
MTF “War Room” table: 5 timeframes showing STATE and NOW (recent events)
This is not a “pattern sticker.” It’s a workflow + object lifecycle so outcomes are visible and charts stay clean.
2) Definitions (what each stage means)
PROTO (P): “Sweep + BOS candidate.” Early awareness that a QM setup is forming.
BOS (Break of Structure): requires a body displacement vs ATR (proof filter).
RETEST (R): price returns to the QM level and holds it (permission test).
CONFIRM (C): full QM geometry is complete (structure + proof + timing aligned).
INV: invalidation level. If breached, the pattern is failed and marked X.
Targets: optional T1/T2 mapped from selected target mode.
3) How it works (actual logic in plain English)
A) Swing engine (how structure is built)
The script uses a ZigZag-style swing detector based on lookbacks:
A “to_up” swing trigger occurs when high reaches the highest high over zz_len
A “to_down” swing trigger occurs when low reaches the lowest low over zz_len
Trend flips on those triggers and the script stores the last 3 swing points:
Highs: h2 → h1 → h0
Lows: l2 → l1 → l0
This creates repeatable swing structure without manual drawing.
B) BOS displacement filter (proof of intent)
A BOS is only accepted if the candle body displacement is large enough:
Displacement condition: abs(close - open) ≥ disp_used * ATR(atr_len)
disp_used can be:
Manual, or
Auto (TF Map), or
Auto (ATR%)
This is the “no wick theater” filter.
C) PROTO detection (sweep + BOS)
Bull PROTO fires when:
structure suggests a sweep (higher swing high behavior) and
price sweeps below a prior swing low, then BOS closes above h1 with displacement
Bear PROTO is the mirror:
sweep above a prior swing high, then BOS closes below l1 with displacement
On PROTO, the script defines the key levels:
Bull: QM = l1, BOS = h1, INV = current low
Bear: QM = h1, BOS = l1, INV = current high
D) RETEST + CONFIRM
RETEST checks the return to QM with a hold:
Bull retest: low ≤ QM and close ≥ QM
Bear retest: high ≥ QM and close ≤ QM
CONFIRM triggers only when the full swing sequence meets the “QM complete” rules (the script’s bu_conf / be_conf conditions).
E) Targets / projection math (if enabled)
Targets are optional:
Measured (1.0 / 1.618): uses the distance |BOS − QM| times multipliers
BOS + prior swing: uses BOS + prior swing extreme
Neck→Head (H&S projection): projects neck/head distance from BOS
F) Object lifecycle (keeps chart honest and readable)
If opposite PROTO appears, you can:
do nothing, or
clear projections, or
mark X + clear the prior campaign
On invalidation, the script replaces the existing P/C label with X (no overlapping junk)
On target hit, it can resolve the campaign and optionally remove projections/tags
4) MTF War Room (what the table means)
The table shows 5 user-selectable timeframes (TF1–TF5) with:
STATE: current posture on that TF (P↑, C↑, P↓, C↓, —)
NOW: highlights recent PROTO/CONFIRM events on that TF
Implementation note (what’s original here):
It computes zigzag + displacement inside each TF context
“NOW” flash timing is measured in that TF (not chart TF)
It packs NOW + RECENT + STAGE into one request.security() call per TF (performance-aware)
5) How to use it (clean execution workflow)
Suggested workflow (AK standard):
Use MTF first: don’t fight higher court structure
Treat PROTO as awareness, not permission
Require BOS displacement (proof)
Execute only on RETEST of QM or on your CONFIRM rules
Stop is INV (if INV breaks, mark X and stand down)
Use mapped T1/T2 for planning + resolution (no improvising mid-trade)
Label key:
P = Proto (sweep + BOS)
R = Retest (QM hold)
C = Confirm (full QM)
X = Invalidated (broke INV)
✓ = Target hit (T1/T2 resolution)
6) What’s original (why it’s not “another QM clone”)
Quasimodo is public. The originality here is the system around it:
staged sequencing (PROTO → BOS proof → RETEST → CONFIRM) instead of “shape = signal”
ATR displacement proof filter to cut fake BOS
standardized level mapping (QM/BOS/INV + targets + entry zone)
object lifecycle management (replace labels with X, clear/gray projections, remove on target)
MTF packed engine (one call per TF; “NOW” measured on that TF)
controlled alert routing by event type (PROTO vs CONFIRM)
7) Limitations (important)
This is bar-based structure logic; it can change during an unclosed realtime candle.
ZigZag swings are lookback-based, not a broker “official” swing definition.
It’s a structure/permission tool, not a guarantee engine.
🧑🏫 BK / AK / Faith
BK is the mark I’m building.
AK is honor — discipline, patience, clean execution.
All glory to Gd — the true source of wisdom and endurance.
🗡️ King David Lens (Deep — Discipline Under Fire)
David’s power wasn’t impulse. It was governed force — strength that answers to law.
He learned early that the most dangerous trap is moving before you’re sent.
That’s why his life is full of the same pattern traders ignore:
He was anointed long before he was crowned.
Meaning: truth can be real before it’s allowed to manifest.
He fought Goliath with a weapon people mocked — not because it was flashy, but because it was mastered.
Meaning: edge isn’t what looks impressive — it’s what’s trained and repeatable.
He had Saul in his hands and still refused the shortcut.
Meaning: opportunity is not permission; proximity is not assignment.
He waited through wilderness seasons where nothing “looked like progress.”
Meaning: silence isn’t rejection — sometimes it’s preparation.
That is the trader’s war.
Price will always offer motion.
But motion without permission is bait.
David didn’t survive by chasing what was available.
He survived by waiting until the moment was proved, the ground was chosen, and the strike was clean.
That’s what King Quazi enforces:
PROTO is the rumor.
BOS displacement is the proof.
Retest is the test of legitimacy.
Confirm is permission to strike.
Invalidation is humility — stand down immediately.
A lion doesn’t chase every shadow.
A lion waits until the prey is committed — then ends it.
🦁👑 BK AK–KING QUAZI — execute with proof. 👑🦁
Gd bless. 🙏
ICT Key Levels [BRZ]ICT Key Levels by Andyross
Session Liquidity
- Draws London (02:30 - 07:00) & Asia (18:00 - 02:30) high and low.
- Turns dotted when swept.
Opening Levels
- Shows key opening lines as taught by ICT
- Midnight open, NY 9:30 open, Weekly open, Monthly open.
@BearozTrading on Instagram
The Option Trader - PrashantThis indicator helps identify overall market direction and intraday bias in a simple and clear way.
It is designed to keep the chart clean while focusing on high-probability trading zones.
The logic works best for intraday trading and option selling strategies.
It helps traders stay on the right side of the market and avoid low-quality trades.
Suitable for index trading with a disciplined, rule-based approach.
Fibonacci Stochastic + HMA + EMA Fibonacci Stochastic + HMA + EMA
This indicator is designed to help identify trends and entry timing by combining three main indicators.
It filters out false signals and increases the accuracy of decision-making.
Key Components of the Indicator:
Hull Moving Average (HMA)
Shows the main price trend.
Green = Uptrend
Red = Downtrend
Used to confirm that the trade is following the market direction (Trend Following).
Fibonacci Stochastic
Measures the buying and selling pressure of the market.
Uses Fibonacci levels:
0.236 / 0.382 / 0.5 / 0.618 / 0.786
The system will interpret this as a Bullish/Bearish signal.
Used to find "entry points," not to predict highs or lows.
Display Results:
Green candlestick → Buy momentum
Red candlestick → Sell momentum
EMA Short/Long (Multi-Timeframe)
Uses EMA values from a smaller timeframe (e.g., 1 minute).
Compares short-term and long-term EMAs.
Used to confirm trend strength and short-term reversals.
EMA values are hidden by default for a cleaner chart.
Signal Conditions
BUY Signal
The system will give a BUY signal when:
The HMA trend is upward.
The short-term EMA is above the EMA average.
The Stochastic is in the bullish zone.
Display:
The word BUY is below the candlestick.
SELL Signal
The system will give a SELL signal when:
The HMA trend is downward.
The short-term EMA is below the EMA average.
The Stochastic is in the bearish zone.
Display:
The word SELL is above the candlestick.
Recommended Usage Approach
Suitable Timeframe
Scalping: 1m – 5m
Intraday: 5m – 15m
Trend Trade: 15m – 1h
Notes
Should be used in conjunction with:
Support / Resistance
Price Action
Risk Management
Volume Balance ZonesVolume Balance Zones
Volume Balance Zones is an indicator that visualizes directional volume balance over a user-defined lookback period.
The indicator evaluates volume based on candle direction to provide contextual insight into market participation around the current price area. Results are displayed as zones on the price chart.
Calculation Logic
Volume is calculated from the selected lookback period.
Volume is separated based on candle behavior:
Bullish Volume: Candles that close higher than they open.
Bearish Volume: Candles that close lower than they open.
Volume from each side is summed independently.
Visualization
Results are displayed as rectangular zones on the price chart.
Zone Length represents the relative dominance of volume.
The side with higher volume is displayed with a longer zone.
Zone Position:
Bearish volume zone is displayed above the current price.
Bullish volume zone is displayed below the current price.
ATR (Average True Range) is used to determine the vertical distance of the zones from price.
Usage Notes
This indicator is intended to provide market context only, such as:
Comparing relative bullish and bearish participation.
Identifying areas of directional volume concentration.
It should be used in conjunction with other forms of analysis such as:
Price action
Market structure
Support and resistance
This indicator does not provide trade entry or exit signals.
Inputs
Lookback
Number of previous bars used in volume calculation.
Lower values emphasize short-term activity, while higher values provide broader context.
Bar Width
Maximum horizontal length of the volume zones.
ATR Length
Used to calculate the distance between the zones and the current price.
Baskin Robbin Indicator by @MrwhyBTC Don't chase. Position
The edge isn't the coin it's knowing when the playbook flip
EMA 8 x EMA 80 Indicator Trend Filter for the 123 PatternEMA 8 x EMA 80 Indicator Trend Filter for the 123 Pattern
This indicator displays two Exponential Moving Averages EMA with 8 and 80 periods, designed to assist in trend identification and to act as a filter for trading the 123 buy and sell pattern.
General usage rules
123 Buy: recommended only when trading in an uptrend
123 Sell: recommended only when trading in a downtrend
Moving average filter
Buy setups 123 Buy tend to be more reliable when price is above the 80 period EMA
Sell setups 123 Sell tend to be more reliable when price is below the 8 period EMA
Neutral zone attention
The area between the EMA 8 and EMA 80 is considered a neutral zone
Trading the 123 pattern within this range is riskier, as it often indicates consolidation or lack of clear trend direction
Important disclaimer
This indicator does not generate buy or sell signals by itself. It should be used as a supporting tool, together with proper risk management, market context, and additional analysis.
This is not financial advice.
CRR Trend Conformator v1CRR Trend Conformator v1
CRR Trend Conformator v1 is a proprietary momentum-based trend confirmation oscillator designed to help analyze directional strength and structural momentum shifts in any market and timeframe.
This indicator uses a non-repainting Heikin-Ashi derived momentum engine, normalized with ATR, to visualize trend conformity through oscillator candles, zero-line transitions, and momentum expansion behavior.
Key Features
Normalized momentum oscillator with smooth adaptive behavior
Zero-line crossing logic to identify momentum phase shifts
Persistent trend state for visual conformity analysis
Structural swing-break detection for momentum continuation or failure
Fixed upper and lower zones for over-extension awareness
Clear momentum candle visualization in a separate indicator pane
Background highlighting during momentum break events
How to Use
Observe oscillator behavior around the zero line to assess momentum bias
Study momentum candles for strength, weakness, or consolidation
Use swing break highlights to understand momentum continuation dynamics
Zones help identify stretched or extreme momentum conditions
This tool is intended to support market analysis only and does not generate trade instructions.
Important Notes
Non-repainting logic (confirmed bars only)
Parameters are internally optimized and intentionally locked
Works across all instruments and timeframes
Designed for trend conformity and momentum structure study
Disclaimer
This indicator is provided for educational and analytical purposes only.
It does not constitute financial advice or a recommendation to buy or sell any instrument.
Users are responsible for their own trading decisions and risk management
Magnitude of MovementThie calculase the ratio between Mod of Open Price-Current Price and Mod of Open Volume and current volume
Chip Distribution Pro// This source code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org
// Enhanced Position Cost Distribution - Auto-adaptive with improved visualization
// Works with ETFs, commodities, forex, crypto, stocks - any instrument
// @version=5
indicator('Chip Distribution Pro', overlay = true, max_lines_count = 500, max_bars_back = 500)
//#region Inputs
string GRP_GENERAL = "General Settings"
int LOOKBACK = input.int(1000, 'Lookback Bars', maxval = 20000, minval = 500, step = 250, group = GRP_GENERAL)
int CHART_X_OFFSET = input.int(100, 'Chart Offset', step = 10, group = GRP_GENERAL)
int LABEL_X_OFFSET = CHART_X_OFFSET + 4
int CHART_MAX_WIDTH = input.int(80, 'Max Width', maxval = 500, minval = 10, step = 10, group = GRP_GENERAL)
int NUM_BUCKETS = input.int(400, 'Price Buckets', maxval = 500, minval = 50, step = 50, group = GRP_GENERAL)
string GRP_AUTO = "Auto-Tuning"
bool AUTO_TUNE = input.bool(true, 'Enable Auto-Tuning', group = GRP_AUTO,
tooltip = 'Automatically adjusts turnover rate based on volatility and volume characteristics')
float MANUAL_DECAY = input.float(0.1, 'Manual Turnover Rate', minval = 0.01, maxval = 0.5, step = 0.01, group = GRP_AUTO,
tooltip = 'Only used when Auto-Tuning is disabled')
int VOLATILITY_PERIOD = input.int(20, 'Volatility Period', minval = 5, maxval = 100, group = GRP_AUTO)
string GRP_VISUAL = "Visualization"
string COLOR_SCHEME = input.string("Rainbow", "Color Scheme", options = , group = GRP_VISUAL)
color PROFIT_COLOR_LIGHT = input.color(#26a69a, 'Profit Light', group = GRP_VISUAL)
color PROFIT_COLOR_DARK = input.color(#004d40, 'Profit Dark', group = GRP_VISUAL)
color LOSS_COLOR_LIGHT = input.color(#ef5350, 'Loss Light', group = GRP_VISUAL)
color LOSS_COLOR_DARK = input.color(#b71c1c, 'Loss Dark', group = GRP_VISUAL)
color CURRENT_PRICE_COLOR = input.color(color.yellow, 'Current Price', group = GRP_VISUAL)
color AVG_PRICE_COLOR = input.color(#2196F3, 'Average Cost', group = GRP_VISUAL)
color PEAK_COLOR = input.color(#FF9800, 'Peak Concentration', group = GRP_VISUAL)
color STATS_COLOR = input.color(#434651, 'Stats Background', group = GRP_VISUAL)
string GRP_LEVELS = "Key Levels"
bool SHOW_SUPPORT_RESISTANCE = input.bool(true, 'Show Support/Resistance Zones', group = GRP_LEVELS)
bool SHOW_PEAK = input.bool(true, 'Show Peak Concentration', group = GRP_LEVELS)
float SR_THRESHOLD = input.float(0.7, 'S/R Detection Threshold', minval = 0.3, maxval = 0.95, step = 0.05, group = GRP_LEVELS,
tooltip = 'Minimum concentration (relative to peak) to mark as support/resistance')
string GRP_SIGNALS = "Signals Panel"
bool SHOW_SIGNALS = input.bool(true, 'Show Signal Panel', group = GRP_SIGNALS)
bool SHOW_KEY_LEVELS = input.bool(true, 'Show Key Price Levels', group = GRP_SIGNALS)
bool SHOW_TREND_ARROW = input.bool(true, 'Show Trend Arrow', group = GRP_SIGNALS)
bool SHOW_PRESSURE_BAR = input.bool(true, 'Show Pressure Bar', group = GRP_SIGNALS)
// Colors for key levels
color SUPPORT_COLOR = input.color(#00E676, 'Support Level', group = GRP_LEVELS)
color RESISTANCE_COLOR = input.color(#FF5252, 'Resistance Level', group = GRP_LEVELS)
color BREAKOUT_COLOR = input.color(#FFD600, 'Breakout Level', group = GRP_LEVELS)
//#endregion
//#region Candle Type
type Candle
int idx
float hi
float lo
float vol
float relativeVol
float atrPct
//#endregion
//#region PCD Type
type PCD
array candles
float minPrice
float maxPrice
float priceStep
array lines
label currentPriceLabel
label avgPriceLabel
label peakLabel
label statsLabel
label signalLabel
array srZones
float calculatedTurnover
// New visualization elements
line supportLine
line resistanceLine
line avgCostLine
label trendArrow
box pressureBar
box pressureFill
label pressureLabel
// Create a new price label
newPriceLabel(color bg, color txtColor) =>
label.new(0, 0, '', style = label.style_label_left, color = bg, textcolor = txtColor, size = size.small)
// Create a new PCD instance
newPCD() =>
array lns = array.new(NUM_BUCKETS)
for i = 0 to NUM_BUCKETS - 1
array.set(lns, i, line.new(0, 0, 0, 0))
PCD.new(
candles = array.new(0),
lines = lns,
currentPriceLabel = newPriceLabel(color.new(#00BCD4, 0), color.white),
avgPriceLabel = newPriceLabel(AVG_PRICE_COLOR, color.white),
peakLabel = newPriceLabel(PEAK_COLOR, color.white),
statsLabel = label.new(0, 0, '', style = label.style_label_up, size = size.small,
textalign = text.align_left, color = color.new(STATS_COLOR, 20), textcolor = color.white),
signalLabel = label.new(0, 0, '', style = label.style_label_left, size = size.small,
textalign = text.align_left, color = color.new(#1a1a2e, 20), textcolor = color.white),
srZones = array.new(0),
calculatedTurnover = 0.1,
minPrice = na,
maxPrice = na,
priceStep = na,
supportLine = line.new(0, 0, 0, 0, color = SUPPORT_COLOR, width = 2, style = line.style_dashed),
resistanceLine = line.new(0, 0, 0, 0, color = RESISTANCE_COLOR, width = 2, style = line.style_dashed),
avgCostLine = line.new(0, 0, 0, 0, color = AVG_PRICE_COLOR, width = 2, style = line.style_dotted),
trendArrow = label.new(0, 0, '', style = label.style_label_center, size = size.large, textcolor = color.white),
pressureBar = box.new(0, 0, 0, 0, bgcolor = color.new(#424242, 50), border_color = color.gray),
pressureFill = box.new(0, 0, 0, 0, bgcolor = color.green, border_color = na),
pressureLabel = label.new(0, 0, '', style = label.style_label_right, size = size.tiny, color = color.new(#000000, 100), textcolor = color.white))
// Auto-calculate turnover rate based on instrument characteristics
calcAdaptiveTurnover(float atrPct, float volRatio) =>
float safeAtrPct = na(atrPct) or atrPct <= 0 ? 0.02 : atrPct
float safeVolRatio = na(volRatio) or volRatio <= 0 ? 1.0 : volRatio
float volBasedTurnover = math.max(0.03, math.min(0.3, safeAtrPct * 3))
float volAdjustment = math.max(0.5, math.min(2.0, safeVolRatio))
float turnover = volBasedTurnover * volAdjustment
math.max(0.02, math.min(0.4, turnover))
// Store candle method
method storeCandle(PCD this, int barIdx, float hiPrice, float loPrice, float volVal, float avgVol, float atrPct) =>
if not na(hiPrice) and not na(loPrice) and not na(volVal) and volVal > 0
float safeAvgVol = na(avgVol) or avgVol <= 0 ? volVal : avgVol
float relVol = volVal / safeAvgVol
float safeAtrPct = na(atrPct) ? 0.02 : atrPct
bool modified = false
int candleSize = array.size(this.candles)
if candleSize > 0
Candle c = array.get(this.candles, candleSize - 1)
if c.idx == barIdx
c.hi := hiPrice
c.lo := loPrice
c.vol := volVal
c.relativeVol := relVol
c.atrPct := safeAtrPct
modified := true
if not modified
Candle c = Candle.new(barIdx, hiPrice, loPrice, volVal, relVol, safeAtrPct)
array.push(this.candles, c)
this.minPrice := na(this.minPrice) ? loPrice : math.min(this.minPrice, loPrice)
this.maxPrice := na(this.maxPrice) ? hiPrice : math.max(this.maxPrice, hiPrice)
float priceRange = this.maxPrice - this.minPrice
this.priceStep := priceRange > 0 ? priceRange / NUM_BUCKETS : 0.0001
// Get bucket index for price
method getBucketIndex(PCD this, float price) =>
if na(this.priceStep) or this.priceStep <= 0 or na(this.minPrice)
0
else
int idx = int(math.floor((price - this.minPrice) / this.priceStep))
math.max(0, math.min(idx, NUM_BUCKETS - 1))
// Get price for bucket index
method getBucketedPrice(PCD this, int bucketIdx) =>
int safeIndex = math.max(0, math.min(bucketIdx, NUM_BUCKETS - 1))
float safeStep = na(this.priceStep) or this.priceStep <= 0 ? 0.0001 : this.priceStep
float safeMin = na(this.minPrice) ? 0.0 : this.minPrice
(safeIndex + 0.5) * safeStep + safeMin
// Get rainbow color based on position (0.0 = bottom/red, 1.0 = top/violet)
getRainbowColor(float position, float intensityRatio) =>
float pos = math.max(0.0, math.min(1.0, position))
int transparency = int(math.round((1.0 - intensityRatio) * 50))
// Rainbow spectrum: red -> orange -> yellow -> green -> cyan -> blue -> violet
if pos < 0.166
color.new(color.from_gradient(pos, 0.0, 0.166, #FF0000, #FF7F00), transparency)
else if pos < 0.333
color.new(color.from_gradient(pos, 0.166, 0.333, #FF7F00, #FFFF00), transparency)
else if pos < 0.5
color.new(color.from_gradient(pos, 0.333, 0.5, #FFFF00, #00FF00), transparency)
else if pos < 0.666
color.new(color.from_gradient(pos, 0.5, 0.666, #00FF00, #00FFFF), transparency)
else if pos < 0.833
color.new(color.from_gradient(pos, 0.666, 0.833, #00FFFF, #0000FF), transparency)
else
color.new(color.from_gradient(pos, 0.833, 1.0, #0000FF, #8B00FF), transparency)
// Get color based on scheme and intensity
getColor(bool isProfitable, float intensity, float maxIntensity, int bucketIdx) =>
float safeMax = maxIntensity > 0 ? maxIntensity : 1.0
float ratio = math.max(0.0, math.min(1.0, intensity / safeMax))
float positionRatio = bucketIdx / math.max(1.0, NUM_BUCKETS - 1.0)
if COLOR_SCHEME == "Rainbow"
getRainbowColor(positionRatio, ratio)
else if COLOR_SCHEME == "Gradient"
if isProfitable
color.from_gradient(ratio, 0.0, 1.0, PROFIT_COLOR_DARK, PROFIT_COLOR_LIGHT)
else
color.from_gradient(ratio, 0.0, 1.0, LOSS_COLOR_DARK, LOSS_COLOR_LIGHT)
else if COLOR_SCHEME == "Heatmap"
color.from_gradient(ratio, 0.0, 1.0, #1a237e, #f44336)
else
if isProfitable
color.new(#5d606b, int(math.round((1.0 - ratio) * 70)))
else
color.new(#e91e63, int(math.round((1.0 - ratio) * 70)))
// Update method
method update(PCD this) =>
int candleCount = array.size(this.candles)
if candleCount > 0 and not na(this.priceStep) and this.priceStep > 0
// Create distribution array
array dist = array.new_float(NUM_BUCKETS, 0.0)
// Process each candle
for candleIdx = 0 to candleCount - 1
Candle candle = array.get(this.candles, candleIdx)
bool isFirstCandle = candleIdx == 0
float turnover = AUTO_TUNE ? calcAdaptiveTurnover(candle.atrPct, candle.relativeVol) : MANUAL_DECAY * candle.relativeVol
turnover := math.min(turnover, 0.95)
this.calculatedTurnover := turnover
int startIdx = this.getBucketIndex(candle.lo)
int endIdx = this.getBucketIndex(candle.hi)
int buckets = math.max(1, endIdx - startIdx + 1)
if isFirstCandle
float initialWeight = 1.0 / buckets
for i = startIdx to endIdx
array.set(dist, i, initialWeight)
else
float decayedAmount = 0.0
for i = 0 to NUM_BUCKETS - 1
float oldVal = array.get(dist, i)
float newVal = oldVal * (1.0 - turnover)
array.set(dist, i, newVal)
decayedAmount += oldVal - newVal
float addPerBucket = decayedAmount / buckets
for i = startIdx to endIdx
array.set(dist, i, array.get(dist, i) + addPerBucket)
// Normalize distribution
float totalWeight = 0.0
for i = 0 to NUM_BUCKETS - 1
totalWeight += array.get(dist, i)
if totalWeight > 0
for i = 0 to NUM_BUCKETS - 1
array.set(dist, i, array.get(dist, i) / totalWeight)
// Find peak
float maxWeight = array.max(dist)
if na(maxWeight) or maxWeight <= 0
maxWeight := 0.001
int peakIndex = array.indexof(dist, maxWeight)
if peakIndex < 0
peakIndex := 0
float peakPrice = this.getBucketedPrice(peakIndex)
// Find support/resistance zones
array srIndices = array.new(0)
if SHOW_SUPPORT_RESISTANCE
bool inZone = false
int zoneStart = 0
for i = 0 to NUM_BUCKETS - 1
bool isHighConcentration = array.get(dist, i) >= maxWeight * SR_THRESHOLD
if isHighConcentration and not inZone
inZone := true
zoneStart := i
else if not isHighConcentration and inZone
inZone := false
array.push(srIndices, int(math.floor((zoneStart + i) / 2)))
if inZone
array.push(srIndices, int(math.floor((zoneStart + NUM_BUCKETS - 1) / 2)))
// Clear old SR zones
int srZoneSize = array.size(this.srZones)
if srZoneSize > 0
for i = 0 to srZoneSize - 1
box b = array.get(this.srZones, i)
box.set_lefttop(b, 0, 0)
box.set_rightbottom(b, 0, 0)
// Draw the distribution
float lowestDisplayedPrice = na
float highestDisplayedPrice = na
for i = 0 to NUM_BUCKETS - 1
float weight = array.get(dist, i)
float price = (i + 0.5) * this.priceStep + this.minPrice
int width = int(math.round(weight / maxWeight * CHART_MAX_WIDTH))
line ln = array.get(this.lines, i)
if width > 0
if na(lowestDisplayedPrice)
lowestDisplayedPrice := price
highestDisplayedPrice := price
int x1 = bar_index + CHART_X_OFFSET
int x2 = x1 - width
bool isProfitable = price < close
color c = getColor(isProfitable, weight, maxWeight, i)
line.set_xy1(ln, x1, price)
line.set_xy2(ln, x2, price)
line.set_color(ln, c)
else
line.set_xy1(ln, 0, 0)
line.set_xy2(ln, 0, 0)
// Draw S/R zones
if SHOW_SUPPORT_RESISTANCE
int srCount = array.size(srIndices)
int leftBar = math.max(0, bar_index - LOOKBACK)
if srCount > 0
for i = 0 to srCount - 1
int idx = array.get(srIndices, i)
float zonePrice = this.getBucketedPrice(idx)
float zoneHalfHeight = this.priceStep * 3
box b = na
if i < array.size(this.srZones)
b := array.get(this.srZones, i)
box.set_lefttop(b, leftBar, zonePrice + zoneHalfHeight)
box.set_rightbottom(b, bar_index, zonePrice - zoneHalfHeight)
else
b := box.new(leftBar, zonePrice + zoneHalfHeight, bar_index, zonePrice - zoneHalfHeight, bgcolor = color.new(PEAK_COLOR, 85), border_color = color.new(PEAK_COLOR, 60))
array.push(this.srZones, b)
// Calculate cumulative distribution
array cumdist = array.copy(dist)
for i = 1 to NUM_BUCKETS - 1
array.set(cumdist, i, array.get(cumdist, i - 1) + array.get(cumdist, i))
// Highlight current price
int closeIndex = this.getBucketIndex(close)
if closeIndex >= 0 and closeIndex < NUM_BUCKETS
line.set_color(array.get(this.lines, closeIndex), CURRENT_PRICE_COLOR)
// Calculate stats
float totalShares = array.get(cumdist, NUM_BUCKETS - 1)
int profitIndex = math.min(closeIndex + 1, NUM_BUCKETS - 1)
float profitRatio = totalShares > 0 ? array.get(cumdist, profitIndex) / totalShares : 0.0
// Calculate average price
float avg = 0.0
for i = 0 to NUM_BUCKETS - 1
float weight = array.get(dist, i)
float price = this.getBucketedPrice(i)
avg += price * weight
int avgIndex = this.getBucketIndex(avg)
if avgIndex >= 0 and avgIndex < NUM_BUCKETS
line.set_color(array.get(this.lines, avgIndex), AVG_PRICE_COLOR)
// Peak concentration - highlight line
if SHOW_PEAK and peakIndex >= 0 and peakIndex < NUM_BUCKETS
line.set_color(array.get(this.lines, peakIndex), PEAK_COLOR)
// Smart label positioning - avoid overlaps
float priceRange = na(highestDisplayedPrice) or na(lowestDisplayedPrice) ? close * 0.01 : (highestDisplayedPrice - lowestDisplayedPrice)
float minLabelSpacing = priceRange * 0.025
// Sort prices and assign staggered X offsets
float currentY = close
float avgY = avg
float peakY = peakPrice
// Adjust avg label if too close to current
if math.abs(avgY - currentY) < minLabelSpacing
avgY := currentY > avgY ? avgY - minLabelSpacing : avgY + minLabelSpacing
// Adjust peak label if too close to current or avg
if SHOW_PEAK
if math.abs(peakY - currentY) < minLabelSpacing
peakY := currentY > peakY ? peakY - minLabelSpacing : peakY + minLabelSpacing
if math.abs(peakY - avgY) < minLabelSpacing
peakY := avgY > peakY ? peakY - minLabelSpacing : peakY + minLabelSpacing
// Position price labels - compact format, right side of distribution
label.set_text(this.currentPriceLabel, str.format('{0,number,#.##}', close))
label.set_xy(this.currentPriceLabel, bar_index + LABEL_X_OFFSET + 2, close)
label.set_style(this.currentPriceLabel, label.style_label_left)
label.set_size(this.currentPriceLabel, size.tiny)
label.set_text(this.avgPriceLabel, str.format('{0,number,#.##} AVG', avg))
label.set_xy(this.avgPriceLabel, bar_index + LABEL_X_OFFSET + 2, avgY)
label.set_style(this.avgPriceLabel, label.style_label_left)
label.set_size(this.avgPriceLabel, size.tiny)
if SHOW_PEAK
label.set_text(this.peakLabel, str.format('{0,number,#.##} PEAK', peakPrice))
label.set_xy(this.peakLabel, bar_index + LABEL_X_OFFSET + 2, peakY)
label.set_style(this.peakLabel, label.style_label_left)
label.set_size(this.peakLabel, size.tiny)
// Calculate ranges safely
float safeTotalShares = totalShares > 0 ? totalShares : 1.0
int idx05 = array.binary_search_leftmost(cumdist, safeTotalShares * 0.05)
int idx95 = array.binary_search_leftmost(cumdist, safeTotalShares * 0.95)
int idx15 = array.binary_search_leftmost(cumdist, safeTotalShares * 0.15)
int idx85 = array.binary_search_leftmost(cumdist, safeTotalShares * 0.85)
float ninetyPctLow = this.getBucketedPrice(idx05)
float ninetyPctHigh = this.getBucketedPrice(idx95)
float seventyPctLow = this.getBucketedPrice(idx15)
float seventyPctHigh = this.getBucketedPrice(idx85)
float rangeDenom = ninetyPctHigh - ninetyPctLow
float rangeOverlap = rangeDenom != 0 ? (seventyPctHigh - seventyPctLow) / rangeDenom : 0.0
// Calculate chip concentration
float concentration = rangeOverlap * 100
string concentrationDesc = concentration < 50 ? "High" : concentration < 70 ? "Medium" : "Dispersed"
// Pressure analysis
float safeAvg = avg > 0 ? avg : close
float priceVsAvg = ((close - safeAvg) / safeAvg) * 100
string pressure = priceVsAvg > 5 ? "Strong Bullish" : priceVsAvg > 1 ? "Bullish" :
priceVsAvg < -5 ? "Strong Bearish" : priceVsAvg < -1 ? "Bearish" : "Neutral"
// Price vs Peak
float safePeak = peakPrice > 0 ? peakPrice : close
float priceVsPeak = ((close - safePeak) / safePeak) * 100
string peakRelation = close > peakPrice ? "Above Peak" : close < peakPrice ? "Below Peak" : "At Peak"
// Stats panel - positioned at bottom, compact
float displayedRange = na(highestDisplayedPrice) or na(lowestDisplayedPrice) ? close * 0.02 : highestDisplayedPrice - lowestDisplayedPrice
label.set_text(this.statsLabel, str.format(
'90%: {0,number,#.##} - {1,number,#.##} | 70%: {2,number,#.##} - {3,number,#.##}',
ninetyPctLow, ninetyPctHigh, seventyPctLow, seventyPctHigh))
if not na(lowestDisplayedPrice) and displayedRange > 0
label.set_y(this.statsLabel, lowestDisplayedPrice - displayedRange * 0.05)
label.set_style(this.statsLabel, label.style_label_up)
label.set_x(this.statsLabel, bar_index + CHART_X_OFFSET - 30)
label.set_size(this.statsLabel, size.tiny)
// Signal panel - hidden (info moved to trend arrow and pressure bar)
label.set_text(this.signalLabel, "")
label.set_xy(this.signalLabel, bar_index, close)
// === NEW PROFESSIONAL VISUALIZATIONS ===
// 1. Key Level Lines - Support, Resistance, and Average Cost extending across chart
if SHOW_KEY_LEVELS
int chartLeft = math.max(0, bar_index - LOOKBACK)
int chartRight = bar_index + CHART_X_OFFSET - 5
// Average cost line (horizontal dotted blue line)
line.set_xy1(this.avgCostLine, chartLeft, avg)
line.set_xy2(this.avgCostLine, chartRight, avg)
line.set_color(this.avgCostLine, AVG_PRICE_COLOR)
// Find strongest support (highest concentration below current price)
float strongestSupport = na
float strongestSupportWeight = 0.0
float strongestResistance = na
float strongestResistanceWeight = 0.0
for i = 0 to NUM_BUCKETS - 1
float bucketPrice = this.getBucketedPrice(i)
float bucketWeight = array.get(dist, i)
if bucketPrice < close and bucketWeight > strongestSupportWeight
strongestSupport := bucketPrice
strongestSupportWeight := bucketWeight
if bucketPrice > close and bucketWeight > strongestResistanceWeight
strongestResistance := bucketPrice
strongestResistanceWeight := bucketWeight
// Support line (green dashed)
if not na(strongestSupport)
line.set_xy1(this.supportLine, chartLeft, strongestSupport)
line.set_xy2(this.supportLine, chartRight, strongestSupport)
line.set_color(this.supportLine, SUPPORT_COLOR)
else
line.set_xy1(this.supportLine, bar_index, close)
line.set_xy2(this.supportLine, bar_index, close)
line.set_color(this.supportLine, color.new(SUPPORT_COLOR, 100))
// Resistance line (red dashed)
if not na(strongestResistance)
line.set_xy1(this.resistanceLine, chartLeft, strongestResistance)
line.set_xy2(this.resistanceLine, chartRight, strongestResistance)
line.set_color(this.resistanceLine, RESISTANCE_COLOR)
else
line.set_xy1(this.resistanceLine, bar_index, close)
line.set_xy2(this.resistanceLine, bar_index, close)
line.set_color(this.resistanceLine, color.new(RESISTANCE_COLOR, 100))
// 2. Trend Direction Arrow
if SHOW_TREND_ARROW
string trendSymbol = priceVsAvg > 5 ? "▲▲" : priceVsAvg > 1 ? "▲" :
priceVsAvg < -5 ? "▼▼" : priceVsAvg < -1 ? "▼" : "◆"
color trendColor = priceVsAvg > 5 ? color.new(#00E676, 0) : priceVsAvg > 1 ? color.new(#4CAF50, 0) :
priceVsAvg < -5 ? color.new(#FF1744, 0) : priceVsAvg < -1 ? color.new(#EF5350, 0) : color.new(#9E9E9E, 0)
string trendText = trendSymbol + " " + pressure
label.set_text(this.trendArrow, trendText)
float arrowY = na(highestDisplayedPrice) ? close : highestDisplayedPrice + displayedRange * 0.12
label.set_xy(this.trendArrow, bar_index + CHART_X_OFFSET - 40, arrowY)
label.set_color(this.trendArrow, color.new(trendColor, 70))
label.set_textcolor(this.trendArrow, trendColor)
label.set_size(this.trendArrow, size.large)
// 3. Pressure Bar (Profit/Loss ratio visualization)
if SHOW_PRESSURE_BAR
float barWidth = 8.0
float barHeight = displayedRange * 0.25
float barX = bar_index + CHART_X_OFFSET + 5
float barTop = na(highestDisplayedPrice) ? close + barHeight/2 : highestDisplayedPrice - displayedRange * 0.02
float barBottom = barTop - barHeight
// Background bar
box.set_lefttop(this.pressureBar, int(barX), barTop)
box.set_rightbottom(this.pressureBar, int(barX + barWidth), barBottom)
box.set_bgcolor(this.pressureBar, color.new(#424242, 60))
// Fill based on profit ratio (green from bottom)
float fillHeight = barHeight * profitRatio
float fillTop = barBottom + fillHeight
color fillColor = profitRatio > 0.7 ? color.new(#00E676, 30) :
profitRatio > 0.5 ? color.new(#4CAF50, 30) :
profitRatio > 0.3 ? color.new(#FFC107, 30) : color.new(#FF5252, 30)
box.set_lefttop(this.pressureFill, int(barX), fillTop)
box.set_rightbottom(this.pressureFill, int(barX + barWidth), barBottom)
box.set_bgcolor(this.pressureFill, fillColor)
// Pressure label
string pressureText = str.format('{0,number,#}%', profitRatio * 100)
label.set_text(this.pressureLabel, pressureText)
label.set_xy(this.pressureLabel, int(barX - 1), barTop + displayedRange * 0.01)
label.set_textcolor(this.pressureLabel, fillColor)
//#endregion
//#region Main
= request.security(syminfo.tickerid, 'D', , lookahead = barmerge.lookahead_off)
float atrPercent = dailyClose > 0 ? dailyATR / dailyClose : 0.02
if timeframe.in_seconds(timeframe.period) <= timeframe.in_seconds('D')
var PCD pcd = newPCD()
if last_bar_index - bar_index < LOOKBACK
pcd.storeCandle(dailyBarIdx, dailyHigh, dailyLow, dailyVolume, avgVolume, atrPercent)
if barstate.islast
pcd.update()
//#endregion
Wickless indicator, Kunno wick strategy indicator
shows 9 candle validity line, and all wickless candles that show up for visual ease
XAUUSD Lot Size Calculator1. What This Indicator Does
This tool is a Visual Risk Management System. Instead of using a calculator on your phone or switching tabs, it allows you to calculate the exact lot size for your trade directly on the TradingView chart by dragging lines.
It automates the math for:
Lot Size: How big your position should be to risk exactly X% of your account.
Take Profit: Where your target should be based on your Risk-to-Reward ratio.
Safety Checks: It warns you if your stop loss is too tight for the minimum lot size (0.01).
2. Visual Features
🔴 The Red Line (Stop Loss): This is your interactive line. You can grab it with your mouse and drag it to your desired invalidation point (e.g., below a support wick).
🟢 The Green Line (Take Profit): This line moves automatically. You cannot drag it. It calculates where your Take Profit must be to satisfy your Risk:Reward ratio (Default 1:1) based on where you placed the Red line.
⚫ The Info Table: A high-contrast black box in the corner that displays your calculated Lot Size, Risk amount, and Trade direction (Long/Short).
3. How to Use It (Step-by-Step)
Step 1: Initial Setup
When you first add the indicator to the chart, you need to tell it about your account:
Double-click the Black Table (or the Red Line) to open Settings.
Inputs Tab:
Account Balance: Enter your current trading balance (e.g., 10,000).
Risk %: Enter how much you want to lose per trade (e.g., 1.0%).
Contract Size: Keep this at 100 for Gold (XAUUSD) or standard Forex pairs.
Risk : Reward Ratio: Set your target (e.g., 1.0 for 1:1, or 2.0 for 1:2).
Step 2: Planning a Trade
Look at the chart and identify where you want to enter (current price) and where you want your Stop Loss.
Find the Red Line on your chart. (If you don't see it, go to Settings and change "Stop Loss Level" to a price near the current candle).
Click and Drag the Red Line to your specific Stop Loss price.
Step 3: Reading the Signals
Direction: If you drag the Red Line below the price, the table shows LONG. If you drag it above, it shows SHORT.
Lot Size: Read the big green number in the table (e.g., 0.55). This is the exact lot size you should enter in your broker.
TP Target: Look at the Green Line on the chart. That is your exit price.
Step 4: The "Orange Warning"
If you place your Stop Loss very close to the entry, or if your account is small, the math might suggest a lot size smaller than is possible (e.g., 0.004).
The table text will turn ORANGE.
The Lot Size will stick to 0.01 (the minimum).
The "Risk ($)" row will show you the actual risk. (Example: Instead of risking your desired $100, you might be forced to risk $105 because you can't trade smaller than 0.01 lots).
Professional Price Action AnalysisProfessional Price Action Analysis - Advanced S/R & Pattern Detection
A comprehensive technical analysis tool combining dynamic support/resistance zones, candlestick pattern recognition, trend analysis, and volume insights.
KEY FEATURES:
✓ Dynamic Support & Resistance Zones
- Automatically identifies swing highs/lows
- Classifies levels based on current price position
- Support zones display BELOW price (green)
- Resistance zones display ABOVE price (red)
- Adjustable zone thickness and lookback period
✓ Candlestick Pattern Detection
- Bullish/Bearish Engulfing patterns
- Pin bars (reversal signals)
- Inside bars (consolidation)
- Rejection candles (wick analysis)
- Visual markers on chart with labels
✓ Trend Analysis
- Customizable moving average (default 50-period SMA)
- Background color zones for trend direction
- Price vs MA percentage calculation
- Bullish/Bearish/Neutral classification
✓ Volume Analysis
- Volume spike detection (configurable multiplier)
- Highlights unusual volume with bar colors
- Helps identify institutional activity
✓ Information Dashboard
- Clean, readable display (top-right corner)
- Current trend status
- Distance to nearest support/resistance
- Volume status (High/Normal)
- Price deviation from moving average
✓ Alert System
- Alerts for all candlestick patterns
- Volume spike notifications
- Customizable alert conditions
CUSTOMIZABLE INPUTS:
• Swing detection length (3-50 bars)
• S/R lookback period (20-200 bars)
• Zone thickness percentage
• Maximum zones displayed
• Trend MA length
• Volume spike multiplier
• Toggle individual pattern types
BEST FOR:
- Swing traders identifying key levels
- Day traders spotting reversal patterns
- Price action enthusiasts
- Multi-timeframe analysis
This indicator does not repaint. All signals are confirmed after candle close. Suitable for all markets: stocks, forex, crypto, commodities.
Educational tool for technical analysis. Not financial advice.
Analyze**Smart Money & OB Finder (MTF)** is a professional trading indicator designed to help traders identify high-probability **Buy Zones and Sell Zones** based on **Smart Money Concepts (SMC)** and **Order Blocks (OB)** across multiple timeframes.
This indicator automatically marks **institutional Order Blocks**, allowing traders to see where **big players enter the market**, instead of chasing price in the middle of nowhere.
### 🔍 Key Features
• Automatic **Buy & Sell Order Block detection**
• **Multi-Timeframe (MTF)** analysis for higher-timeframe confirmation
• Clear **zone marking** (no late signals, no repaint)
• Works on **all markets** (Forex, Gold, Indices, Crypto)
• Suitable for **scalping, intraday, and swing trading**
### 🎯 How to Use
• Mark zones on higher timeframe (H1 / H4)
• Execute entries on lower timeframe (M5 / M15)
• Use Order Blocks as **reaction areas**, not ins
FXWMarkets.comFXWMarkets.com is a next‑generation trading ecosystem built for traders who demand clarity, speed, and institutional‑grade insights. Our mission is to empower global traders with advanced analytics, multi‑asset research, and AI‑enhanced market intelligence — all delivered through a modern, intuitive platform designed for real‑world performance.
We combine professional‑level tools, transparent market analysis, and cutting‑edge technology to help traders navigate Forex, commodities, indices, and crypto with confidence.
At FXWMarkets.com, we believe in precision, reliability, and trader‑first innovation.
🚀 Join FXWMarkets.com — Be Part of the Launch
Become one of the first to join FXWMarkets.com and unlock exclusive early‑access benefits.
We’re preparing to launch a powerful new trading platform — and early members will receive priority access, premium insights, and a chance to earn a 100% bonus at launch.
Don’t miss the opportunity to be part of a platform built for serious traders.
👉 Join us today at FXWMarkets.com and secure your advantage before the doors open.
Trailing Stoploss % BasedA minimalistic trend-following indicator that plots a single trailing line based on a user-defined percentage using price highs and lows.
The line:
Trails price in trends
Moves only in the direction of the trend
Flattens when price is not making new highs or lows
Acts as support in uptrends and resistance in downtrends
Useful on all instruments and all timeframes for clean trend tracking and trailing stop management.
Adaptive RSI [BOSWaves]Adaptive RSI - Percentile-Based Momentum Detection with Dynamic Regime Thresholds
Overview
Adaptive RSI is a self-calibrating momentum oscillator that identifies overbought and oversold conditions through historical percentile analysis, constructing dynamic threshold boundaries that adjust to evolving market volatility and momentum characteristics.
Instead of relying on traditional fixed RSI levels (30/70 or 20/80) or static overbought/oversold zones, regime detection, threshold placement, and signal generation are determined through rolling percentile calculation, smoothed momentum measurement, and divergence pattern recognition.
This creates adaptive boundaries that reflect actual momentum distribution rather than arbitrary fixed levels - tightening during low-volatility consolidation periods, widening during trending environments, and incorporating divergence analysis to reveal momentum exhaustion or continuation patterns.
Momentum is therefore evaluated relative to its own historical context rather than universal fixed thresholds.
Conceptual Framework
Adaptive RSI is founded on the principle that meaningful momentum extremes emerge relative to recent price behavior rather than at predetermined numerical levels.
Traditional RSI implementations identify overbought and oversold conditions using fixed thresholds that remain constant regardless of market regime, often generating premature signals in strong trends or missing reversals in range-bound markets. This framework replaces static threshold logic with percentile-driven adaptive boundaries informed by actual momentum distribution.
Three core principles guide the design:
Threshold placement should correspond to historical momentum percentiles, not fixed numerical levels.
Regime detection must adapt to current market volatility and momentum characteristics.
Divergence patterns reveal momentum exhaustion before price reversal becomes visible.
This shifts oscillator analysis from universal fixed levels into adaptive, context-aware regime boundaries.
Theoretical Foundation
The indicator combines smoothed RSI calculation, rolling percentile tracking, adaptive threshold construction, and multi-pattern divergence detection.
A Hull Moving Average (HMA) pre-smooths the price source to reduce noise before RSI computation, which then undergoes optional post-smoothing using configurable moving average types. Confirmed oscillator values populate a rolling historical buffer used for percentile calculation, establishing upper and lower thresholds that adapt to recent momentum distribution. Regime state persists until the oscillator crosses the opposing threshold, preventing whipsaw during consolidation. Pivot detection identifies swing highs and lows in both price and oscillator values, enabling regular divergence pattern recognition through comparative analysis.
Five internal systems operate in tandem:
Smoothed Momentum Engine : Computes HMA-preprocessed RSI with optional post-smoothing using multiple MA methodologies (SMA, EMA, HMA, WMA, DEMA, RMA, LINREG, TEMA).
Historical Buffer Management : Maintains a rolling array of confirmed oscillator values for percentile calculation with configurable lookback depth.
Percentile Threshold Calculation : Determines upper and lower boundaries by extracting specified percentile values from sorted historical distribution.
Persistent Regime Detection : Establishes bullish/bearish/neutral states based on threshold crossings with state persistence between signals.
Divergence Pattern Recognition : Identifies regular bullish and bearish divergences through synchronized pivot analysis of price and oscillator values with configurable range filtering.
This design allows momentum interpretation to adapt to market conditions rather than reacting mechanically to universal thresholds.
How It Works
Adaptive RSI evaluates momentum through a sequence of self-calibrating processes:
Source Pre-Smoothing: Input price undergoes 4-period HMA smoothing to reduce bar-to-bar noise before oscillator calculation.
RSI Calculation: Standard RSI computation applied to smoothed source over configurable length period.
Optional Post-Smoothing: Raw RSI value undergoes additional smoothing using selected MA type and length for cleaner regime detection.
Historical Buffer Population: Confirmed oscillator values accumulate in a rolling array with size limit determined by adaptive lookback parameter.
Percentile Threshold Extraction: Array sorts on each bar to calculate upper percentile (bullish threshold) and lower percentile (bearish threshold) values.
Regime State Persistence: Bullish regime activates when oscillator crosses above upper threshold, bearish regime activates when crossing below lower threshold, neutral regime persists until directional threshold breach.
Pivot Identification: Swing highs and lows detected in both oscillator and price using configurable left/right parameters.
Divergence Pattern Matching: Compares pivot relationships between price and oscillator within min/max bar distance constraints to identify regular bullish (price LL, oscillator HL) and bearish (price HH, oscillator LH) divergences.
Together, these elements form a continuously updating momentum framework anchored in statistical context.
Interpretation
Adaptive RSI should be interpreted as context-aware momentum boundaries:
Bullish Regime (Blue): Activated when oscillator crosses above upper percentile threshold, indicating momentum strength relative to recent distribution favors upside continuation.
Bearish Regime (Red): Established when oscillator crosses below lower percentile threshold, identifying momentum weakness relative to recent distribution favors downside continuation.
Upper Threshold Line (Blue)**: Dynamic resistance level calculated from upper percentile of historical oscillator distribution - adapts higher during trending markets, lower during ranging conditions.
Lower Threshold Line (Red): Dynamic support level calculated from lower percentile of historical oscillator distribution - adapts lower during downtrends, higher during consolidation.
Regime Fill: Gradient coloring between oscillator and baseline (50) visualizes current momentum intensity - stronger color indicates greater distance from neutral.
Extreme Bands (15/85): Upper and lower extreme zones with strength-modulated transparency reveal momentum extremity - darker shading during powerful moves, lighter during moderate momentum.
Divergence Lines: Connect price and oscillator pivots when divergence pattern detected, appearing on both price chart and oscillator pane for confluence identification.
Reversal Markers (✦): Diamond signals appear at 80+ (bearish extreme) and sub-15 (bullish extreme) levels, marking potential exhaustion zones independent of regime state.
Percentile context, divergence confirmation, and regime persistence outweigh isolated oscillator readings.
Signal Logic & Visual Cues
Adaptive RSI presents four primary interaction signals:
Regime Switch - Long : Oscillator crosses above upper percentile threshold after previously being in bearish or neutral regime, suggesting momentum strength shift favoring bullish continuation.
Regime Switch - Short : Oscillator crosses below lower percentile threshold after previously being in bullish or neutral regime, indicating momentum weakness shift favoring bearish continuation.
Regular Bullish Divergence (𝐁𝐮𝐥𝐥) : Price forms lower low while oscillator forms higher low, revealing positive momentum divergence during downtrends - often precedes reversal or consolidation.
Regular Bearish Divergence (𝐁𝐞𝐚𝐫) : Price forms higher high while oscillator forms lower high, revealing negative momentum divergence during uptrends - often precedes reversal or correction.
Alert generation covers regime switches, threshold crossings, and divergence detection for systematic monitoring.
Strategy Integration
Adaptive RSI fits within momentum-informed and mean-reversion trading approaches:
Adaptive Regime Following : Use threshold crossings as primary trend inception signals where momentum confirms directional breakouts within statistical context.
Divergence-Based Reversals : Enter counter-trend positions when divergence patterns appear at extreme oscillator levels (above 80 or below 20) for high-probability mean-reversion setups.
Threshold-Aware Scaling : Recognize that tighter percentile spreads (e.g., 45/50) generate more signals suitable for ranging markets, while wider spreads (e.g., 30/70) filter for stronger trend confirmation.
Extreme Zone Confluence : Combine reversal markers (✦) with divergence signals for maximum-conviction exhaustion entries.
Multi-Timeframe Regime Alignment : Apply higher-timeframe regime context to filter lower-timeframe entries, taking only setups aligned with dominant momentum direction.
Smoothing Optimization : Increase smoothing length in choppy markets to reduce false signals, decrease in trending markets for faster response.
Technical Implementation Details
Core Engine : HMA-preprocessed RSI with configurable smoothing (SMA, HMA, EMA, WMA, DEMA, RMA, LINREG, TEMA)
Adaptive Model : Rolling percentile calculation over confirmed oscillator values with size-limited historical buffer
Threshold Construction : Linear interpolation percentile extraction from sorted distribution array
Regime Detection : State-persistent threshold crossing logic with confirmed bar validation
Divergence Engine : Pivot-based pattern matching with range filtering and duplicate prevention
Visualization : Gradient-filled regime zones, adaptive threshold lines, strength-modulated extreme bands, dual-pane divergence lines
Performance Profile : Optimized for real-time execution with efficient array management and minimal computational overhead
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Micro-structure momentum detection for scalping and intraday reversals
15 - 60 min : Intraday regime identification with divergence-validated turning points
4H - Daily : Swing and position-level momentum analysis with macro divergence context
Suggested Baseline Configuration:
RSI Length : 18
Source : Close
Smooth Oscillator : Enabled
Smoothing Length : 20
Smoothing Type : SMA
Adaptive Lookback : 1000
Upper Percentile : 50
Lower Percentile : 45
Divergence Pivot Left : 15
Divergence Pivot Right : 15
Min Pivot Distance : 5
Max Pivot Distance : 60
These suggested parameters should be used as a baseline; their effectiveness depends on the asset's volatility profile, momentum characteristics, and preferred signal frequency, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Too many whipsaw signals : Widen percentile spread (e.g., 40/60 instead of 45/50) to demand stronger momentum confirmation, or increase "Smoothing Length" to filter noise.
Missing legitimate regime changes : Tighten percentile spread (e.g., 48/52 instead of 45/50) for earlier detection, or decrease "Smoothing Length" for faster response.
Oscillator too choppy : Increase "Smoothing Length" for cleaner readings, or switch "Smoothing Type" to RMA/TEMA for heavier smoothing.
Thresholds not adapting properly : Reduce "Adaptive Lookback" to emphasize recent behavior (500-800 bars), or increase it for more stable thresholds (1500-2000 bars).
Too many divergence signals : Increase "Pivot Left/Right" values to demand stronger swing confirmation, or widen "Min Pivot Distance" to space out detections.
Missing significant divergences : Decrease "Pivot Left/Right" for faster pivot detection, or increase "Max Pivot Distance" to compare more distant swings.
Prefer different momentum sensitivity : Adjust "RSI Length" - lower values (10-14) for aggressive response, higher values (21-28) for smoother trend confirmation.
Divergences appearing too late : Reduce "Pivot Right" parameter to detect divergences closer to current price action.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Markets with mean-reverting characteristics and consistent momentum cycles
Instruments where momentum extremes reliably precede reversals or consolidations
Ranging environments where percentile-based thresholds adapt to volatility contraction
Divergence-driven strategies targeting momentum exhaustion before price confirmation
Reduced Effectiveness:
Extremely strong trending markets where oscillator remains persistently extreme
Low-liquidity environments with erratic momentum readings
News-driven or gapped markets where momentum disconnects from price temporarily
Markets with regime shifts faster than adaptive lookback can recalibrate
Integration Guidelines
Confluence : Combine with BOSWaves structure, volume analysis, or traditional support/resistance
Threshold Respect : Trust signals that occur after clean threshold crossings with sustained momentum
Divergence Context : Prioritize divergences appearing at extreme oscillator levels (80+/15-) over those in neutral zones
Regime Awareness : Consider whether current market regime matches historical momentum patterns used for calibration
Multi-Pattern Confirmation : Seek divergence patterns coinciding with reversal markers or threshold rejections for maximum conviction
Disclaimer
Adaptive RSI is a professional-grade momentum and divergence analysis tool. It uses percentile-based threshold calculation that adapts to recent market behavior but cannot predict future regime shifts or guarantee reversal timing. Results depend on market conditions, parameter selection, lookback period appropriateness, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates price structure, volume context, and comprehensive risk management.






















