Session ParmezanForex Session Range Boxes (Asia, Europe, US) — visual intraday session tracker for Forex and metals.
This indicator automatically marks the three major Forex trading sessions — Asian (Tokyo), European (London), and American (New York) — directly on your chart using dynamic colored boxes.
Each box represents the full price range (High–Low) formed during that session, helping traders visualize how volatility and liquidity evolve across the global trading day.
The script is built for intraday traders and session-based strategies, especially those who monitor breakouts from the Asian range or reactions during London–New York overlaps.
⚙️ Features
• Accurate session timing (UTC+3 / Moscow Time) — Asia: 03:00–12:00, Europe: 11:00–20:00, US: 16:00–01:00.
• Dynamic range boxes: each box expands in real time as new highs and lows are set during the session.
• Clear visual separation: each session is shown in its own color (blue for Asia, orange for Europe, green for US).
• Automatic daily reset — new boxes start every new session.
• Intraday focus only — visible up to the 1-hour timeframe (M1–H1) for clarity.
• Transparent design — semi-transparent fills keep candles readable even when sessions overlap.
• Lightweight performance — optimized use of box.new() and var variables avoids lag on lower timeframes.
🧭 Typical Use-Cases
• Identify Asian session ranges and watch for London breakouts or New York reversals.
• Visually align your intraday strategy with session volatility cycles.
• Combine with VWAP, liquidity zones, or market profile indicators for deeper confluence.
• Spot overlapping sessions — often the most active periods of the day.
Candlestick analysis
SMT + CVD (NQ vs ES) w/ AlertsSMT + CVD (NQ vs ES) w/ Alerts
This tool combines Smart Money Technique (SMT) and Cumulative Volume Delta (CVD) to highlight high-probability inflection points on NQ (primary) versus ES (secondary).
How it works
SMT condition: the primary breaks its most recent swing (High for bearish / Low for bullish) while the secondary does not break the corresponding swing within a small retest window.
CVD confirmation: at the same time, the primary’s CVD shows divergence (higher price but lower/equal CVD for shorts, lower price but higher/equal CVD for longs).
When both align, the script plots a marker/label and draws a line from the primary swing to the signal bar. Alerts are fired.
Signals & Alerts
Labels: “SMT+CVD DOWN/UP” on the signal bar.
Lines: connects the primary swing → signal bar so you can see the structure that produced the signal.
Alert names: “SMT+CVD Bearish” and “SMT+CVD Bullish.”
Inputs
Primary / Secondary symbols: defaults NQ & ES (you can change them).
Resolution: use chart timeframe or specify one.
Swing Left/Right Bars: pivot detection depth (higher = larger swings).
Break Window Bars: how many bars the secondary has to not break for SMT to be valid.
CVD Up/Down By: Close vs Previous Close (default) or Close vs Open.
Anchor CVD Daily: resets CVD at session/day start.
CVD Smoothing (EMA): smooths the CVD line (optional show).
FAST Pivots (no future bars): left-only swing detection so signals appear sooner and behave well in Replay/live.
Require Secondary Pivot: if ON, SMT checks wait for a confirmed secondary swing; if OFF, signals can appear while the secondary swing is still forming (useful for Replay/testing).
Show CVD line: optional, may compress price scale.
Non-repaint notes
With FAST Pivots ON, swings are detected with no future bars (minimal latency = leftBars).
With FAST Pivots OFF, standard pivots require rightBars future bars to confirm the swing (classic, but naturally delayed).
Tips
For intraday futures, keep leftBars/rightBars small (e.g., 3/3) and Break Window 1–3.
In Replay, enable FAST Pivots and consider disabling Require Secondary Pivot if you want signals to appear as soon as the primary breaks.
Combine with session filters, execution rules, or liquidity zones for context.
Mustang Algo - Engulfing Detector🐎 MUSTANG ALGO - ENGULFING DETECTOR
An advanced engulfing candlestick pattern detector with customizable filters for more precise trading signals.
═══════════════════════════════════════
📊 WHAT IS THIS INDICATOR?
The Mustang Algo Engulfing Detector identifies bullish and bearish engulfing patterns with advanced filtering options to reduce false signals and improve trade quality. This indicator helps traders spot high-probability reversal opportunities based on candlestick patterns and trend confirmation.
═══════════════════════════════════════
✨ KEY FEATURES
🔹 Engulfing Pattern Detection
• Bullish Engulfing: Identifies potential bullish reversals
• Bearish Engulfing: Identifies potential bearish reversals
• Real-time signal labels (BUY/SELL)
🔹 Size Filter
• Filter out small, insignificant candles
• Adjustable minimum body size percentage
• Optional filter for the engulfed candle size
• Ensures only strong patterns are detected
🔹 EMA Trend Filter
• Customizable EMA period (default: 200)
• BUY signals only above EMA (uptrend)
• SELL signals only below EMA (downtrend)
• Visual EMA line on chart
• Reduces counter-trend false signals
═══════════════════════════════════════
🎯 HOW TO USE
1. Add the indicator to your chart
2. Adjust the filters according to your trading style
3. Wait for BUY (green) or SELL (red) labels
4. Confirm with your own analysis and risk management
5. Trade in the direction of the signal
⚠️ IMPORTANT: This indicator should be used in conjunction with proper risk management and additional analysis. No indicator is 100% accurate.
═══════════════════════════════════════
⚙️ CUSTOMIZABLE SETTINGS
📏 Size Filter Group:
• Enable/Disable size filtering
• Min Body Size (%): Minimum candle body size to generate signals (0.01% - 10%)
• Check Engulfed Candle Size: Also verify the size of the engulfed candle
• Min Engulfed Body Size (%): Minimum size for the engulfed candle
📈 EMA Filter Group:
• Enable/Disable EMA filtering
• EMA Length: Period for the EMA calculation (default: 200)
• Show EMA on Chart: Display the EMA line
═══════════════════════════════════════
💡 BEST PRACTICES
✅ Use on higher timeframes (4H, Daily) for better reliability
✅ Combine with support/resistance levels
✅ Wait for candle close confirmation before entering
✅ Use proper stop-loss and take-profit levels
✅ Consider market context and overall trend
❌ Don't trade every signal blindly
❌ Don't ignore risk management
❌ Don't use on very low timeframes without additional filters
═══════════════════════════════════════
📈 RECOMMENDED SETTINGS
Conservative Trading:
• Min Body Size: 0.8% - 1.0%
• EMA Filter: Enabled (200 period)
• Check Engulfed Size: Enabled
Aggressive Trading:
• Min Body Size: 0.3% - 0.5%
• EMA Filter: Disabled or lower period (50-100)
• Check Engulfed Size: Disabled
═══════════════════════════════════════
🔒 DISCLAIMER
This indicator is provided for educational and informational purposes only. Past performance is not indicative of future results. Always conduct your own research and use proper risk management. Trading involves substantial risk of loss.
═══════════════════════════════════════
Created by Mustang Algo
Version 1.0
If you find this indicator helpful, please leave a like and comment! 🚀
R Dominant Range [CRT] by Sergi SernaR Dominant Range identifies the most influential R range located to the left of the current price action. It highlights the dominant zone that still impacts market behavior, helping traders understand which range is controlling the current structure.
False Breakout Detector with ConfirmationCandlestick analysis of a false breakout with confirmation from a single bar.
X21The X21 Dynamic Trend Indicator is an adaptive moving average system that combines SMA, EMA, and TEMA to provide real-time trend identification with dynamic color coding. This indicator automatically adjusts its visual presentation based on market conditions, making trend recognition intuitive and immediate.
Key Components
1. TEMA21 (Triple Exponential Moving Average)
Yellow Line - The most responsive trend indicator in the system
Significantly reduces lag compared to traditional moving averages
Formula: TEMA = 3×EMA1 - 3×EMA2 + EMA3
Provides early signals for potential trend changes
Ideal for timing entries and exits with minimal delay
2. SMA21 (Simple Moving Average)
Green Line - Always displayed in green regardless of trend direction
21-period simple moving average of closing prices
Represents the baseline trend reference
Acts as the primary support/resistance level in the system
3. EMA21 (Exponential Moving Average)
Dynamic Color Line - Changes color based on trend strength
Dark Green (#159015): Confirmed uptrend (bullish conditions)
Red (#f50000): Downtrend or weak trend (bearish/neutral conditions)
More responsive than SMA21 due to exponential weighting
Provides faster reaction to recent price movements
4. Dynamic Fill Band (SMA21/EMA21 Envelope)
Color-Coded Zone between SMA21 and EMA21
Light Green (#15e915, 19% transparency): Uptrend zone
Light Red (#f50000, 19% transparency): Downtrend zone
Visualizes the strength and volatility of the current trend
Width of the band indicates trend momentum and volatility
Trend Detection LogicThe indicator uses a dual-confirmation system for trend identification:
Price Position: Close must be above SMA21
Trend Slope: SMA21 must be rising (SMA21 > SMA21 )
Both conditions must be met simultaneously for an uptrend confirmation.This conservative approach reduces false signals and ensures only h
Low and Preceding High (Breakout + Bullis fgv + Extending Fib)🚀 Last Low & Preceding High: Bullish Reversal Strategy
This indicator identifies high-probability long setups by confirming a Bullish Market Structure Shift (BMS) coupled with a strong momentum filter.
🧠 Indicator Logic (How It Works)
The core function of this tool is to automatically locate the key structural points that lead to a bullish bias:
Structure Identification: It first defines a Range between the two most recent Pivot Lows. Within this range, it finds the Preceding High (the highest close before the current low) and the true Low Anchor (the lowest low/tail of the pivot low).
Breakout and Momentum Filter: A valid signal requires two conditions to be met on the current bar:
Bullish Breakout: The price must close above the Preceding High.
Marubozu Confirmation: A strong Bullish Marubozu candle (minimal wicks) must be present in the impulse move from the low, filtering for institutional strength.
Fibonacci Discount Zones: Upon confirmation, the indicator calculates and plots the discount zones (0.50, 0.618, 0.786) using the true extremes (tail-to-tail anchors). These zones start extending from the breakout candle and represent high-value areas for potential entries.
🎯 Entry and Risk Management
The strategy provides clear rules for execution once the logic is confirmed:
Entry Execution:
Wait for Retracement: Enter a Long position when the price retraces back into the colored Discount Zones (0.50 to 0.786).
Risk Control:
🛑 Stop Loss (SL): Placed below the Low Line (the swing low that initiated the move).
✅ Take Profit (TP): Placed above the High Line (the high that was broken).
Final note
"Special thanks to Mr. Mazen (@dr0chart) for developing this strategy."
BUY/SELL CROSS 1 WEEK SKIDD What it does
SRSI prints candle-attached BUY/SELL labels when StochRSI %K crosses %D in either direction—no numeric thresholds. Labels are vertically ATR-adjustable so they’re visible without clutter. A continuous MACD direction line sits above price, turning green when MACD > Signal and red when MACD < Signal.
Why it helps
Keeps entries/exits simple: true crossovers only.
Uses higher-TF StochRSI (weekly by default) to cut noise.
Visual regime filter via the color-changing MACD line.
Labels stick to the candle and move with it—clean on any zoom.
How to use
For swing trading, leave StochRSI on Weekly and enable Only signal on confirmed bar.
Use the MACD line as a directional filter: prefer BUYs when the line is green, prefer SELLs when red.
Adjust Label Vertical Distance (ATR x) so labels clear long wicks and stay readable.
Inputs
StochRSI: RSI Length, Lookback, %K/%D smoothing, Calculation TF.
Confirmation: Only signal on confirmed bar.
Labels: Vertical Distance (ATR x), Size.
MACD: Fast/Slow/Signal, MACD TF, line positioning, vertical distance, width.
Alerts
BUY (StochRSI Cross Up) and SELL (StochRSI Cross Down) included.
Notes
If you switch Only signal on confirmed bar OFF, signals can appear intra-bar and may repaint before close—use with care.
This is not financial advice; test on multiple symbols/timeframes.
Optional “Change log” (for future updates)
v1.0 — Initial public release: candle-attached StochRSI BUY/SELL labels + MACD direction line; vertical ATR spacing; weekly StochRSI default.
MIG and MC 发布简介(中文)
MIG and MC 指标帮助日内交易者快速识别微型缺口(Micro Gap)与微型通道(Micro Channel)。脚本支持过滤开盘跳空、合并连续缺口,并自动绘制
FPL(Fair Price Line)延伸线,既可追踪缺口是否被填补,也能直观标注潜在的趋势结构。为了确保跨周期一致性,最新版本对开盘前后和跨日场景做了专门处理
主要特性
- 自动检测并显示看涨/看跌微型缺口,支持按需合并连续缺口。
- 自定义是否忽略开盘缺口、缺口显示范围与 FPL 样式。
- FPL 触及后即停止延伸,辅助研判缺口是否真正回补。
- 内置强收盘与缺口过滤的微型通道识别,可选多种严格程度。
- 适用于 1/5/9 分钟等日内周期,也适用于更长周期。
Recommended English Description
The MIG and MC indicator highlights Micro Gaps and Micro Channels so you can track true intraday imbalances without noise. It merges
consecutive gaps, projects Fair Price Lines (FPL) that stop once touched, and offers a full intraday-ready opening-gap filter so your
early bars stay clean. The latest update refines cross-session handling, giving reliable gap plots on 1-, 5-, and 9-minute charts as well as higher time frames.
Key Features
- Detects bullish and bearish micro gaps with optional gap merging.
- Toggle opening-gap filters and configure look back, visibility, and FPL style.
- FPL lines stop as soon as price revisits the gap, making gap closure obvious.
- Micro Channel mode uses strong-close and gap filters to mark high-quality trend legs.
- Consistent behavior across intraday and higher time frames.
Institutional AbsorptionHighlights potential zones where institutional participants may be absorbing aggressive buying or selling pressure.
It analyzes candle structure and volume to detect possible bullish and bearish absorption events, providing a visual cue for traders studying market imbalance and liquidity dynamics.
The script compares each candle’s wick–body ratio and volume relative to its moving average.
A bullish absorption setup occurs when strong volume appears after a sharp downward move with long lower wicks, while bearish absorption occurs after upward moves with long upper wicks, suggesting the presence of large counter-orders.
+ Features
Detects bullish and bearish absorption candles.
Customizable wick to body ratio and volume multiple thresholds.
Optional filter to require candle color alignment with trend (green/red).
Option to ignore tiny body (doji-like) candles.
+ How to Use
Adjust wick–body ratio, volume multiplier, and lookback length under “Conditions (Absorption)”.
Enable “Require candle color” to strengthen directional context.
Use alerts to receive notifications when new absorption signals appear.
+ Notes
This tool aims to visualize possible absorption behavior, not confirm institutional activity.
Combine it with your broader market structure, volume, or order flow analysis for a more comprehensive analysis.
Yit BBIn this script the deviation is 1.25 the normal standard issue Bollinger band indicator uses 2. for my type of trading I don't have time price action to wait for a 2 STDRD DEV. this is a more aggressive type of indicator.
The MA is the 10 day.
Calculadora Stop Promedio MNQ (10 Velas) //@version=5
indicator("Calculadora Stop Promedio MNQ (10 Velas) - Corregido", overlay=true, max_lines_count=50, max_labels_count=50)
// ---------- Parámetros ----------
len = input.int(10, "Velas para promedio", minval=1)
tick_size = input.float(0.25, "Tick size (MNQ = 0.25)")
show_label = input.bool(true, "Mostrar etiqueta")
show_line = input.bool(true, "Mostrar línea")
// ---------- Protección: esperar suficientes barras ----------
enoughBars = bar_index >= (len - 1)
// ---------- Cálculo stop promedio (alto - bajo) ----------
var float stopPromedio = na
if enoughBars
float suma = 0.0
for i = 0 to len - 1
suma += high - low
stopPromedio := suma / len
else
stopPromedio := na
// ---------- Conversion a ticks ----------
stopTicks = not na(stopPromedio) ? stopPromedio / tick_size : na
// ---------- Nivel donde se colocaría el stop (visual) ----------
yStop = not na(stopPromedio) ? close - stopPromedio : na
// ---------- Crear / actualizar línea ----------
// Usamos xloc.bar_index para coordenadas por barras
var line stopLine = na
if show_line and not na(yStop)
if na(stopLine)
stopLine := line.new(x1 = bar_index - 1, y1 = yStop, x2 = bar_index, y2 = yStop, xloc = xloc.bar_index, extend = extend.none, color = color.red, width = 2)
else
line.set_xy1(stopLine, bar_index - 1, yStop)
line.set_xy2(stopLine, bar_index, yStop)
line.set_color(stopLine, color.red)
else
// Si ocultamos o no hay yStop, borramos línea si existe
if not na(stopLine)
line.delete(stopLine)
stopLine := na
// ---------- Crear / actualizar etiqueta ----------
var label stopLabel = na
if show_label and not na(yStop) and enoughBars
txt = "Stop promedio: " + str.tostring(stopTicks, format.volume) + " ticks"
if na(stopLabel)
stopLabel := label.new(x = bar_index, y = yStop, text = txt, xloc = xloc.bar_index, style = label.style_label_left, color = color.new(color.red, 0), textcolor = color.white, size = size.small)
else
label.set_xy(stopLabel, bar_index, yStop)
label.set_text(stopLabel, txt)
else
if not na(stopLabel)
label.delete(stopLabel)
stopLabel := na
// ---------- Output en Data Window (opcional) ----------
plotchar(stopPromedio, title="Stop promedio (price units)", char=' ', display=display.none)
plotchar(stopTicks, title="Stop (ticks)", char=' ', display=display.none)
Oversold Screener · Webhook v3.3#Oversold Screener · Webhook v3.3
US Equities · 15-minute signals · AVWAP entries A–F · Optional CVD gate
## TL;DR
This indicator finds short-term, emotion-driven selloffs in large, liquid US stocks and pings your webhook with a compact alert (symbol + 15-minute close time).
It anchors an Event-AVWAP at the first qualified 15-minute bar after the selloff and proposes disciplined “right-side” entries (A–F) as price mean-reverts back through statistically defined bands. Optional macro fuses and CVD filters help avoid catching knives.
---
## What it does
1. Universe filter (off-chart): You run this on constituents of S&P 500 / Nasdaq-100 / Nasdaq Golden Dragon (or your curated list of healthy companies).
2. Signal (Step-2): On the 15-minute timeframe—including extended hours—the script flags an “oversold event” when:
• Depth: Today’s drawdown vs yesterday’s RTH reference (min of yesterday’s VWAP and Close) is large.
• Relative: The stock underperforms both its market benchmark (e.g., SPY/QQQ) and its sector ETF over the same 16/32×15m windows.
• Macro fuses: If any of the following exceed thresholds, the signal is suppressed: VIX spike, market 16/32×15m selloff, sector 16/32×15m selloff.
• RSI guard: 1-hour RSI is below a configurable level (default 30).
• Cooldown: De-dupes repeated events; you won’t be spammed by the same name intraday.
3. Execution geometry: At the event bar’s close the indicator anchors an AVWAP calculated natively in 15m space and draws ±1σ/±2σ/±3σ bands from a rolling variance of typical price.
4. Entry proposals: It labels A–F entries when price regains key bands after first probing the lower ones (see below). Optional 15m CVD confirmation can be required.
5. Alerts: When the event closes, TradingView raises a single alert with a tiny JSON payload so your downstream AI/service can do the news check and decide.
---
## Why this approach works
• Depth vs yesterday’s RTH reference targets “fresh” dislocations rather than slow trends.
• Relative filters ensure the stock fell much more than both the market and its sector, isolating idiosyncratic panic.
• AVWAP from the event bar approximates the market’s true average position after the shock; band reclaims are robust right-side confirmations.
• Optional CVD (delta volume) catches sell-side exhaustion and buy-side emergence without requiring a full order-book feed.
• Macro fuses (VIX / market / sector) avoid swimming against systemic stress.
---
## Inputs (key)
Bench ETF / Sector ETF
Choose your market (SPY or QQQ) and sector ETF (XLK/XLF/XLY… or KWEB/CQQQ for China tech ADRs).
Depth & relative settings (15-minute space)
• Depth vs prior-day RTH reference: percentage thresholds for 16 and 32 bars.
• Relative to market & sector: underperformance thresholds over 16 and 32 bars.
Macro circuit breakers
• VIX max change (e.g., +8%/+12% over the session)
• Market max 16/32×15m selloff (e.g., −1.5% / −2.5%)
• Sector max 16/32×15m selloff (e.g., −2.0% / −3.0%)
If any one exceeds the limit, the signal is suppressed.
Momentum guard
• RSI(1h) < 30 (configurable).
AVWAP band engine (15m native)
• Bands: ±1σ / ±2σ / ±3σ with EMA smoothing and optional σ cap.
• Settling bars after anchor (default 1–3) to reduce immediate whipsaws.
Entry toggles
• Enable/disable A, B, C, D, E, F individually.
• Optional CVD gate (on/off), lookback window and reversal thresholds.
Housekeeping
• Debounce per ticker and per entry type.
• Entry window length (default 1 week) and per-type cap (show top 3 per event).
• Webhook on/off.
---
## Entries (A–F)
These are right-side confirmations; each requires first touching the prerequisite lower band before reclaiming a higher one.
A Touch ≤ −2σ, then cross up through −1σ (classic exhaustion → relief).
B Touch ≤ −1σ, then reclaim AVWAP (crowd average changes hands).
C Break −1σ up, retest near −1σ within N bars, then bounce (retest confirmation).
D After compression (low ATR%), reclaim AVWAP (coiled spring).
E Touch ≤ −2σ, then reclaim AVWAP after a base (deeper flush → stronger reclaim).
F Touch ≤ −3σ, then cross up through −1σ (capitulation → violent mean reversion).
Optional CVD gate (15m): require sell-pressure exhaustion and a CVD turn-up before validating entries. Defaults are conservative so that A/F remain the highest-quality.
---
## Alert payload (minimal by design)
On event close, one alert is fired with a tiny JSON:
{
"event": "step2_signal",
"symbol": "TSLA",
"ts_15m_ms": 1730879700000
}
Use “Once per bar close” and the 15-minute chart. Your webhook receiver can enrich with fundamentals/news and decide Allow / Hold / Reject, then monitor A–F entries for execution.
---
## How to use
1. Run on your 15-minute chart with extended session enabled.
2. Create one alert per chart (or use TradingView’s multi-chart / watchlist alerts if you have Pro+).
3. Your backend ingests the minimal payload, fetches news and fundamentals, and returns a decision.
4. For Allowed names, watch the on-chart A–F labels; scale in across levels, scale out into upper HVNs/POC or AVWAP give-back.
---
## Defaults that work well
• RSI(1h) < 30
• Depth vs yesterday’s RTH ref: ≤ −4% (16 bars), ≤ −6% (32 bars)
• Relative to market/sector: ≤ −3% (16 bars), ≤ −4% (32 bars)
• Macro fuses: VIX day change ≤ +10%; market ≤ −2.0% / −3.0%; sector ≤ −2.5% / −3.5%
• AVWAP bands: EMA(σ)=3; σ cap off; settle ≥ 1 bar
• CVD gate off initially; enable after you’re comfortable with its behavior.
---
## Notes & limitations
• Indicator, not a strategy: it proposes event points and entries; position sizing and exits are up to you.
• Designed for US equities with ample liquidity; thin names will be noisy.
• Repainting: AVWAP and bands are anchored and do not repaint; entries are evaluated on bar close.
• To keep charts readable, we limit entry labels to the first three occurrences per type within the one-week window.
---
## What’s new in v3.3
• 15-minute event engine (always 15m, independent of the chart you view).
• Depth measured vs yesterday’s RTH VWAP/CLOSE (the lower of the two).
• Removed structure-health (SMA50 coverage) and MA50/200 position checks.
• Macro circuit breakers: VIX + market + sector thresholds; any one trips a fuse.
• RSI guard moved to 1-hour.
• AVWAP bands include ±3σ and new Entry F (−3σ → −1σ reclaim).
• Optional 15m CVD gate for entries.
• Minimal webhook payload for fast downstream AI checks.
• Debounce + entry-window caps to prevent over-labeling and to focus the week after the event.
• Numerous performance and stability tweaks in the 15m security sandbox.
---
## Disclaimer
This is a research tool. It does not constitute investment advice. Test in Replay first, start with small size, and respect your risk.
Greed Control AlgoisGreedBar = vol > ta.sma(vol, 20) * greedVolFactor and rsi > greedRsi
isTop = high == ta.highest(high, lookback)
isBottom = low == ta.lowest(low, lookback)
ice tea//@version=6
indicator("ICT + ICC Combined Strategy", overlay=true)
// === INPUTS ===
bosSensitivity = input.int(3, "BOS Sensitivity", minval=1)
showDashboard = input.bool(true, "Show Dashboard")
dashCorner = input.string("top_right", "Dashboard Corner", options= )
// === COLORS ===
bosColorBull = color.new(color.green, 0)
bosColorBear = color.new(color.red, 0)
// === STRUCTURE & BOS LOGIC (example) ===
var bool bullishBOS = false
var bool bearishBOS = false
// Extract function calls for consistency
highestClose = ta.highest(close, bosSensitivity)
lowestClose = ta.lowest(close, bosSensitivity)
// Dummy BOS detection (replace with your actual logic)
if close > highestClose
bullishBOS := true
bearishBOS := false
else if close < lowestClose
bearishBOS := true
bullishBOS := false
else
bullishBOS := false
bearishBOS := false
// === BOS PLOTTING ===
if bullishBOS
line.new(bar_index - bosSensitivity, low , bar_index, low, color=bosColorBull, style=line.style_dotted)
label.new(bar_index, low, "BOS ↑", style=label.style_label_up, color=bosColorBull, textcolor=color.white)
if bearishBOS
line.new(bar_index - bosSensitivity, high , bar_index, high, color=bosColorBear, style=line.style_dotted)
label.new(bar_index, high, "BOS ↓", style=label.style_label_down, color=bosColorBear, textcolor=color.white)
// === ICC / SHORT-TERM DEALING RANGE LOGIC (simplified example) ===
var float stHigh = na
var float stLow = na
if bullishBOS
stLow := low
stHigh := high
else if bearishBOS
stLow := low
stHigh := high
plot(stHigh, title="ST High", color=color.orange, linewidth=1)
plot(stLow, title="ST Low", color=color.orange, linewidth=1)
// === DASHBOARD PANEL ===
if showDashboard
// choose table position
dashPosition = switch dashCorner
"top_left" => position.top_left
"bottom_left" => position.bottom_left
"bottom_right" => position.bottom_right
=> position.top_right
var table dash = table.new(dashPosition, 2, 2, bgcolor=color.new(color.black, 85), frame_color=color.new(color.white, 70))
// Higher time frame bias placeholder (replace with actual HTF logic)
htfBias = bullishBOS ? "bullish" : bearishBOS ? "bearish" : "neutral"
htfTxtColor = htfBias == "bullish" ? color.new(color.green, 0) : htfBias == "bearish" ? color.new(color.red, 0) : color.new(color.yellow, 0)
sigTxtColor = bullishBOS ? color.new(color.green, 0) : bearishBOS ? color.new(color.red, 0) : color.new(color.yellow, 0)
table.cell(dash, 0, 0, "1H Bias:", text_color=color.white, text_size=size.small)
table.cell(dash, 1, 0, str.upper(htfBias), text_color=htfTxtColor, text_size=size.small)
table.cell(dash, 0, 1, "15M Signal:", text_color=color.white, text_size=size.small)
table.cell(dash, 1, 1, sigTxtColor == color.new(color.green, 0) ? "Buy Setup" : sigTxtColor == color.new(color.red, 0) ? "Sell Setup" : "Waiting", text_color=sigTxtColor, text_size=size.small)
First Candle of the Day - PavThis indicator detects and marks the first candle of each new day for that timeframe.
Works in any timeframe (1m, 5m, 15m, 1h, etc.)
Works automatically when the date changes
BX-Indicator
The BX-ndicator is a comprehensive multi-timeframe technical analysis tool that combines trend-following, momentum, and volatility indicators to provide traders with clear visual signals for market analysis and decision-making.
Key Components
1. TEMA (Triple Exponential Moving Average)
TEMA21 (Yellow line): Fast-reacting trend indicator that reduces lag compared to traditional moving averages
TEMA55 (Red line): Medium-term trend confirmation line
These lines help identify short to medium-term trend direction and momentum shifts
2. Moving Average System
MA21 (Green): Short-term trend reference
MA34 (Orange): Swing trading reference
MA55 (Magenta): Medium-term trend line
MA89 (Blue): Intermediate trend filter
MA144 (Dark Red): Long-term trend baseline
3. Exponential Moving Averages (EMA)
EMA21 (Dark Green): Fast exponential trend
EMA55 (Purple): Medium exponential trend
EMA144 (Pink): Long-term exponential support/resistance
4. Dynamic Bands (Filled Zones)
Three colored bands provide visual trend zones:
Green Band (21-period): SMA21/EMA21 envelope - short-term volatility zone
Purple Band (55/62-period): SMA55/SMA62 envelope - medium-term consolidation zone
Red Band (144/233-period): EMA144/EMA233 envelope - long-term trend channel
5. VWAP (Volume Weighted Average Price)
White line representing the average price weighted by volume
Resets based on selected anchor period (Session/Week/Month/Year/All Time)
Critical reference point for institutional trading levels
6. Bollinger Bands
21-period SMA with 2 standard deviation bands (Cyan lines)
Measures price volatility and identifies overbought/oversold conditions
Helps identify potential breakout or mean reversion opportunities
Trading Applications
Trend Identification: Multiple MA/EMA crossovers confirm trend direction
Support/Resistance: Dynamic bands and VWAP provide key price levels
Volatility Assessment: Bollinger Bands measure market volatility expansion/contraction
Entry/Exit Timing: TEMA lines provide early trend reversal signals
Risk Management: Colored bands help visualize position relative to different timeframe trends
Crash Stats 15m (ETH) — X% | prev RTH min(VWAP, Close)# Crash Stats 15m (ETH) — X% Drawdown Event Analyzer
A 15-minute indicator that scans up to the last 5 years to find **crash events** where the close falls by at least **X%** relative to the **lower of** the prior day’s **RTH VWAP** and **RTH close**. It then measures recovery and follow-through behavior, tags the market regime around each event, and summarizes everything in a table.
---
## What the script detects
**Crash event (trigger):**
* On a 15-minute bar, `close <= refPrice * (1 - X%)`.
* `refPrice = min(previous RTH VWAP, previous RTH close)`.
* First touch only: subsequent bars below the threshold on the same trading day are ignored.
* Extended hours (ETH) are supported; if ETH is off, the script safely infers the previous RTH reference.
**Per-event measurements**
1. **Time to “turn up”** – first close **above the event-anchored AVWAP** (AVWAP cumulated from the trigger bar onward).
2. **Time to recover the reference price** – first close ≥ `refPrice`.
3. **Time to recover Y% above the crash-day average price** – first close ≥ `crashDayVWAP * (1+Y%)`.
4. **Post-crash lowest price & timing** – the lowest low and how long after the event it occurs, within a user-defined horizon (default 10 trading days, approximated in calendar days).
5. **Intraday RTH low timing** – on the crash day’s RTH session, when did the day’s intraday low occur, and **was it on the first 15-minute bar**?
6. **First 15-minute low of the RTH day** – recorded for context.
All durations are shown as **D days H hours M minutes**.
---
## Regime tagging (A / B)
For each event the script classifies the surrounding trend using daily closes:
* Let `r6m = (prevClose – close_6mAgo) / close_6mAgo`,
`r12m = (prevClose – close_12mAgo) / close_12mAgo`.
* **A**: both `r6m > 0` and `r12m > 0` (uptrend across 6m & 12m).
* **B**: one positive, one negative, and `r6m + r12m ≥ 0` (mixed but net non-negative).
* Otherwise: **—**.
This helps separate selloffs in strong uptrends (A) from mixed regimes (B) and others.
---
## Inputs
* **X — Crash threshold (%)**: default 5.
* **Y — Recovery above crash-day average (%)**: default 5.
* **Lookback years**: default 5 (bounded by data availability).
* **Horizon for post-crash lowest (trading days)**: default 10 (approximated as calendar days).
* **RTH session**: default `09:30–16:00` (exchange timezone).
* **Show markers**: plot labels on triggers.
* **Rows to display**: last N events in the table.
---
## Table columns
* Index, **Trigger time**, **Drop %**, **Ref price**, **Regime (A/B/—)**
* **Time to turn up** (above anchored AVWAP)
* **Time to ref price**, **Time to day VWAP + Y%**
* **Window lowest price**, **Time to window low**
* **RTH first-15m low**, **RTH lowest time**, **Was RTH low on first 15m?**
* **Crash-day VWAP**
---
## How to use
1. **Set chart to 15-minute** and **enable extended hours** for equities (recommended).
2. Keep defaults (**X=5%, Y=5%**) to start; tighten to 3–4% for more frequent events on less volatile symbols.
3. For non-US symbols or futures, adjust the **RTH session** if needed.
4. Read the table (top-right) for per-event diagnostics and aggregate averages (bottom row).
---
## Notes & implementation details
* Works whether ETH is on or off. If ETH is off, the script back-fills “previous RTH” references at the next RTH open and uses the prior daily close as a fallback.
* The “turn up” definition uses **event-anchored AVWAP**, a robust, price–volume anchor widely used for post-shock mean reversion analysis.
* Events are **de-duplicated**: only one event per trading day (per target RTH cycle).
* Lookback is limited by your plan and the data vendor. The script requests deep history (`max_bars_back=50000`), but availability varies by symbol.
* Durations use minute precision and are rendered as **days–hours–minutes** for readability.
---
## Quick troubleshooting
* **No events found**: lower **X%**, enable **ETH**, or ensure sufficient history is loaded (scroll back, or briefly switch to a higher timeframe to force deeper backfill, then return to 15m).
* **RTH boundaries off**: check the **RTH session** input matches the venue.
* **Few rows in table**: increase **Rows to display**.
---
## Typical use cases
* Back-test how fast different symbols tend to stabilize after a sharp gap-down or intraday shock.
* Compare recovery behavior across regimes **A / B** for sizing and risk timing.
* Build playbooks: e.g., if the RTH low occurs on the first 15m bar X% of the time, plan entries accordingly.
---
## Changelog
* **v1.0**: Initial public release with crash detection, anchored-AVWAP reversal, reference & VWAP+Y recovery timers, regime tagging, window-low timing, RTH low timing, and first-15m low capture.
PHD-Points
The PHD Pivot Points indicator is a professional-grade support and resistance tool that calculates key price levels based on previous day's price action and current intraday data. It provides traders with multiple reference points for identifying potential reversal zones, breakout levels, and strategic entry/exit positions.
Key Components
1. Previous Day Pivot Point (P)
White Line - The main pivot level calculated from previous day's High, Low, and Close
Formula: P = (Previous High + Previous Low + Previous Close) / 3
Serves as the central reference point for the trading day
Often acts as a psychological support/resistance level
2. Previous Day Support Levels (D1, D2, D3)
Brown Lines - Three support levels below the previous day's pivot
D1 (Support 1): First support level, closest to pivot
D2 (Support 2): Second support level, medium-strength
D3 (Support 3): Third support level, strongest support
Calculated using previous day's high and low ranges
3. Previous Day Resistance Levels (H1, H2, H3)
Yellow-Brown Lines - Three resistance levels above the previous day's pivot
H1 (Resistance 1): First resistance level, closest to pivot
H2 (Resistance 2): Second resistance level, medium-strength
H3 (Resistance 3): Third resistance level, strongest resistance
Calculated using previous day's high and low ranges
4. Today's Pivot Point (PT)
Dark Red Line - Dynamic pivot point that updates throughout the current trading session
Formula: PT = (Current High + Current Low + Current Close) / 3
Provides real-time trend reference for intraday trading
Helps identify intraday momentum and trend strength
5. Today's Dynamic Levels (DD1-DD3, HH1-HH3)
Calculated but not plotted by default
These values represent current session's support and resistance levels
Can be used for advanced intraday analysis
Trading Applications
Support and Resistance Trading
Price tends to bounce at D1, D2, D3 levels (potential buy zones)
Price tends to stall or reverse at H1, H2, H3 levels (potential sell zones)
Breaks above/below these levels signal trend strength
Trend Identification
Price above P = Bullish bias
Price below P = Bearish bias
PT line angle shows intraday momentum direction






















