Indikator

Indikator

Indikator

LONG MARKET CONTROL SPY / VIX / DXYHere's an English description you can use for the indicator (e.g., for the TradingView publishing page or as a header comment):
---
**LONG MARKET CONTROL – SPY / VIX / DXY**
A composite U.S. market regime indicator built for long-only trading decisions. It scores overall market conditions from 0–100 by combining SPY trend/structure/momentum, VIX fear-level and rate-of-change, and DXY dollar-direction dynamics, then applies a correlation adjustment based on how the three interact (e.g., full risk-on, classic risk-off, or the more dangerous "U.S. asset stress" pattern where stocks fall, VIX rises, and the dollar falls at the same time — money leaving U.S. assets without fleeing to the dollar as a safe haven).
**What it does:**
- Calculates a 0–100 Market Score (SPY worth up to 50 pts, VIX up to 30, DXY up to 20, plus a correlation adjustment of −10 to +5) and classifies the market into five color-coded regimes: Strong Risk-On, Selective Long, Caution, Risk-Off, and Market Veto — each with a suggested maximum position size.
- Detects a **Market Veto** state (hard stop on new longs) using six independent trigger conditions (breakdown below the 150-day MA, VIX spike above 30, high-volume breakdown of the 20-day low, etc.), shown with a red background and a dedicated alert.
- Tracks a separate **Recovery Score** (0–20) after panic/veto conditions to flag early recovery, confirmed recovery, and prevents the score from jumping straight from red to dark green in a single day.
- Measures **market breadth** (RSP, IWM, QQQ vs. SPY) to flag narrow, mega-cap-driven rallies.
- Ranks all 11 S&P sector ETFs (XLK, XLC, XLY, XLF, XLI, XLE, XLB, XLV, XLP, XLU, XLRE) by relative strength vs. SPY and surfaces the top 3 / bottom 3 leaders.
- A built-in **"Where To Look"** engine translates the current SPY/VIX/DXY combination into a plain-language suggestion of which asset classes or sectors typically show relative strength in that regime (e.g., gold/silver/miners during "U.S. asset stress," defensives during classic risk-off, tech/growth during full risk-on).
- On-chart dashboard table, background/label state markers, and 17 built-in alert conditions with fully dynamic alert text (state, score, prices, top sectors, recommended position size).
All core calculations run on **daily data** via `request.security()` regardless of the chart's timeframe, with an option to use only confirmed (closed) daily bars to avoid repainting.
*For educational and analytical purposes only — not financial advice. All symbols and thresholds are user-configurable via the Inputs panel.*
**LONG MARKET CONTROL – SPY / VIX / DXY**
אינדיקטור למצב השוק האמריקאי, מיועד לקבלת החלטות מסחר בלונג בלבד. הוא נותן ציון שוק בין 0 ל־100 על סמך שילוב של מגמת SPY (מבנה מחיר ומומנטום), רמת הפחד ב־VIX וקצב השינוי שלו, וכיוון הדולר לפי DXY — ולאחר מכן מפעיל התאמת קורלציה לפי האופן שבו שלושת הגורמים משפיעים זה על זה (למשל Risk-On מלא, Risk-Off קלאסי, או המצב המסוכן ביותר — "U.S. Asset Stress" — שבו מניות יורדות, VIX עולה והדולר יורד בו־זמנית, כלומר כסף בורח מנכסים אמריקאיים בלי לברוח לדולר כמקלט).
**מה האינדיקטור עושה:**
- מחשב ציון שוק בין 0 ל־100 (SPY עד 50 נקודות, VIX עד 30, DXY עד 20, בתוספת התאמת קורלציה בין מינוס 10 לפלוס 5), ומסווג את השוק לחמישה מצבים צבעוניים: Strong Risk-On, Selective Long, Caution, Risk-Off ו־Market Veto — כל אחד עם המלצת גודל פוזיציה מקסימלי.
- מזהה מצב **Market Veto** (עצירה מוחלטת לכניסות לונג חדשות) לפי שישה תנאים עצמאיים (שבירת MA150, קפיצת VIX מעל 30, שבירת שפל 20 יום בווליום גבוה ועוד), עם רקע אדום ו־Alert נפרד.
- עוקב אחרי **Recovery Score** נפרד (0–20) לאחר מצבי פאניקה/Veto, מסמן התאוששות ראשונית והתאוששות מאושרת, ומונע קפיצה ישירה מאדום לירוק כהה תוך יום אחד.
- מודד **רוחב שוק** (RSP, IWM, QQQ מול SPY) כדי לזהות עליות "צרות" המבוססות על מעט מניות ענק.
- מדרג את 11 סקטורי ה־S&P (XLK, XLC, XLY, XLF, XLI, XLE, XLB, XLV, XLP, XLU, XLRE) לפי חוזקה יחסית מול SPY, ומציג את 3 המובילים ו־3 החלשים.
- מנוע **"Where To Look"** מובנה שמתרגם את שילוב ה־SPY/VIX/DXY הנוכחי להמלצה בשפה פשוטה על אילו נכסים או סקטורים נוטים להראות חוזקה יחסית באותו מצב (למשל זהב/כסף/כורים ב־"U.S. Asset Stress", דפנסיביים ב־Risk-Off קלאסי, טכנולוגיה וצמיחה ב־Risk-On מלא).
- טבלת דשבורד על הגרף, סימוני רקע ותוויות מעבר מצב, ו־17 תנאי Alert מובנים עם טקסט דינמי מלא (מצב, ציון, מחירים, סקטורים מובילים, גודל פוזיציה מומלץ).
כל החישובים המרכזיים רצים על **נתוני Daily** דרך `request.security()` ללא תלות בטיימפריים של הגרף, עם אפשרות להשתמש רק בנרות יומיים סגורים כדי למנוע Repainting.
*למטרות לימוד וניתוח בלבד — אין לראות בכך ייעוץ השקעות. כל הסמלים והספים ניתנים להתאמה אישית דרך פאנל ה־Inputs.* Indikator

Indikator

T4T Balanced Price Range (BPR)A Balanced Price Range is one of the most overlooked yet reliable zones in Smart Money Concept - and this indicator finds them for you automatically, with precision.
When price displaces aggressively in one direction and leaves a Fair Value Gap, then displaces back in the opposite direction and leaves an opposing FVG, the area where two gaps overlap is a BPR. That overlap represents price territory that has been delivered in both directions. - buyside and sellside imbalances rebalance against each other. When Price returns to this zone, it frequently reacts with speed, making the BPR a high-sensitivity support/resistance level and refined entry area for continuation setups.
Most traders mark the full range of both FVG's and wonder why their zones are sloppy. This indicator draws only the shared overlap - the true BPR - nothing more.
What it does
Automatically detects bullish and bearish FVG's in real time and pairs opposing gaps that share price territory within your chosen window
Draws only the intersection of the two gaps, with a clean equilibrium midline for precise entry refinement
Classifies each BPR by the direction of the rebalancing displacement: BPR+ (support) and BPR- (resistance), labeled at the leading edge of the zone
Tracks mitigation - a bullish BPR is invalidated on a break below its low, a bearish on a break above, with you choice of close-based or wick based triggers
Optionally keeps mitigated zones on the chart, dimmed, so you can review how price treated them
BPR's shine as retracement entries in trending conditions. After a BPR forms, wait for price to trade back into the zone - the midline is your refinement level - and look for your confirmation there, targeting the liquidity the displacement was reaching for.Because the zones has been delivered in both directions, a clean breakthrough it is information too: it signals the rebalance failed and the opposing side is in control.
Trade the zone, not the noise. Quality over quantity - structure over ego.
"Patience Pays" Indikator

LIQS and FIBS Scalp SystemOverview
The "LIQS and FIBS Scalp System" is an advanced Smart Money Concepts (SMC) and Price Action indicator designed for traders seeking high-probability scalping and day trading setups. Instead of relying on lagging indicators, this system dynamically maps critical liquidity sweeps, structure shifts, and optimal trade entry zones based entirely on pure price action.
Key Features
HTF Market Structure Bias (No EMA Lag):
The core of the system determines the main trend bias by tracking the most recent Break of Structure (BOS) or Change of Character (CHoCH) on your selected Higher Timeframe (HTF). If the HTF just broke a swing high, your bias is firmly Bullish. If it broke a swing low, your bias is Bearish. This ensures you are always trading in alignment with true institutional market structure, not a delayed moving average.
HTF Sweeps & Reversals:
Automatically identifies liquidity sweeps at Higher Timeframe highs and lows. It monitors price action around these key historical pivot levels and highlights potential reversal pinbars right at the sweep zones.
LTF BOS & CHoCH Logic:
Detects micro Break of Structure (BOS) and Change of Character (CHoCH) patterns to spot short-term momentum shifts in real-time, helping you catch the very beginning of a new leg.
Deep Fibonacci Setups & Runner Targets:
Following a valid CHoCH, the indicator automatically draws Fibonacci retracement zones (0.318 - 0.618) representing optimal entry points. It dynamically projects logical Stop Loss zones and extends up to Target 6 for runners to capture massive long-term trends:
Target 1 & Target 2 for short-term scalps.
Target 3 & Target 4 (3.618 - 4.236 extensions) for day trades.
Target 5 & Target 6 (5.618 - 6.854 extensions) to hold your runners and ride extreme trend continuation.
A-Plus Setup Filter & VWAP:
To protect you from fake breakouts and low-probability trades, the system validates every entry.
Pro-trend setups that align with both the HTF Structure Bias and the VWAP are highlighted with colored entry and target boxes.
Counter-trend or low-probability setups are visually muted (grayed out) so you can easily ignore them.
Built-in alerts notify you only when a micro CHoCH perfectly aligns with the HTF trend direction!
How to Use
Wait for price to sweep an HTF liquidity level, watch for a valid CHoCH in the opposite direction, and set your limit orders inside the highlighted 0.318 - 0.618 Fibonacci reaction box. Trust the colored boxes (A-Plus setups) and ignore the gray ones. Take partial profits at T1 and T2, then leave runners for the deeper T3 to T6 targets!
Disclaimer
This script is provided for educational and informational purposes only and does not constitute financial advice. Trading in financial markets involves a high degree of risk and may not be suitable for all investors. Past performance is not indicative of future results. Always conduct your own research, use strict risk management, and perform thorough backtesting before trading with real funds. Indikator

MAGALHAES NEOWAVE ONDA 3 PRO//@version=6
indicator(
title="MAGALHAES NEOWAVE ONDA 3 PRO",
shorttitle="NEOWAVE O3 PRO",
overlay=true,
max_lines_count=500,
max_labels_count=500
)
//==================================================
// 1. MOTOR DA ESTRUTURA
//==================================================
grupoMotor = "1. Motor da Estrutura"
inicioLeitura = input.time(
defval=timestamp("01 Jan 2024 00:00 +0000"),
title="Iniciar/Reiniciar leitura em",
confirm=true,
group=grupoMotor
)
forcaPivot = input.int(
defval=5,
title="Força do pivô",
minval=2,
maxval=30,
group=grupoMotor
)
hipoteseCorrecao = input.string(
defval="Onda 2",
title="Correção analisada",
options= ,
group=grupoMotor
)
retracaoMinima = input.float(
defval=0.236,
title="Retração mínima para validar",
minval=0.05,
maxval=1.00,
step=0.001,
group=grupoMotor
)
fibIdealMinimo = input.float(
defval=0.382,
title="Início da região Fibonacci válida",
minval=0.05,
maxval=1.00,
step=0.001,
group=grupoMotor
)
fibIdealMaximo = input.float(
defval=0.886,
title="Fim da região Fibonacci válida",
minval=0.05,
maxval=1.50,
step=0.001,
group=grupoMotor
)
invalidarEm100 = input.bool(
defval=true,
title="Invalidar se fechar além de 100%",
group=grupoMotor
)
scoreMinimo = input.int(
defval=80,
title="Índice mínimo de confirmação",
minval=40,
maxval=100,
step=20,
group=grupoMotor
)
//==================================================
// 2. TEMPO NEOWAVE
//==================================================
grupoTempo = "2. Tempo NeoWave"
relacaoMinimaTempo = input.float(
defval=1.00,
title="Tempo mínimo da correção",
minval=0.10,
maxval=5.00,
step=0.05,
group=grupoTempo
)
relacaoIdealInicio = input.float(
defval=1.50,
title="Início da janela temporal ideal",
minval=0.20,
maxval=6.00,
step=0.05,
group=grupoTempo
)
relacaoIdealFim = input.float(
defval=2.00,
title="Fim da janela temporal ideal",
minval=0.30,
maxval=8.00,
step=0.05,
group=grupoTempo
)
//==================================================
// 3. VISUALIZAÇÃO
//==================================================
grupoVisual = "3. Visualização"
mostrarPainel = input.bool(true, "Mostrar painel", group=grupoVisual)
mostrarBase = input.bool(true, "Mostrar movimento direcional", group=grupoVisual)
mostrarCorrecao = input.bool(true, "Mostrar correção", group=grupoVisual)
mostrarFibonacci = input.bool(true, "Mostrar Fibonacci", group=grupoVisual)
mostrarAlvos = input.bool(true, "Mostrar alvos", group=grupoVisual)
mostrarSinal = input.bool(true, "Mostrar sinal da próxima onda", group=grupoVisual)
mostrarFundo = input.bool(false, "Colorir fundo temporal", group=grupoVisual)
//==================================================
// 4. NÍVEIS
//==================================================
grupoNiveis = "4. Níveis"
usar236 = input.bool(true, "23,6%", group=grupoNiveis)
usar382 = input.bool(true, "38,2%", group=grupoNiveis)
usar500 = input.bool(true, "50,0%", group=grupoNiveis)
usar618 = input.bool(true, "61,8%", group=grupoNiveis)
usar705 = input.bool(true, "70,5%", group=grupoNiveis)
usar786 = input.bool(true, "78,6%", group=grupoNiveis)
usar810 = input.bool(true, "81,0%", group=grupoNiveis)
usar854 = input.bool(true, "85,4%", group=grupoNiveis)
usar886 = input.bool(true, "88,6%", group=grupoNiveis)
usar100 = input.bool(true, "100,0%", group=grupoNiveis)
//==================================================
// 5. CORES
//==================================================
grupoCores = "5. Cores"
corAlta = input.color(color.lime, "Direcional de alta", group=grupoCores)
corBaixa = input.color(color.red, "Direcional de baixa", group=grupoCores)
corCorrecao = input.color(color.orange, "Correção", group=grupoCores)
corFibo = input.color(color.aqua, "Fibonacci", group=grupoCores)
corIdeal = input.color(color.yellow, "Janela temporal ideal", group=grupoCores)
corConfirmacao = input.color(color.green, "Próxima onda confirmada", group=grupoCores)
corAlvo = input.color(color.fuchsia, "Alvos", group=grupoCores)
//==================================================
// 6. FUNÇÕES
//==================================================
f_tempo(float minutos) =>
string texto = "AGUARDANDO"
if not na(minutos)
int dias = int(math.floor(minutos / 1440.0))
int horas = int(math.floor((minutos % 1440.0) / 60.0))
int mins = int(math.floor(minutos % 60.0))
if dias > 0
texto := str.tostring(dias) + "d " + str.tostring(horas) + "h " + str.tostring(mins) + "m"
else if horas > 0
texto := str.tostring(horas) + "h " + str.tostring(mins) + "m"
else
texto := str.tostring(mins) + "m"
texto
f_percentual(float valor) =>
na(valor) ? "AGUARDANDO" : str.tostring(valor * 100.0, "#.##") + "%"
f_relacao(float valor) =>
na(valor) ? "AGUARDANDO" : str.tostring(valor, "#.##") + "x"
f_preco(float valor) =>
na(valor) ? "-" : str.tostring(valor, format.mintick)
f_simNao(bool condicao) =>
condicao ? "SIM" : "NÃO"
f_nivelRetracao(float inicio, float fim, float percentual) =>
fim - ((fim - inicio) * percentual)
f_nomeProximaOnda(string tipoCorrecao) =>
string nome = "ONDA C"
if tipoCorrecao == "Onda 2"
nome := "ONDA 3"
else if tipoCorrecao == "Onda 4"
nome := "ONDA 5"
nome
f_direcaoTexto(int direcao) =>
string texto = "AGUARDANDO"
if direcao == 1
texto := "ALTA"
else if direcao == -1
texto := "BAIXA"
texto
//==================================================
// 7. PIVÔS CONFIRMADOS
//==================================================
float pivotTopo = ta.pivothigh(high, forcaPivot, forcaPivot)
float pivotFundo = ta.pivotlow(low, forcaPivot, forcaPivot)
float novoPivotPreco = na
int novoPivotBar = na
int novoPivotTempo = na
int novoPivotTipo = 0
if not na(pivotTopo) and na(pivotFundo)
novoPivotPreco := pivotTopo
novoPivotBar := bar_index - forcaPivot
novoPivotTempo := time
novoPivotTipo := 1
else if not na(pivotFundo) and na(pivotTopo)
novoPivotPreco := pivotFundo
novoPivotBar := bar_index - forcaPivot
novoPivotTempo := time
novoPivotTipo := -1
//==================================================
// 8. ESTADOS
//==================================================
// 0 = procurando movimento direcional
// 1 = correção ativa
// 2 = próxima onda iniciada
var int estado = 0
//==================================================
// 9. MEMÓRIA DO ÚLTIMO PIVÔ
//==================================================
var float ultimoPivotPreco = na
var int ultimoPivotBar = na
var int ultimoPivotTempo = na
var int ultimoPivotTipo = 0
//==================================================
// 10. MOVIMENTO DIRECIONAL TRAVADO
//==================================================
var float baseInicioPreco = na
var float baseFimPreco = na
var int baseInicioBar = na
var int baseFimBar = na
var int baseInicioTempo = na
var int baseFimTempo = na
var int direcaoBase = 0
var float tempoBase = na
var float amplitudeBase = na
//==================================================
// 11. CORREÇÃO
//==================================================
var float extremoCorrecao = na
var int extremoCorrecaoBar = na
var int extremoCorrecaoTempo = na
var float retracaoMaxima = na
var bool correcaoValidada = false
var int finalCorrecaoTempo = na
var int confirmacaoBar = na
var float confirmacaoPreco = na
//==================================================
// 12. OBJETOS
//==================================================
var line linhaBase = na
var line linhaCorrecao = na
var line linhaRetomada = na
var label labelInicio = na
var label labelFim = na
var label labelCorrecao = na
var label labelConfirmacao = na
var line linhasFibo = array.new_line()
var label labelsFibo = array.new_label()
var line linhasAlvo = array.new_line()
var label labelsAlvo = array.new_label()
//==================================================
// 13. LIMPEZA DOS NÍVEIS
//==================================================
f_limparFibo() =>
int totalLinhas = array.size(linhasFibo)
if totalLinhas > 0
for i = 0 to totalLinhas - 1
line.delete(array.get(linhasFibo, i))
int totalLabels = array.size(labelsFibo)
if totalLabels > 0
for i = 0 to totalLabels - 1
label.delete(array.get(labelsFibo, i))
array.clear(linhasFibo)
array.clear(labelsFibo)
f_limparAlvos() =>
int totalLinhas = array.size(linhasAlvo)
if totalLinhas > 0
for i = 0 to totalLinhas - 1
line.delete(array.get(linhasAlvo, i))
int totalLabels = array.size(labelsAlvo)
if totalLabels > 0
for i = 0 to totalLabels - 1
label.delete(array.get(labelsAlvo, i))
array.clear(linhasAlvo)
array.clear(labelsAlvo)
//==================================================
// 14. DESENHO DE FIBONACCI
//==================================================
f_desenharFibo(float precoNivel, string nome, bool habilitado) =>
if habilitado and mostrarFibonacci and not na(precoNivel) and not na(baseFimBar)
line novaLinha = line.new(
x1=baseFimBar,
y1=precoNivel,
x2=bar_index + 25,
y2=precoNivel,
xloc=xloc.bar_index,
extend=extend.right,
color=corFibo,
style=line.style_dashed,
width=1
)
label novoLabel = label.new(
x=bar_index,
y=precoNivel,
text=nome + " " + f_preco(precoNivel),
xloc=xloc.bar_index,
yloc=yloc.price,
style=label.style_label_left,
color=color.new(corFibo, 78),
textcolor=corFibo,
size=size.tiny
)
array.push(linhasFibo, novaLinha)
array.push(labelsFibo, novoLabel)
//==================================================
// 15. DESENHO DOS ALVOS
//==================================================
f_desenharAlvo(float precoAlvo, string nome) =>
if mostrarAlvos and not na(precoAlvo) and not na(confirmacaoBar)
line novaLinha = line.new(
x1=confirmacaoBar,
y1=precoAlvo,
x2=bar_index + 30,
y2=precoAlvo,
xloc=xloc.bar_index,
extend=extend.right,
color=corAlvo,
style=line.style_dotted,
width=2
)
label novoLabel = label.new(
x=bar_index,
y=precoAlvo,
text=nome + " " + f_preco(precoAlvo),
xloc=xloc.bar_index,
yloc=yloc.price,
style=label.style_label_left,
color=color.new(corAlvo, 75),
textcolor=corAlvo,
size=size.small
)
array.push(linhasAlvo, novaLinha)
array.push(labelsAlvo, novoLabel)
//==================================================
// 16. IDENTIFICAÇÃO DO MOVIMENTO DIRECIONAL
//==================================================
bool leituraAtiva = time >= inicioLeitura
if leituraAtiva and estado == 0 and novoPivotTipo != 0 and novoPivotTempo >= inicioLeitura
if na(ultimoPivotPreco)
ultimoPivotPreco := novoPivotPreco
ultimoPivotBar := novoPivotBar
ultimoPivotTempo := novoPivotTempo
ultimoPivotTipo := novoPivotTipo
else if novoPivotTipo == ultimoPivotTipo
bool pivotMaisExtremo = novoPivotTipo == 1 ? novoPivotPreco > ultimoPivotPreco : novoPivotPreco < ultimoPivotPreco
if pivotMaisExtremo
ultimoPivotPreco := novoPivotPreco
ultimoPivotBar := novoPivotBar
ultimoPivotTempo := novoPivotTempo
else
baseInicioPreco := ultimoPivotPreco
baseInicioBar := ultimoPivotBar
baseInicioTempo := ultimoPivotTempo
baseFimPreco := novoPivotPreco
baseFimBar := novoPivotBar
baseFimTempo := novoPivotTempo
direcaoBase := baseFimPreco > baseInicioPreco ? 1 : -1
tempoBase := math.abs(baseFimTempo - baseInicioTempo) / 60000.0
amplitudeBase := math.abs(baseFimPreco - baseInicioPreco)
extremoCorrecao := baseFimPreco
extremoCorrecaoBar := baseFimBar
extremoCorrecaoTempo := baseFimTempo
retracaoMaxima := 0.0
correcaoValidada := false
finalCorrecaoTempo := na
confirmacaoBar := na
confirmacaoPreco := na
estado := 1
ultimoPivotPreco := novoPivotPreco
ultimoPivotBar := novoPivotBar
ultimoPivotTempo := novoPivotTempo
ultimoPivotTipo := novoPivotTipo
//==================================================
// 17. MEDIÇÃO DA CORREÇÃO
//==================================================
float retracaoAtual = na
if estado == 1 and not na(amplitudeBase) and amplitudeBase > 0
if direcaoBase == 1
if low < extremoCorrecao
extremoCorrecao := low
extremoCorrecaoBar := bar_index
extremoCorrecaoTempo := time
retracaoAtual := math.max(0.0, (baseFimPreco - close) / amplitudeBase)
retracaoMaxima := math.max(0.0, (baseFimPreco - extremoCorrecao) / amplitudeBase)
else if direcaoBase == -1
if high > extremoCorrecao
extremoCorrecao := high
extremoCorrecaoBar := bar_index
extremoCorrecaoTempo := time
retracaoAtual := math.max(0.0, (close - baseFimPreco) / amplitudeBase)
retracaoMaxima := math.max(0.0, (extremoCorrecao - baseFimPreco) / amplitudeBase)
correcaoValidada := retracaoMaxima >= retracaoMinima
//==================================================
// 18. TEMPO DA CORREÇÃO
//==================================================
int tempoAgora = barstate.isrealtime ? timenow : time_close
float tempoCorrecao = na
if estado == 1 and not na(baseFimTempo)
tempoCorrecao := math.max(0.0, (tempoAgora - baseFimTempo) / 60000.0)
else if estado == 2
if not na(baseFimTempo) and not na(finalCorrecaoTempo)
tempoCorrecao := math.max(0.0, (finalCorrecaoTempo - baseFimTempo) / 60000.0)
float relacaoTemporal = na
if not na(tempoBase) and tempoBase > 0 and not na(tempoCorrecao)
relacaoTemporal := tempoCorrecao / tempoBase
float tempoMinimo = na
float inicioJanela = na
float fimJanela = na
if not na(tempoBase)
tempoMinimo := tempoBase * relacaoMinimaTempo
inicioJanela := tempoBase * relacaoIdealInicio
fimJanela := tempoBase * relacaoIdealFim
float faltamMinimo = na
if not na(tempoCorrecao) and not na(tempoMinimo)
if tempoCorrecao < tempoMinimo
faltamMinimo := tempoMinimo - tempoCorrecao
float faltamJanela = na
if not na(tempoCorrecao) and not na(inicioJanela)
if tempoCorrecao < inicioJanela
faltamJanela := inicioJanela - tempoCorrecao
bool tempoValido = not na(relacaoTemporal) and relacaoTemporal >= relacaoMinimaTempo
bool janelaIdeal = not na(relacaoTemporal) and relacaoTemporal >= relacaoIdealInicio and relacaoTemporal <= relacaoIdealFim
bool tempoExcedido = not na(relacaoTemporal) and relacaoTemporal > relacaoIdealFim
bool fibValida = not na(retracaoMaxima) and retracaoMaxima >= fibIdealMinimo and retracaoMaxima <= fibIdealMaximo
//==================================================
// 19. INVALIDAÇÃO
//==================================================
bool estruturaInvalidada = false
if estado == 1 and invalidarEm100 and not na(baseInicioPreco)
if direcaoBase == 1
estruturaInvalidada := close <= baseInicioPreco
else if direcaoBase == -1
estruturaInvalidada := close >= baseInicioPreco
if estruturaInvalidada
estado := 0
ultimoPivotPreco := na
ultimoPivotBar := na
ultimoPivotTempo := na
ultimoPivotTipo := 0
baseInicioPreco := na
baseFimPreco := na
baseInicioBar := na
baseFimBar := na
baseInicioTempo := na
baseFimTempo := na
direcaoBase := 0
tempoBase := na
amplitudeBase := na
extremoCorrecao := na
extremoCorrecaoBar := na
extremoCorrecaoTempo := na
retracaoMaxima := na
correcaoValidada := false
finalCorrecaoTempo := na
confirmacaoBar := na
confirmacaoPreco := na
if not na(linhaBase)
line.delete(linhaBase)
if not na(linhaCorrecao)
line.delete(linhaCorrecao)
if not na(linhaRetomada)
line.delete(linhaRetomada)
linhaBase := na
linhaCorrecao := na
linhaRetomada := na
if not na(labelInicio)
label.delete(labelInicio)
if not na(labelFim)
label.delete(labelFim)
if not na(labelCorrecao)
label.delete(labelCorrecao)
if not na(labelConfirmacao)
label.delete(labelConfirmacao)
labelInicio := na
labelFim := na
labelCorrecao := na
labelConfirmacao := na
f_limparFibo()
f_limparAlvos()
//==================================================
// 20. CONFIRMAÇÃO DA PRÓXIMA ONDA
//==================================================
bool retomadaAlta = estado == 1 and direcaoBase == 1 and correcaoValidada and close > baseFimPreco
bool retomadaBaixa = estado == 1 and direcaoBase == -1 and correcaoValidada and close < baseFimPreco
bool retomadaConfirmada = barstate.isconfirmed and (retomadaAlta or retomadaBaixa)
if retomadaConfirmada
estado := 2
finalCorrecaoTempo := time_close
confirmacaoBar := bar_index
confirmacaoPreco := close
//==================================================
// 21. ÍNDICE NEOWAVE
//==================================================
int indiceNeoWave = 0
if not na(baseFimPreco)
indiceNeoWave += 20
if correcaoValidada
indiceNeoWave += 20
if tempoValido
indiceNeoWave += 20
if fibValida
indiceNeoWave += 20
if estado == 2
indiceNeoWave += 20
bool proximaOndaConfirmada = estado == 2 and indiceNeoWave >= scoreMinimo
//==================================================
// 22. TEXTOS OPERACIONAIS
//==================================================
string nomeProximaOnda = f_nomeProximaOnda(hipoteseCorrecao)
string proximaOndaDirecao = "AGUARDANDO"
if direcaoBase == 1
proximaOndaDirecao := nomeProximaOnda + " DE ALTA"
else if direcaoBase == -1
proximaOndaDirecao := nomeProximaOnda + " DE BAIXA"
string faseTexto = "PROCURANDO DIRECIONAL"
string ondaAtualTexto = "AGUARDANDO"
string estagioTexto = "AGUARDANDO"
string acaoTexto = "AGUARDAR"
string sinalTexto = "SEM SINAL"
if estado == 1
faseTexto := "CORREÇÃO ATIVA"
ondaAtualTexto := str.upper(hipoteseCorrecao)
if not correcaoValidada
estagioTexto := "CORREÇÃO NÃO VALIDADA"
acaoTexto := "AGUARDAR RETRAÇÃO MÍNIMA"
else if not tempoValido
estagioTexto := "CORREÇÃO JOVEM"
acaoTexto := "AGUARDAR MATURIDADE"
else if janelaIdeal and fibValida
estagioTexto := "JANELA DE FINAL DA " + str.upper(hipoteseCorrecao)
acaoTexto := "AGUARDAR RETOMADA DE " + f_direcaoTexto(direcaoBase)
else if tempoExcedido
estagioTexto := "CORREÇÃO COMPLEXA"
acaoTexto := "REAVALIAR CONTAGEM"
else
estagioTexto := "CORREÇÃO MADURA"
acaoTexto := "MONITORAR FINAL DA " + str.upper(hipoteseCorrecao)
else if estado == 2
faseTexto := "EXPANSÃO INICIADA"
ondaAtualTexto := proximaOndaDirecao
if proximaOndaConfirmada
estagioTexto := proximaOndaDirecao + " CONFIRMADA"
if direcaoBase == 1
sinalTexto := "SINAL DE ALTA"
acaoTexto := "ACOMPANHAR EXPANSÃO DE ALTA"
else
sinalTexto := "SINAL DE BAIXA"
acaoTexto := "ACOMPANHAR EXPANSÃO DE BAIXA"
else
estagioTexto := "RETOMADA CONFIRMADA"
acaoTexto := "ÍNDICE ABAIXO DO MÍNIMO"
//==================================================
// 23. STOP E ALVOS
//==================================================
float stopTecnico = estado == 2 ? extremoCorrecao : na
float alvo100 = na
float alvo1618 = na
float alvo2618 = na
if estado == 2 and not na(extremoCorrecao) and not na(amplitudeBase)
alvo100 := extremoCorrecao + direcaoBase * amplitudeBase
alvo1618 := extremoCorrecao + direcaoBase * amplitudeBase * 1.618
alvo2618 := extremoCorrecao + direcaoBase * amplitudeBase * 2.618
//==================================================
// 24. DESENHO DO DIRECIONAL
//==================================================
if not na(baseInicioBar) and not na(baseFimBar)
color corDirecional = direcaoBase == 1 ? corAlta : corBaixa
if mostrarBase
if na(linhaBase)
linhaBase := line.new(
x1=baseInicioBar,
y1=baseInicioPreco,
x2=baseFimBar,
y2=baseFimPreco,
xloc=xloc.bar_index,
color=corDirecional,
width=3
)
else
line.set_xy1(linhaBase, baseInicioBar, baseInicioPreco)
line.set_xy2(linhaBase, baseFimBar, baseFimPreco)
line.set_color(linhaBase, corDirecional)
if na(labelInicio)
labelInicio := label.new(
x=baseInicioBar,
y=baseInicioPreco,
text="INÍCIO DIRECIONAL",
xloc=xloc.bar_index,
yloc=yloc.price,
style=direcaoBase == 1 ? label.style_label_up : label.style_label_down,
color=corDirecional,
textcolor=color.white,
size=size.small
)
if na(labelFim)
labelFim := label.new(
x=baseFimBar,
y=baseFimPreco,
text="FIM DIRECIONAL " + f_tempo(tempoBase),
xloc=xloc.bar_index,
yloc=yloc.price,
style=direcaoBase == 1 ? label.style_label_down : label.style_label_up,
color=corDirecional,
textcolor=color.white,
size=size.small
)
//==================================================
// 25. DESENHO DA CORREÇÃO
//==================================================
if mostrarCorrecao and estado >= 1 and not na(baseFimBar) and not na(extremoCorrecaoBar)
if na(linhaCorrecao)
linhaCorrecao := line.new(
x1=baseFimBar,
y1=baseFimPreco,
x2=extremoCorrecaoBar,
y2=extremoCorrecao,
xloc=xloc.bar_index,
color=corCorrecao,
width=2
)
else
line.set_xy1(linhaCorrecao, baseFimBar, baseFimPreco)
line.set_xy2(linhaCorrecao, extremoCorrecaoBar, extremoCorrecao)
line.set_color(linhaCorrecao, corCorrecao)
string textoCorrecao = str.upper(hipoteseCorrecao) + " " + f_tempo(tempoCorrecao)
if na(labelCorrecao)
labelCorrecao := label.new(
x=extremoCorrecaoBar,
y=extremoCorrecao,
text=textoCorrecao,
xloc=xloc.bar_index,
yloc=yloc.price,
style=direcaoBase == 1 ? label.style_label_up : label.style_label_down,
color=corCorrecao,
textcolor=color.white,
size=size.small
)
else
label.set_xy(labelCorrecao, extremoCorrecaoBar, extremoCorrecao)
label.set_text(labelCorrecao, textoCorrecao)
//==================================================
// 26. SINAL DA PRÓXIMA ONDA
//==================================================
if estado == 2
if not na(confirmacaoBar)
if na(linhaRetomada)
linhaRetomada := line.new(
x1=extremoCorrecaoBar,
y1=extremoCorrecao,
x2=confirmacaoBar,
y2=confirmacaoPreco,
xloc=xloc.bar_index,
color=corConfirmacao,
width=3
)
else
line.set_xy1(linhaRetomada, extremoCorrecaoBar, extremoCorrecao)
line.set_xy2(linhaRetomada, confirmacaoBar, confirmacaoPreco)
line.set_color(linhaRetomada, corConfirmacao)
string textoConfirmacao = "RETOMADA CONFIRMADA " + str.tostring(indiceNeoWave) + "/100"
if proximaOndaConfirmada
textoConfirmacao := proximaOndaDirecao + " CONFIRMADA " + str.tostring(indiceNeoWave) + "/100"
if mostrarSinal
if na(labelConfirmacao)
labelConfirmacao := label.new(
x=confirmacaoBar,
y=direcaoBase == 1 ? low : high,
text=textoConfirmacao,
xloc=xloc.bar_index,
yloc=yloc.price,
style=direcaoBase == 1 ? label.style_label_up : label.style_label_down,
color=proximaOndaConfirmada ? corConfirmacao : color.orange,
textcolor=color.white,
size=size.normal
)
else
label.set_xy(labelConfirmacao, confirmacaoBar, direcaoBase == 1 ? low : high)
label.set_text(labelConfirmacao, textoConfirmacao)
label.set_color(labelConfirmacao, proximaOndaConfirmada ? corConfirmacao : color.orange)
//==================================================
// 27. FIBONACCI
//==================================================
if barstate.islast
f_limparFibo()
if estado >= 1 and not na(baseInicioPreco) and not na(baseFimPreco)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.236), "23,6%", usar236)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.382), "38,2%", usar382)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.500), "50,0%", usar500)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.618), "61,8%", usar618)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.705), "70,5%", usar705)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.786), "78,6%", usar786)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.810), "81,0%", usar810)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.854), "85,4%", usar854)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 0.886), "88,6%", usar886)
f_desenharFibo(f_nivelRetracao(baseInicioPreco, baseFimPreco, 1.000), "100,0%", usar100)
//==================================================
// 28. ALVOS
//==================================================
if barstate.islast
f_limparAlvos()
if proximaOndaConfirmada
f_desenharAlvo(alvo100, "ALVO 1 — 100%")
f_desenharAlvo(alvo1618, "ALVO 2 — 161,8%")
f_desenharAlvo(alvo2618, "ALVO 3 — 261,8%")
//==================================================
// 29. FUNDO
//==================================================
color corFundo = na
if mostrarFundo and estado == 1 and janelaIdeal
corFundo := color.new(corIdeal, 88)
else if mostrarFundo and proximaOndaConfirmada
corFundo := color.new(corConfirmacao, 90)
bgcolor(corFundo)
//==================================================
// 30. PAINEL
//==================================================
var table painel = table.new(position.top_right, 2, 23, border_width=1)
if mostrarPainel and barstate.islast
color corDirecao = color.gray
color corEstado = corCorrecao
if direcaoBase == 1
corDirecao := corAlta
else if direcaoBase == -1
corDirecao := corBaixa
if proximaOndaConfirmada
corEstado := corConfirmacao
else if janelaIdeal
corEstado := corIdeal
else if tempoExcedido
corEstado := color.fuchsia
string movimentoBaseTexto = "AGUARDANDO"
if direcaoBase == 1
movimentoBaseTexto := "DIRECIONAL DE ALTA"
else if direcaoBase == -1
movimentoBaseTexto := "DIRECIONAL DE BAIXA"
string textoJanela = "-"
if janelaIdeal
textoJanela := "JANELA ATIVA"
else if tempoExcedido
textoJanela := "JANELA EXCEDIDA"
else if not na(faltamJanela)
textoJanela := f_tempo(faltamJanela)
table.cell(painel, 0, 0, "MAGALHAES", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 0, "NEOWAVE ONDA 3 PRO", bgcolor=color.black, text_color=color.white)
table.cell(painel, 0, 1, "Fase", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 1, faseTexto, bgcolor=corEstado, text_color=color.white)
table.cell(painel, 0, 2, "Movimento Base", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 2, movimentoBaseTexto, bgcolor=corDirecao, text_color=color.white)
table.cell(painel, 0, 3, "Onda Atual", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 3, ondaAtualTexto, bgcolor=corEstado, text_color=color.white)
table.cell(painel, 0, 4, "Estágio", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 4, estagioTexto, bgcolor=corEstado, text_color=color.white)
table.cell(painel, 0, 5, "Tempo Direcional", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 5, f_tempo(tempoBase), bgcolor=color.gray, text_color=color.white)
table.cell(painel, 0, 6, "Tempo Correção", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 6, f_tempo(tempoCorrecao), bgcolor=color.gray, text_color=color.white)
table.cell(painel, 0, 7, "Relação Temporal", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 7, f_relacao(relacaoTemporal), bgcolor=corEstado, text_color=color.white)
table.cell(painel, 0, 8, "Tempo Mínimo", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 8, f_tempo(tempoMinimo), bgcolor=color.gray, text_color=color.white)
table.cell(painel, 0, 9, "Faltam Mínimo", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 9, not na(faltamMinimo) ? f_tempo(faltamMinimo) : "CUMPRIDO", bgcolor=tempoValido ? color.green : color.gray, text_color=color.white)
table.cell(painel, 0, 10, "Janela Ideal", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 10, f_tempo(inicioJanela) + " até " + f_tempo(fimJanela), bgcolor=color.gray, text_color=color.white)
table.cell(painel, 0, 11, "Faltam Janela", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 11, textoJanela, bgcolor=corEstado, text_color=color.white)
table.cell(painel, 0, 12, "Retração Atual", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 12, f_percentual(retracaoAtual), bgcolor=color.gray, text_color=color.white)
table.cell(painel, 0, 13, "Retração Máxima", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 13, f_percentual(retracaoMaxima), bgcolor=color.gray, text_color=color.white)
table.cell(painel, 0, 14, "Tempo Válido", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 14, f_simNao(tempoValido), bgcolor=tempoValido ? color.green : color.gray, text_color=color.white)
table.cell(painel, 0, 15, "Fib Válida", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 15, f_simNao(fibValida), bgcolor=fibValida ? color.green : color.gray, text_color=color.white)
table.cell(painel, 0, 16, "Correção Completa", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 16, estado == 2 ? "SIM" : "NÃO", bgcolor=estado == 2 ? color.green : color.gray, text_color=color.white)
table.cell(painel, 0, 17, "Rompimento", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 17, estado == 2 ? "CONFIRMADO" : "AGUARDANDO", bgcolor=estado == 2 ? color.green : color.gray, text_color=color.white)
table.cell(painel, 0, 18, "Índice NeoWave", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 18, str.tostring(indiceNeoWave) + " / 100", bgcolor=indiceNeoWave >= scoreMinimo ? color.green : color.orange, text_color=color.white)
table.cell(painel, 0, 19, "Sinal", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 19, sinalTexto, bgcolor=proximaOndaConfirmada ? corDirecao : color.gray, text_color=color.white)
table.cell(painel, 0, 20, "Stop Técnico", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 20, f_preco(stopTecnico), bgcolor=color.red, text_color=color.white)
table.cell(painel, 0, 21, "Alvos", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 21, "100%: " + f_preco(alvo100) + " 161,8%: " + f_preco(alvo1618) + " 261,8%: " + f_preco(alvo2618), bgcolor=corAlvo, text_color=color.white)
table.cell(painel, 0, 22, "Estado / Ação", bgcolor=color.black, text_color=color.white)
table.cell(painel, 1, 22, estagioTexto + " " + acaoTexto, bgcolor=corEstado, text_color=color.white)
//==================================================
// 31. ALERTAS
//==================================================
alertcondition(
correcaoValidada and not correcaoValidada ,
title="NeoWave — Correção validada",
message="A correção atingiu a retração mínima."
)
alertcondition(
tempoValido and not tempoValido ,
title="NeoWave — Tempo mínimo cumprido",
message="A correção cumpriu o tempo mínimo."
)
alertcondition(
janelaIdeal and not janelaIdeal ,
title="NeoWave — Janela temporal ativa",
message="A correção entrou na janela temporal ideal."
)
alertcondition(
retomadaConfirmada,
title="NeoWave — Retomada confirmada",
message="A correção terminou e a direção original foi retomada."
)
alertcondition(
proximaOndaConfirmada and not proximaOndaConfirmada ,
title="NeoWave — Próxima onda confirmada",
message="A próxima onda foi confirmada pelo motor NeoWave."
)
alertcondition(
estruturaInvalidada,
title="NeoWave — Estrutura invalidada",
message="A correção fechou além da origem do movimento direcional."
) Indikator

Indikator

Time-at-Price S/R Pockets v11TIME-AT-PRICE S/R POCKETS
WHAT IT IS
Most profiles answer "where did the business get done?" This tool starts from a different question: where has price been ACCEPTED? Time-at-price measures acceptance; volume-at-price measures participation. The two often disagree, and the disagreements are informative. This script maps acceptance into support/resistance pockets, tracks how value migrates, and runs a self-scoring projection whose structural inputs are chosen by walk-forward evidence rather than by opinion.
Everything here is descriptive and backward-looking. The projection is a model of where current forces point, not a forecast — and the script continuously publishes its own hit rate so you can see exactly how much it deserves to be trusted on your symbol.
THE POCKETS
A rolling window (tuned per timeframe by preset) is binned into price rows. Each bar adds weight to every row it touched, with a recency decay (half-life plus floor) so old structure fades without vanishing. Strength = a row's weight relative to the strongest row. Contiguous strong rows become pockets, drawn to the right of price:
- Length is proportional to strength.
- Colour is the bar-win bias inside the zone: green shades where buyers won more bars, red where sellers did, grey when balanced.
- A gold border marks pockets being tested within the recent heat window.
- Declutter: only the N strongest pockets (plus the one at price) get full labels; the rest carry hover dots with the same detail.
- A dotted line marks the Point of Control — the single most-accepted price in the window.
- A higher-timeframe rail on the far right shows the same construction one frame up (D charts get W, 1H gets D, etc.) as slim context bands.
VALUE MIGRATION
The rolling profile says where value sits; the trail says which way it is moving. A stepped PoC trail is recomputed with the same construction as the display profile, so its right-hand end lands exactly on the PoC line. Around it: a shaded value-area band (70% of the distribution by default), a drift readout in ATR units (value migrating up / down / balanced — comparable across instruments), and an overlap metric versus N bars ago (overlapping value areas = balance; stepping areas = trending).
THE PROJECTION (A MODEL, NOT A FORECAST)
A deterministic path: linear-regression drift, fading each bar, plus reversion toward the PoC, plus drag from any zone the path passes through, wrapped in an ATR*sqrt(t) volatility cone. It can terminate at the first strong zone it enters — forces point INTO structure, so projecting through it would overclaim. The reversion and fade coefficients are derived from the instrument itself (distance persistence and return autocorrelation), with manual overrides.
A tug-of-war readout decomposes the next step into momentum vs structure, with direction and ratio.
SELF-SCORING AND DRAG ARBITRATION
Three strength fields are built in one pass: Time, Volume, and Composite sqrt(time*volume). Every bar, three parallel projections — one per field, each reverting to its own PoC — are scored walk-forward against the then-unseen future: directional hit rate, and error versus a flat baseline ("predict no change"). The drag source can be fixed manually, or set to Auto: a field becomes eligible after a minimum number of scored forecasts, ranking is by error-vs-flat with hit rate breaking ties, and an incumbent is only dethroned when a challenger beats it by a margin, to stop flapping.
Read the scoreboard honestly. Forecasts are scored every bar over an N-bar horizon, so adjacent forecasts share outcome bars — the effective independent sample is roughly n divided by the horizon. Ratios near 1.0x mean no demonstrated edge, and the script will say so rather than hide it. The champion's own score is a clean walk-forward tally, but champion SWITCHING is greedy, so it is not an out-of-sample estimate of the switching policy.
INTRABAR VOLUME (EXPERIMENTAL)
Optionally, the volume fields are rebuilt from lower-timeframe data: each intrabar's volume is allocated to the bin containing its close, instead of smearing a chart bar's volume across its full high-low range. The lower timeframe is auto-selected to fit TradingView's intrabar budget (manual override available), and the HUD reports the chosen timeframe, data coverage, and any capping. The time field deliberately stays on chart-bar construction, so the scoreboards act as a controlled test of whether sharper volume allocation actually improves the projection on your instrument.
SETTINGS
The Auto preset reads your chart timeframe and applies tuned defaults for Weekly / Daily / 1-Hour / 15-Min; Manual exposes every knob. If TradingView reports the script is slow, raise the recompute stride or lower the scoring window.
LIMITATIONS, STATED PLAINLY
- Boxes, labels and lines redraw on the latest bar — standard for rolling profiles. Nothing uses future data; all scoring is confirmed-bar only.
- Without volume data the script degrades gracefully to time-only mode.
- Pockets are context, not signals. There are no alerts and no entries. If the scoreboard says the projection does not beat a flat line on your symbol, believe it.
Built from scratch; no reused open-source code. A companion script surfacing the time-vs-volume divergences directly (auction quadrants: VALUE / SOFT / EVENT zones, absorption flags, dual PoC trails) will follow. Indikator

TraderLifestyle Space Concept Pro - 3 Finger Spread EngineSPACE CONCEPT PRO - THE THREE-FINGER SPREAD ENGINE
Some of the most consistent discretionary traders never look at a chart without two moving averages on it: the 20 SMA and the 200 SMA. Add price itself and you have THREE ITEMS - three "fingers". The distance between them is called SPACE, and space tells you when a market is about to explode and when a move is about to die. This indicator turns that entire concept into a fully mechanical engine with signals, trade management and webhook automation.
=== THE CONCEPT ===
THE THREE ITEMS
1. Price
2. The 20 period simple moving average
3. The 200 period simple moving average
NARROW STATE - all three items clustered together. The market has reset itself. An explosive move is loading, direction unknown. You do not need to predict it: you simply wait for the biggest bar to emerge.
SPACE ZONE 1 - the space between the 20 SMA and the 200 SMA.
SPACE ZONE 2 - price accelerating away from the 20 SMA. Sometimes the underlying moves faster than the moving average can keep up, creating a second layer of space.
DUAL SPACE / THREE-FINGER SPREAD - both zones open at the same time, all three fingers clearly separated and stacked in order. This is where moves get exhausted.
THE RAILROAD RULE - if price runs parallel to the 20 SMA like railroad tracks, that is NOT a spread. Price has to ACCELERATE away from the moving average. The engine checks this automatically.
THE WIDEST SPREAD - the widest three-finger spread of the lookback window finds you the temporary top or bottom 8 to 9 times out of 10. When it prints, the reversal watch arms and the extreme that must hold is marked on the chart.
NARROW TO NARROW - when the spread collapses from the widest state back to narrow WITHOUT breaking the extreme, the next direction is the reversal. Confirmed by a power bar: a three-finger spread reversing with a power bar is the creme de la creme of this method.
=== THE SIGNALS ===
1. BREAKOUT - power bar (biggest bar of the window) exploding out of a narrow state. Entry inside the bar, stop beyond the bar.
2. SPREAD REVERSAL - widest spread found the extreme, spread collapsed back toward narrow without breaking it, power bar confirms. Target follows the 50 percent rule.
3. EARLY REVERSAL - first strong color change directly at the widest spread (the bottoming tail bar play). Stop beyond the extreme.
4. TAIL BAR - optional: bottoming/topping tail bars near narrow states as early entries (markers by default).
Every signal prints as a two-line pill with the setup name, and every pill carries a WHY tooltip that explains the exact chain of logic behind the trade - plus entry, stop, target and R:R.
=== TRADE MANAGEMENT (AS TAUGHT) ===
- ADD on the first color change after entry ("always adding on the first color change")
- TP at the 50 percent mark of the move - the pros are satisfied with the halfway mark, do not get greedy
- After the partial: bar-by-bar trailing stop until the market takes you out
- Hard stop beyond the power bar / spread extreme with an ATR buffer
- Full position box and live status in the cockpit panel
=== THE COCKPIT ===
An animated terminal-style panel shows everything at a glance:
- Animated 3D gold pixel logo with a moving light sweep (live ticks)
- State chip: NARROW STATE / 3-FINGER SPREAD / WIDEST SPREAD / REVERSAL WATCH
- Spread rank 0-100 plus live ZONE 1 / ZONE 2 meter bars in ATR
- 7-step SPACE CHECKLIST mirroring the method: items stacked, zone 1, zone 2, acceleration (railroad filter), widest-spread watch, power bar, management
- Position box, big signal line, spread/reset/signal counters
On the chart: shaded zone 1 and zone 2 fills, narrow-state boxes, MARKET RESET tags, 3-FINGER SPREAD labels, gold WIDEST SPREAD stars with vertical measuring lines (exactly how it is drawn when taught), the must-hold extreme line, TAIL tags and lightning power-bar markers. Everything is explained on the chart - hover any label for the reasoning.
=== AUTOMATION / WEBHOOK ===
Create ONE alert with condition "Any alert() function call" and paste your webhook URL. The indicator sends ready-to-use JSON for every event:
{"id":"TL-SPACE-CONCEPT","symbol":"BTCUSD","action":"BUY","setup":"BREAKOUT","price":64100.5,"sl":63900.0,"tp":64500.0,"tf":"15","time":"2026-07-18 16:30"}
Actions: BUY, SELL, ADD, TP_50, TRAIL_EXIT, SL_HIT, NARROW_STATE, WIDEST_SPREAD. Classic alertconditions for BUY / SELL / Narrow State / Widest Spread are included as well.
=== SELF-CALIBRATING ===
The spread is ranked against its own history (percentile engine) and all distances are measured in ATR - so the indicator works out of the box on any market (crypto, forex, gold, indices, stocks, futures) and any timeframe from 1 minute to weekly. Practice finding three-finger spreads everywhere - that is the homework.
=== SETTINGS ===
Every input is documented with a tooltip quoting the original rule it implements. Adjust the narrow/wide percentiles, power-bar size, dual-space minimum, acceleration window, 50 percent rule targets and the SL buffer to fit your market and style.
=== DISCLAIMER ===
Educational tool, not financial advice. No indicator wins every trade - prepare for the 1-2 times out of 10 the concept is wrong: keep your risk unit small compared to your profit unit. That is how you stay in business.
Indikator

Volatility Jump DetectorVolatility Jump Detector
This tool marks structurally significant price moves and tells you what kind of move each one was. It is an event detector, not a signal — it does not predict direction. It answers "did something real just happen here, and what was behind it?"
HOW JUMPS ARE DETECTED
Most "big candle" indicators compare a move to an ordinary volatility estimate, which has a circular flaw: a large jump inflates the very volatility measure used to judge it, so the biggest moves look less exceptional than they are.
This uses bipower variation (Barndorff-Nielsen and Shephard; Lee and Mykland), which builds the local volatility estimate from products of adjacent absolute returns. That construction is insensitive to a single large move, and it is computed excluding the current bar — so a jump cannot inflate its own threshold. A move is flagged when it exceeds a chosen multiple of that robust volatility, and the panel reports the exact sigma reading.
TWO INDEPENDENT CONTEXT AXES
INTENSITY — Is the recent jump rate elevated versus its own long-run baseline? Reported as a multiple with the underlying counts always visible, so you can see the sample behind the verdict. Note on method: a Hawkes branching-ratio estimate was implemented first and dropped. At a 4-sigma threshold real data yields only a handful of jumps per few hundred bars, far too few for count-variance statistics — it returned zero on every timeframe tested. A plain rate comparison is what sparse events can actually support, and below a minimum count the reading honestly says "insufficient" rather than printing a fabricated number.
VOLUME — Was the jump backed by participation, or did it slip through a thin book? A large move on heavy volume and the same move on nothing are different events. Auto-disables on instruments without a volume feed.
Optionally link the Risk & Levels Cockpit's exported levels, and jumps that fire through your invalidation level or at the point of control are flagged.
ON THE CHART
Direction-aware triangles mark each jump, colored by the intensity regime at that moment. The most recent jump is labelled with its sigma reading and volume tag. The background tints when jump intensity is elevated. The panel adapts to your chart theme and colors each row by meaning.
WORKS ON ANY MARKET AND TIMEFRAME
All lookbacks are in bars with no session, expiry, or clock anchors. Non-repainting: the robust volatility estimate excludes the current bar, and everything confirms at close.
LIMITATIONS
Not a signal and not investment advice. This marks events and describes them; it does not forecast what follows. An earlier version classified jumps as "ignition" versus "exhaustion" and measured the forward tendency of each — the measured continuation and reversal rates sat at base rate, so that classification was removed rather than kept as decoration. Jump detection depends on the threshold you choose; a lower threshold marks more moves and dilutes significance. Intensity needs a long baseline window because jumps are rare, and reports "insufficient" when the count is too low. Volume confirmation requires a volume feed.
CREDITS
Original implementation. Barndorff-Nielsen and Shephard bipower variation; Lee and Mykland (2008) jump test; jump-rate intensity comparison. Indikator

Strategi

Institutional Positioning (COT S&P 500 Asset Managers)中文說明
機構部位擁擠度指標(COT S&P 500 Asset Manager Positioning)
本指標追蹤美國股指期貨市場中「資產管理公司/機構法人」類別的淨部位相對歷史水位,用以觀察機構投資人多空部位是否已經過度擁擠,是一個逆勢型的市場情緒觀察工具。
計算方式
資料來源為 CFTC(美國商品期貨交易委員會)每週五公布的 Traders in Financial Futures(TFF)報告,取 E-mini S&P 500 期貨(CFTC Code #13874A)中「Asset Manager/Institutional」類別的多單減空單,得到淨部位。再用 ta.percentrank() 將淨部位轉換成過去約3年(780個交易日)區間內的百分位排名(0-100),用以判斷目前部位相對於自身歷史的擁擠程度。
如何使用
紅色區域(百分位 80-95以上):機構多單部位處於近3年相對高檔,代表多頭部位已經擁擠。這是逆勢訊號,不是趨勢確認——意味著追高風險上升、獲利了結壓力可能浮現,不代表市場馬上要跌。
綠色區域(百分位 5-20以下):機構空單部位處於近3年相對高檔(或多單部位處於低檔),代表空頭情緒或減碼行為已經擁擠。同樣是逆勢訊號,提醒悲觀情緒可能已經到達極端,存在反彈的統計傾向,不代表市場立刻反轉向上。
中線(50)代表目前部位落在過去3年的中位數,無明顯偏多或偏空的擁擠現象。
注意事項
資產管理公司(退休基金、資產管理業者)本質上以長期資產配置為主要目的,部位天生偏向長期持有多單,這代表本指標的中樞長期會偏向50以上,這是市場結構特性,不是指標偏誤。
資料為週更新,雖然本指標可以掛在任何K線週期上使用,但反映的訊號本質是總經/中長期部位變化,不適合作為短線精確進出場依據,建議搭配保證金負債、淨流動性、信用壓力等指標一起觀察,綜合判斷市場所處的槓桿-流動性-信用-部位週期階段。
若發現此分類訊號長期缺乏區分度,可考慮改用波動性更高的 Leveraged Funds(避險基金)分類作為替代或補充。
本指標僅供教育與研究參考,不構成投資建議。
English Description
Institutional Positioning Crowding Indicator (COT S&P 500 Asset Manager Positioning)
This indicator tracks the net positioning of the "Asset Manager/Institutional" category in U.S. equity index futures relative to its own historical range, used to assess whether institutional investors' long or short positioning has become overcrowded. It is a contrarian market-sentiment tool, not a trend-confirmation one.
Methodology
Data comes from the CFTC's weekly Traders in Financial Futures (TFF) report, using the E-mini S&P 500 futures (CFTC Code #13874A). Net position is calculated as Asset Manager/Institutional long positions minus short positions. This net position is then converted using ta.percentrank() into a percentile ranking (0–100) relative to roughly the past 3 years (780 trading days), showing how crowded the current positioning is relative to its own history.
How to use it
Red zone (percentile 80–95+): Institutional long positioning is near a 3-year relative high — longs are crowded. This is a contrarian signal, not trend confirmation: it flags rising risk of profit-taking or a pullback, not an imminent decline.
Green zone (percentile 5–20 or below): Short positioning (or reduced long exposure) is near a 3-year relative extreme — pessimism is crowded. Also contrarian: it suggests bearish sentiment may be near an extreme, with a statistical tendency toward a bounce, not a guaranteed reversal.
Midline (50) indicates positioning sits near its 3-year median, with no notable crowding in either direction.
Notes
Asset managers (pension funds, institutional money managers) are structurally oriented toward long-term allocation and tend to run persistent long exposure. This means the indicator's center of gravity will naturally skew above 50 over time — this reflects genuine market structure, not a flaw in the indicator.
Although the underlying data updates weekly and this indicator can technically be applied to any chart timeframe, the signal itself reflects medium- to long-term institutional positioning shifts. It is not suited for precise short-term trade timing and works best alongside margin debt, net liquidity, and credit stress indicators to build a fuller picture of the leverage-liquidity-credit-positioning cycle.
If this category's signal proves insufficiently differentiated over time, consider substituting or supplementing it with the more volatile Leveraged Funds (hedge fund) category.
For educational and research purposes only; not investment advice. Indikator

KST Cross SwitchThe Know Sure Thing (KST) oscillator is a powerful momentum indicator, but its constantly fluctuating lines can sometimes make it difficult to determine the definitive market state at a glance.
This script transforms the traditional KST indicator into a clean, 3-stage State Machine tracker. Instead of staring at curved lines, this indicator locks the current market condition into three absolute levels: 100 for Bullish, 0 for Bearish, and 50 for Neutral.
When a strong bullish crossover occurs, the indicator locks to 100 with a lime green background. When a bearish crossunder happens, it locks to 0 with a maroon red background.
The core feature of this script is the Neutral Zone Threshold. In choppy or consolidating markets, KST lines often cross back and forth repeatedly, causing false signals. To solve this, the script checks the absolute distance between the KST line and the Signal line. If they are too close and moving sideways within your defined threshold, the indicator automatically resets to 50 with a neutral yellow/grey background. This helps you avoid overtrading during low-volatility squeeze periods.
You can fully customize the four different Rate of Change (ROC) lengths and their moving averages, as well as the signal line length. The Neutral Zone Threshold can also be finely tuned depending on the asset and timeframe you are trading. Indikator

Market Regime LensMarket Regime Lens
Market Regime Lens reads the market on four independent axes and gives you one honest sentence about the current tape. It is a context descriptor, not a signal — it never tells you which way to trade. It tells you whether the tape is readable, how it moves, how long things take, and how risk is arriving.
WHY FOUR AXES, ONE COMPONENT EACH
Most multi-indicator tools stack measures that secretly say the same thing — three complexity metrics agreeing is not confirmation, it is autocorrelation. This tool deliberately uses one component per independent axis, so each number tells you something the others cannot.
STRUCTURE — Complexity-Entropy plane. Bandt-Pompe permutation entropy paired with Martin-Plastino-Rosso statistical complexity, classifying the tape as structured, mixed, or noise. Thresholds are adaptive by default: the reading is ranked against the instrument's own recent range, so it self-calibrates to any market and timeframe instead of relying on absolute cutoffs that break when you change the window.
PERSISTENCE — Anomalous-diffusion exponent. Fitted from mean-squared-displacement scaling across lags: alpha above 1 means super-diffusive (trending), alpha near 1 is a random walk, alpha below 1 is sub-diffusive (mean-reverting). This describes the character of the motion, not its direction.
TIME — First passage and null odds. Expected bars to reach the target versus the stop under a driftless diffusion, plus the null barrier probability P = b/(a+b) — what a coin flip gives you at your chosen reward-to-risk. At 1.5R that is 40%. That is the breakeven any setup must clear, stated plainly.
TAIL — Extremal index. Measures whether extreme moves cluster (theta below 1) or arrive independently. Clustered tails mean gap risk shows up in bursts, which matters for stop placement.
ON THE CHART
The main line is the diffusion exponent, colored by state and filled against the alpha = 1 random-walk baseline, so deviation from randomness is visible at a glance. Faint guides mark the trending and reverting thresholds. Background tint shows the structure class. The panel adapts to your chart theme and colors each row by meaning — including green or amber on the null-odds row depending on whether your chosen R gives better-than-even odds.
PAIRS WITH RISK & LEVELS COCKPIT
Optionally wire the target and stop sources to the Cockpit's exported levels, and the timing and null-probability rows use your real trade levels instead of internal ATR references.
WORKS ON ANY MARKET AND TIMEFRAME
All lookbacks are in bars with no session, expiry, or clock anchors. Non-repainting: everything uses the current bar's data and confirms at close.
LIMITATIONS
Not a signal and not investment advice — no axis forecasts direction. Permutation entropy and complexity require a window much larger than d factorial; at dimension 4 use at least 300 bars, since short windows are undersampling-biased and pin to a constant. Adaptive thresholds classify relative to the instrument's own recent range, so "structured" means structured for this market lately, not in any absolute sense. First-passage times and the null probability assume driftless diffusion with constant volatility — a deliberate null baseline, not a forecast. The extremal index needs enough exceedances; too short a window pins it at 1.00.
CREDITS
Original implementation. Bandt and Pompe permutation entropy; Martin-Plastino-Rosso and Lopez-Ruiz statistical complexity via Jensen-Shannon divergence; anomalous-diffusion MSD scaling; Ferro-Segers runs estimator for the extremal index; first-passage-time and gambler's-ruin barrier theory. Indikator

Indikator

Indikator

Indikator

SMCNexusFactsCoreSMCNexusFactsCore is the confirmed, non-visual market-facts library for SMC Nexus by AreXoN. It provides bounded chart-timeframe facts for swing structure, BOS/CHoCH, MSS, FVG, Order Blocks, liquidity pools, sweeps, premium/discount and market context.
It contains no alerts, drawings, requests, transport, scoring or trade planning.
Contract version: 1.0.0. Perpustakaan

TraderLifestyle Structure Pro - Mechanical SMC EngineTL STRUCTURE PRO — Mechanical Smart Money Concepts (SMC) Engine: Market Structure, BOS/CHoCH, Liquidity Sweeps, Supply & Demand POI, FVG, Sessions, Signals & Webhook Automation
WHAT THIS INDICATOR DOES
TL Structure Pro turns a complete, fully mechanical Smart Money Concepts (SMC) trading model into one indicator. It automates the exact rule set many price-action traders apply manually: market structure mapping (HH/HL/LL/LH), Break of Structure (BOS), Change of Character (CHoCH), liquidity sweeps, supply and demand points of interest (POI), fair value gaps (FVG/imbalance), session timing (Asia / Frankfurt / London), a two-step entry model with internal realignment, and rule-based trade management with break-even logic — all with zero discretion and zero repainting (the engine only works on confirmed/closed candles).
Every element is drawn and labeled directly on the chart, so you can SEE why each signal happened: every zone is named, every structure point is tagged, and every BUY/SELL label explains its own reason.
THE MECHANICAL RULE SET (HOW IT THINKS)
1. BREAK & CLOSE RULE — A swing high/low only counts as broken when a candle BREAKS AND CLOSES beyond it. A wick through the level without a close is NOT a break.
2. LIQUIDATION ($) — If price wicks beyond a swing but fails to close beyond it, the indicator prints a "$" marker: that was a liquidity sweep / liquidity grab, not a break. These sweeps often precede reversals.
3. PULLBACK RULE — A new swing high/low is only confirmed after a valid pullback: N opposing candles in a row (default 3) with successive closes. No valid pullback = no new structure point; the move is just internal noise.
4. BOS — Break of Structure in the direction of the trend = continuation. Drawn as a gold dashed line with a BOS label.
5. CHoCH — Break & close AGAINST the current direction = Change of Character. Bias flips (bullish <-> bearish). Drawn in pink. After a bearish CHoCH the engine only looks for shorts; after a bullish CHoCH only longs.
6. POI ZONES — On every qualifying break the engine stores two zones: the DECISIONAL candle (last opposing candle before the breaking impulse) and, on CHoCH, the ORIGIN (last opposing candle at the origin of the impulse). Zones are drawn as labeled supply/demand boxes, extended in time, marked as "tapped" on first touch and deleted when invalidated by a close beyond them.
7. FVG / GAPS — Three-candle imbalances above a minimum size are boxed and removed once filled ("gaps get filled").
8. SESSIONS — Asian session, Frankfurt open and the London trade window are boxed with configurable times and timezone (defaults follow GMT+4 / Dubai time as in the original model: London window 11:00–14:00).
THE ENTRY MODEL (WHEN A SIGNAL FIRES)
A signal needs three conditions in sequence — the same checklist is shown live in the cockpit panel:
Step 1 — BIAS: structure must be clearly bullish or bearish (after BOS/CHoCH).
Step 2 — POI TAP: price returns INTO a supply zone (bearish bias) or demand zone (bullish bias) or a matching FVG. The setup is now "armed".
Step 3 — INTERNAL SHIFT (REALIGNMENT): inside the POI, the smaller internal structure (pivot-based, the "lower timeframe inside your chart") must shift in trade direction — a close beyond the last internal pivot. Only then a BUY/SELL label prints.
Risk placement is automatic and printed on the chart:
• ENTRY = close of the trigger candle
• STOP LOSS = POI extreme + a pip buffer (default 3.5 pips — capital preservation first)
• TAKE PROFIT = the weak swing low/high of the current range (structure target)
• R multiple of the setup is calculated and shown on the signal label
• BREAK-EVEN: once the trade runs the configured R distance (default 1R), the panel/alert moves the stop logic to break-even; TP hit, SL hit and BE exit are all labeled on the chart.
THE COCKPIT PANEL
The side panel shows: current bias, the live SMC checklist (structure / pullback / liquidity sweep / POI tap / entry shift / management) with OK-status per rule, active session window, structure timeframe and internal pivot length, SL buffer, current position with entry/SL/TP, the last signal with its R multiple, and a counter of active supply/demand/FVG zones. If a checklist row shows "‥" you immediately know which condition is still missing before the next signal can fire.
HOW TO USE IT — STEP BY STEP
1. Add the indicator to a clean chart. Recommended: liquid FX pairs (GBPUSD, EURUSD), gold (XAUUSD) or indices, timeframes M5–H1 for the session-based model (M15 is the classic choice). It works on any symbol/timeframe; sessions display on intraday charts up to 1h.
2. Set your timezone and session times in group ④ if you do not trade the default GMT+4 windows. Enable "Signals ONLY inside London window" if you want to trade the London session model strictly.
3. Read the structure first: follow the SWING HIGH / SWING LOW lines, the HH/HL/LH/LL tags and the BOS/CHoCH lines until you understand the current bias (also shown in the panel).
4. Watch the zones: price returning into a labeled SUPPLY/DEMAND (DECISIONAL/ORIGIN) box or FVG arms the setup — the panel switches to "ARMED (POI tapped)".
5. Wait for the printed BUY/SELL label — never front-run it. The label shows the R multiple and the reason (POI TAP + SHIFT); the tooltip lists entry, stop and target.
6. Manage by the printed levels: entry line (gold), SL line (pink, includes the pip buffer), TP line (mint, the weak swing). BE marker prints when break-even logic activates.
7. Tune mechanically, not emotionally: "Pullback rule candles" (2–5) controls how strict new structure confirmation is; "Internal pivot length" controls how fine the entry trigger is (smaller = earlier, noisier); "Min gap size" filters small FVGs; "Max zones" limits chart clutter.
8. Hover anything: every label, zone and marker has an explanatory tooltip, so the chart teaches the model while you trade it.
ALERTS & WEBHOOK AUTOMATION
Create ONE alert with condition "Any alert() function call" and paste your webhook URL — the indicator sends ready-to-parse JSON for every event:
{"id":"TL-STRUCTURE-PRO","symbol":"GBPUSD","action":"SELL","price":1.27201,"sl":1.27236,"tp":1.26350,"rr":"24.30","tf":"15","time":"2026-07-18 12:45"}
Actions: BUY, SELL, BREAK_EVEN, TP_HIT, SL_HIT, plus optional BOS_UP/BOS_DOWN/CHOCH_UP/CHOCH_DOWN. This makes the indicator plug-and-play with trade-automation bridges, bots and journaling tools. Classic alertconditions (BUY/SELL/BOS/CHoCH) are also available for simple popup/app notifications.
NON-REPAINT BEHAVIOUR
All structure logic, zones and signals are computed on CONFIRMED candles only (barstate.isconfirmed). Once printed, BOS/CHoCH lines, zones and signal labels do not repaint. Alerts fire on bar close.
NOTES
• The R multiples shown are the structural setup quality, not a performance promise. Nothing here is financial advice — backtest and forward-test before risking money.
• The panel is a table: if your main chart series is set above indicators, use right-click on the indicator legend -> Visual order -> Bring to front.
• Best visual experience with the dark TradingView theme (the indicator brings its own navy chart theme, mint/red candles and paints the future margin).
Concepts covered: Smart Money Concepts, SMC, ICT-style market structure, break of structure, change of character, liquidity sweep, liquidity grab, stop hunt, supply and demand zones, order block style POIs, decisional candle, origin, fair value gap, imbalance, premium discount, London session, killzone, session trading, scalping, day trading, price action, forex, gold, indices, webhook automation, algo bridge.
Indikator

Advanced Support and Resistance with Reversal [AlphaPine]Advanced Support and Resistance with Reversal | AlphaPine
I built this indicator for a simple reason: a breakout line on its own does not tell me enough. I also want to know whether price comes back, holds the level from the other side, and later loses it again.
The script starts with confirmed swing highs and lows. Those become resistance and support. It then follows each level through three possible events: breakout, retest, and failure. Nothing here predicts the next move. It is a way to keep market structure organised without redrawing the same levels by hand.
The image below shows the full level lifecycle in one view, including the symbols that appear at each stage:
How a level is created
A resistance level comes from a confirmed pivot high. A support level comes from a confirmed pivot low. If zones are enabled, the zone uses the wick range of the pivot candle rather than an arbitrary fixed width.
Pivot confirmation takes time. With Pivot Length set to 10, for example, the script needs ten bars on the right side of the pivot before the level exists. This delay is intentional.
Pivot Length controls how selective the swing detection is. A larger value usually gives fewer levels and confirms them later.
Lookback Period sets how long a level remains in the script's working history.
Maximum Levels per Type limits stored resistance and support records so the chart does not keep growing indefinitely.
Wick Dominance Filter keeps only pivot candles whose rejection wick is larger than the body and opposite wick.
Merge Nearby Active Levels removes clutter by skipping a new pivot when an active level of the same type is already nearby. Broken levels do not block a fresh one.
The merge distance uses ATR-14, so it adjusts to the instrument instead of relying on one fixed price interval.
Breakouts
The default breakout mode is Close . Resistance must close above its boundary, while support must close below it. This avoids counting every small wick through a level.
Wick mode reacts earlier. It triggers when the high or low crosses the boundary during the live candle. The recorded extreme cannot retract, but price can still close back inside the level, so Wick mode will naturally include more intrabar fakeouts.
Breakout Buffer adds an optional ATR-based distance beyond the level. Leave it at zero for the exact boundary, or raise it if very small breaks are not useful for your chart.
By default:
A resistance breakout prints an upward blue triangle below the candle.
A support breakout prints a downward orange triangle above the candle.
The marker colours are fully adjustable.
Retests and role reversals
After resistance breaks, the script waits to see whether price can retest it as support. After support breaks, it watches for the same level to act as resistance.
RS means old resistance has been confirmed as new support.
SR means old support has been confirmed as new resistance.
Reversal Confirmation controls what counts as a retest:
Close (default) requires the retest candle to touch the original zone and close back beyond the whole zone on the new-role side.
Touch accepts any later overlap with the zone. It is more sensitive and less strict.
Once confirmed, the new role stays fixed. An RS level remains tracked as support; it does not turn red merely because the latest candle happens to sit below it.
When a flip fails
A flipped level is removed when a confirmed candle closes through the far side of its zone. In other words, RS support fails below the zone and SR resistance fails above it.
If Show Reversal Failures is enabled, an ✕ marks the failure candle. The flipped line stops there, but the cross stays on the chart as a record of where the level died. That is why a failure cross can appear without a continuing line.
Breakout triangles and failure crosses use the original pivot as their Lookback anchor. This keeps their expiry on the same structural clock as the level they came from instead of giving every marker a new lifetime from its event candle.
Reading the chart
R1 is the nearest active resistance above price, followed by R2, R3, and so on.
S1 is the nearest active support below price, followed by S2, S3, and so on.
RS marks a confirmed resistance-to-support flip.
SR marks a confirmed support-to-resistance flip.
Triangles mark breakouts. Crosses mark failed flips.
A breakout marker is an event, not an entry instruction. I find the retest more useful than the first break, but how it is traded still depends on trend, execution, and risk rules outside this indicator.
Lines, zones, and historical placement
Historical Level Start decides where an original level begins:
Confirmation (default) starts it on the bar where the pivot became known in real time.
Pivot extends it back to the swing candle. This is useful for visual context, but the level was not available on that earlier candle.
Display as Zones replaces the single-price lines with the original pivot-wick range. If that level flips, the same price range is preserved; the zone is not moved to the opposite side of the price.
Colours
The Colors group separates colours by purpose, so changing a label does not force the matching line to use the same colour.
Resistance and support lines/zones.
RS and SR lines/zones.
Resistance, support, RS, and SR price labels.
Resistance and support breakout triangles.
Support and resistance failure crosses.
Zone fills and borders use transparent versions of the selected line colour so candles remain visible underneath.
Alerts
Seven alert conditions are included:
Resistance Breakout
Support Breakout
Resistance to Support Flip
Support to Resistance Flip
Flipped Support Failed
Flipped Resistance Failed
Any S/R Event
The combined alert is useful when one alert should cover every structural event. Separate conditions are available when different actions are needed for breaks, flips, or failures.
A sensible starting setup
The defaults use Close confirmation for both breakouts and retests. Start there if you prefer signals that wait for the candle to finish. Wick breakout and Touch retest are available when earlier, more sensitive reactions are more important.
If the chart feels crowded, try increasing Pivot Length, increasing Merge Distance, enabling the Wick Dominance Filter, or reducing Maximum Levels per Type. Settings should be adjusted for the instrument and timeframe rather than treated as universal values.
Important limitations
Confirmed pivots always arrive late by Pivot Length bars. That is how pivot confirmation works, not a hidden predictive signal.
Pivot historical placement back-draws a confirmed level for context. Use Confirmation placement when real-time availability matters.
Wick mode can mark a breakout that later closes back inside the level.
The current-bar drawings rebuild while the candle updates.
The script uses chart data only. It does not request higher-timeframe data or use lookahead.
It does not place orders, calculate position size, or guarantee that a level will hold.
Use it as a structure tool, then apply your own trade plan and risk management.
Indikator

SMC Volume Footprints @silverginging全文をTradingView用のBBCode形式で英訳しました。
SMC Volume Footprints
Created by Ginzo (@silverginging)
SMC Volume Footprints is an indicator that combines candlestick price displacement with relative volume to visualize where significant price moves originated.
Rather than simply generating buy or sell signals, it is designed to be used together with Volume Profile to assess:
Which price levels have accumulated substantial trading activity
Which price levels have limited participation and may be crossed quickly
Whether the current price move has been stopped by a barrier
Whether price has broken through that barrier and can now use it as new support or resistance
“Market structure analysis” may sound complicated, but the idea is simple. Volume Profile shows where trading activity is concentrated and where it is sparse. This indicator then shows where a price move began and how strongly price and volume supported that move.
Base and Single
Base
A Base is detected when several small candlesticks and declining volume form a consolidation area. It is displayed when price closes above the high or below the low of that area.
This is a relatively higher-confidence detection designed to identify breakouts originating from areas where price and volume have compressed.
Single
When no Base is available, the indicator uses a recent reversal candle as a single-bar origin point.
A Single may appear earlier than a Base, but it can also produce more noise. For this reason, it is intended as a secondary confirmation. The script prioritizes Base structures and uses Single structures as the second option.
Thick and Thin Borders
Border thickness indicates how much relative volume accompanied the detected price move.
Thick Border
A thick border appears when relative volume exceeds the selected threshold. It represents a more prominent Footprint in which a significant price move was accompanied by above-average volume.
Under the default settings, volume of at least 1.5 times its average is emphasized with a thick border, darker coloring, and a ★ symbol.
Thin Border
A thin border appears when the price-displacement requirement is met, but volume does not reach the emphasis threshold.
A thin border does not mean that the Footprint is invalid. It means that the move has less volume confirmation than a thick-border Footprint and therefore requires additional confirmation from Volume Profile, AVWAP, or the higher-timeframe trend.
Border thickness is not a definitive buy or sell signal. It is a graded visual display that allows users to compare the volume strength of detected price moves at a glance.
What P and V Mean
Each label displays the strength of the price move and its accompanying volume.
P : Price displacement calculated by dividing the candlestick body size by ATR
V : Relative volume calculated by dividing the current volume by average volume
A higher P value indicates stronger price displacement, while a higher V value indicates stronger volume confirmation.
P, V, and border thickness make it possible to distinguish between situations such as “price moved significantly on low volume” and “both price displacement and volume were strong.”
Using the Indicator with Volume Profile
This indicator was specifically designed to be overlaid and used together with Volume Profile.
High-volume areas represent price levels where many market participants have traded. Low-volume areas contain less accumulated trading activity and may allow price to move through them more quickly.
Examples of how to interpret the combination include:
A thick-bordered Footprint appears inside a high-volume area
This may indicate an active battle between buyers and sellers or the possibility of a reaction from that price area.
Price breaks through the edge of a high-volume area with a thick-bordered Footprint
This may indicate that price has broken through a market barrier with volume confirmation.
A thin-bordered Footprint appears inside a low-volume area
Consider the possibility that price moved because of limited trading participation rather than exceptionally strong buying or selling pressure.
After a breakout, price returns to the Base or BREAK CLOSE and reacts again
Observe whether the former barrier is being maintained as a new support or resistance level.
In this way, Volume Profile provides a view of the market’s “terrain,” while SMC Volume Footprints shows the price-and-volume traces left at specific locations within that terrain.
BREAK CLOSE
BREAK CLOSE is not a price target. It represents the closing price of the candlestick that confirmed the breakout from a Base or Single structure.
It can be used as a reference level to observe whether the breakout close later acts as support or resistance, or whether price moves back through it.
EXTREME and GAP are supplementary markers used to identify areas where unusually large price displacement or a price gap occurred. They are not standalone buy or sell signals.
Basic Workflow
Use Volume Profile to identify high-volume and low-volume areas.
Check where a Base or Single structure has appeared.
Use P, V, and border thickness to evaluate price displacement and volume strength.
Observe retests of BREAK CLOSE and the origin zone.
Include AVWAP and the higher-timeframe direction in the final assessment.
This indicator is not an automated trading system. It is a supporting tool for organizing the origin of price moves and evaluating the quality of breakouts.
Main Default Parameters
ATR and average-volume calculation period: 50
Volume threshold for a thick border: 1.5 times average volume
Low-volume threshold for Base formation: 0.8 times average volume
Minimum Power: 1.5
Maximum Power: 5.0
These parameters can be adjusted to suit different markets and timeframes.
Important Notes
This script uses OHLCV data available through TradingView. It is not a conventional Footprint chart that directly analyzes order-book data, order additions or cancellations, precise Bid/Ask volume, Delta, or Order Flow Imbalance (OFI).
The term “Footprints” in the indicator’s name refers to the traces that price and volume leave on the chart.
The nature and quality of volume data vary depending on the instrument and data provider. Some markets, including Forex, may use tick volume rather than actual traded volume.
When confirmed-bar display is enabled, detections are drawn only after the candlestick has closed. Historical detections do not guarantee future price movements or profits.
太枠・細枠の意味と、価格帯別出来高と組み合わせる設計思想を加えました。「構造判断」は平易な言葉に置き換えています。
## SMC Volume Footprints
「SMC Volume Footprints」は、ローソク足の価格変位と相対出来高を組み合わせ、強い値動きがどこから始まったのかをチャート上に可視化するインジケーターです。
単純に売買シグナルを出すのではなく、価格帯別出来高(Volume Profile)と組み合わせて、
* どの価格帯に売買が多く積み上がっているのか
* どの価格帯は売買が少なく、値段が速く通過しやすいのか
* 現在の値動きが壁に止められたのか
* その壁を突破し、今度は足場にできるのか
を判断するために作られています。
ここでいう「構造判断」とは、難しい理論ではありません。価格帯別出来高で市場の「厚い場所」と「薄い場所」を確認し、本インジケーターで値動きが始まった場所と、その動きの強さを確認することです。
### BaseとSingle
**Base**
複数の小さなローソク足と出来高の低下によって形成された持ち合いを検出し、その高値または安値を終値で突破した場合に表示します。
売買のエネルギーをためた場所から発生するブレイクを捉えるための、比較的信頼度の高い検出です。
**Single**
Baseが存在しない場合に、直近の反転足を1本の起点として検出します。
Baseより早く表示される一方、ノイズも多くなるため、補助的な確認として使用します。本スクリプトではBaseを優先し、Singleを第二候補として扱います。
### 太枠と細枠の違い
枠の太さは、検出された値動きにどの程度の出来高が伴っていたかを表します。
**太枠**
相対出来高が設定した基準を超えた場合に表示されます。価格が大きく動いただけでなく、平均を上回る出来高が伴った、存在感の強いFootprintです。
初期設定では、出来高が平均の1.5倍以上になると太枠・濃い色・`★`で強調されます。
**細枠**
価格変位の条件は満たしているものの、出来高が強調基準に達していない場合に表示されます。
細枠は「無効」という意味ではありません。出来高の裏付けが太枠ほど強くないため、価格帯別出来高やAVWAP、上位足の方向などによる追加確認が必要なFootprintです。
枠の太さは売買の優劣を断定するシグナルではなく、出来高による強弱を一目で比較するための段階表示です。
### PとVの意味
各ラベルには、値動きと出来高の強さが表示されます。
* `P`:ローソク足の実体をATRで割った価格変位の大きさ
* `V`:現在の出来高を平均出来高で割った相対出来高
Pが大きいほど価格の変位が強く、Vが大きいほど出来高による裏付けが強いことを示します。
「価格は大きく動いたが出来高は少ない」「価格変位と出来高の両方が強い」といった違いを、P・V・枠の太さによって確認できます。
### 価格帯別出来高との組み合わせ
本インジケーターは、価格帯別出来高と重ねて使用することを意図して設計されています。
価格帯別出来高の厚い場所は、多くの市場参加者が売買した価格帯です。反対に、出来高の薄い場所は売買の積み上がりが少なく、価格が速く通過しやすい場所です。
例えば、次のように確認します。
* 出来高の厚い価格帯で太枠が出た
→ 多くの売買を伴う攻防や反転の可能性を確認する
* 出来高の厚い価格帯の端を、太枠で突破した
→ 出来高を伴って壁を抜けた可能性を確認する
* 出来高の薄い価格帯で細枠が出た
→ 強い買い・売りというより、注文の少なさによって価格が動いた可能性も考える
* 突破後にBaseやBREAK CLOSEへ戻り、再び反発した
→ 以前の壁を新しい足場として維持できているかを確認する
このように、価格帯別出来高で「市場の地形」を見て、SMC Volume Footprintsで「その場所に残された値動きと出来高の痕跡」を確認します。
### BREAK CLOSE
`BREAK CLOSE`は目標価格ではなく、BaseまたはSingleからのブレイクが確定したローソク足の終値です。
その後、この価格が支持線・抵抗線として機能するか、再び割り込むかを確認するための基準として使用します。
`EXTREME`や`GAP`は、急激な価格変位やギャップが発生した場所を確認するための補助マーカーです。単独の売買シグナルではありません。
### 基本的な使い方
1. 価格帯別出来高で、出来高の厚い場所と薄い場所を確認する
2. BaseまたはSingleがどの位置に発生したかを見る
3. P・V・枠の太さから、価格変位と出来高の強さを確認する
4. BREAK CLOSEや起点ゾーンへのリテストを見る
5. AVWAPや上位足の方向も加えて最終判断する
本インジケーターは自動売買システムではなく、値動きの起点とブレイクの質を整理するための補助ツールです。
### 初期設定の主な基準
* ATR・平均出来高の計算期間:50
* 太枠となる出来高基準:平均出来高の1.5倍
* Base形成時の低出来高基準:平均出来高の0.8倍
* 最小Power:1.5
* 最大Power:5.0
各市場や時間足に応じて調整できます。
### 注意事項
本スクリプトはTradingViewから取得できるOHLCVデータを使用しています。板情報、注文の追加・取消し、正確なBid/Ask別出来高、デルタ、OFIなどを直接解析する本来のFootprintチャートではありません。
名称の「Footprints」は、価格と出来高がチャート上に残した痕跡を可視化するという意味で使用しています。
また、出来高データの性質は銘柄やデータ配信元によって異なり、FXなどではティック出来高が使用される場合があります。
確定足表示を有効にした場合、シグナルはローソク足の終値確定後に描画されます。過去の検出結果は、将来の値動きや利益を保証するものではありません。
Indikator
