True FVGs v2This script identifies and plots true Fair Value Gaps (FVGs) using a strict three-candle structure, distinguishing between two formation types while accounting for doji candles. It draws shaded boxes to represent untraded price imbalances, with Type A and Type B gaps defined by precise wick-to-body and body-to-body relationships that reflect institutional price displacement. The indicator allows the user to control how far each FVG extends and how many recent FVGs remain visible, keeping the chart clean and relevant. This is helpful because it highlights high-probability areas where price is likely to react, enabling more precise trade planning, entries, and risk management without visual clutter. It expands on the first script (True FVGs) and allows for a more controlled design fitting each trader's desires.
Titik pangsi dan tahap
Tom's Highs & Lows (V11.0) Updated to include previous month and previous week as well as cleaned up the session background fill to limit it to the high and low of the session. Tried to streamline the menu a bit
Added - Previous Month
Added - Previous Week
Added - Daily Open - customizable time
Previous Day
Asian Session - customizable time range
London Session - customizable time range
New York Session - customizable time range
Futures Previous Day Levels (CME 5PM Correct) RAFE TRADER//@version=5
indicator("Futures Previous Day Levels (CME 5PM Correct)", overlay=true)
// ─── CONFIGURACIÓN ─────────────────────────────────────────────────────────────
tz = "America/New_York"
resetHour = 17 // 5:00 PM NY
// ─── TIEMPO ────────────────────────────────────────────────────────────────────
t = time(timeframe.period, tz)
h = hour(t)
m = minute(t)
// Detecta el reset EXACTO del día
isReset = (h == resetHour and m == 0)
// ─── VARIABLES DEL DÍA ACTUAL ──────────────────────────────────────────────────
var float curHigh = na
var float curLow = na
// ─── VARIABLES DEL DÍA ANTERIOR ────────────────────────────────────────────────
var float prevHigh = na
var float prevLow = na
var float prevClose = na
var float prevMid = na
// ─── INICIALIZACIÓN ────────────────────────────────────────────────────────────
if na(curHigh)
curHigh := high
curLow := low
// ─── ACTUALIZAR HIGH / LOW SOLO SI NO ES RESET ─────────────────────────────────
if not isReset
curHigh := math.max(curHigh, high)
curLow := math.min(curLow, low)
// ─── AL MOMENTO EXACTO DEL RESET (17:00) ───────────────────────────────────────
if isReset
// Guardamos EL DÍA QUE TERMINA
prevHigh := curHigh
prevLow := curLow
prevClose := close
prevMid := (prevHigh + prevLow) / 2
// Iniciamos el nuevo día SOLO con esta vela
curHigh := high
curLow := low
// ─── DIBUJAR NIVELES ───────────────────────────────────────────────────────────
plot(prevHigh, title="Prev Day High", color=color.red, linewidth=2, style=plot.style_linebr)
plot(prevLow, title="Prev Day Low", color=color.green, linewidth=2, style=plot.style_linebr)
plot(prevMid, title="Prev Day Mid", color=color.orange, linewidth=2, style=plot.style_linebr)
plot(prevClose, title="Prev Day Close", color=color.purple, linewidth=2, style=plot.style_linebr)
Futures Previous Day Levels (5PM NY) BARTRADER//@version=5
indicator("Futures Previous Day Levels (5PM NY)", overlay=true)
// ─── CONFIGURACIÓN ─────────────────────────────────────────────────────────────
tz = "America/New_York"
sessionResetHour = 17 // 5:00 PM NY
// ─── TIEMPO ────────────────────────────────────────────────────────────────────
t = time(timeframe.period, tz)
h = hour(t)
m = minute(t)
// Detecta la vela exacta de las 5:00 PM
isSessionReset = (h == sessionResetHour and m == 0)
// ─── VARIABLES DEL DÍA EN CURSO ────────────────────────────────────────────────
var float dayHigh = na
var float dayLow = na
// ─── VARIABLES DEL DÍA ANTERIOR ────────────────────────────────────────────────
var float prevHigh = na
var float prevLow = na
var float prevClose = na
var float prevMid = na
// ─── INICIALIZACIÓN ────────────────────────────────────────────────────────────
if na(dayHigh)
dayHigh := high
dayLow := low
// ─── ACTUALIZAR HIGH / LOW DEL DÍA ─────────────────────────────────────────────
dayHigh := math.max(dayHigh, high)
dayLow := math.min(dayLow, low)
// ─── RESET A LAS 5:00 PM (CIERRE FUTUROS) ──────────────────────────────────────
if isSessionReset
prevHigh := dayHigh
prevLow := dayLow
prevClose := close
prevMid := (prevHigh + prevLow) / 2
// Reset para el nuevo día
dayHigh := high
dayLow := low
// ─── DIBUJAR NIVELES ───────────────────────────────────────────────────────────
plot(prevHigh, title="Prev Day High", color=color.red, linewidth=2, style=plot.style_linebr)
plot(prevLow, title="Prev Day Low", color=color.green, linewidth=2, style=plot.style_linebr)
plot(prevMid, title="Prev Day Mid", color=color.orange, linewidth=2, style=plot.style_linebr)
plot(prevClose, title="Prev Day Close", color=color.purple, linewidth=2, style=plot.style_linebr)
WVF TREND + ATR Zone + Smart Pivot ZonesThis indicator combines Williams Vix Fix (WVF) EMA, ATR-based dynamic zones, and Smart Pivot Zones into a single, clean overlay tool designed to help visualize market pressure, volatility, and key structural levels on the chart.
Core Components
WVF EMA Overlay
The WVF value is smoothed with an EMA and projected onto the price chart. This helps visualize relative market stress and momentum behavior directly on price.
ATR-Based WVF Zone
An adaptive zone is calculated around the WVF EMA using ATR.
This zone reflects current volatility conditions and adjusts automatically as market activity changes.
Smart Pivot Zones
Pivot highs and lows are detected and expanded into dynamic support and resistance zones using ATR.
These zones highlight areas where price has previously reacted with significance.
Visual Logic
The WVF EMA line changes color based on price position relative to it.
The ATR zone is softly shaded to avoid clutter while maintaining context.
Pivot zones are clearly separated into support (low pivots) and resistance (high pivots).
Purpose
This indicator is intended to provide context, not signals.
It helps traders visually assess:
Volatility expansion or contraction
Areas of historical price reaction
The relationship between price structure and volatility-based pressure
Important Notice
This indicator does not generate buy or sell signals and should not be considered financial advice.
It is a visual analysis tool meant to be used alongside other forms of technical analysis and proper risk management.
Market Waves [Smart Trend & Signals]Market Waves
Overview
Market Waves is a comprehensive technical analysis tool designed to identify market trends with minimal lag while filtering out noise. By combining a modified Hull Moving Average (HMA) with Volatility Bands (ATR), this indicator provides a clear visual representation of market direction, entry signals, and automated Take Profit targets.
Key Features
1. Low-Lag Trend Detection
The core of this indicator uses a custom HMA variation to smooth out price action without the delay common in standard moving averages.
• Bullish Trend: The trend ribbon turns Teal when price breaks above the lower volatility band.
• Bearish Trend: The trend ribbon turns Red when price breaks below the upper volatility band.
2. Smart Signals & Power Filter
The indicator generates two types of signals to help you gauge entry quality:
• Standard Signals (BUY / SELL): Generated purely on trend reversals. Good for early entries.
• Power Signals (BUY+ / SELL+): These are high-probability setups that pass a multi-factor filter:
• Trend Confirmation: The primary trend must flip.
• RSI Momentum: RSI must be above 50 (for Buy) or below 50 (for Sell).
• Volume Spike: Volume must exceed the 20-period average (optional in settings).
3. Automated Take Profit Targets
Upon every new signal, the indicator automatically projects three Take Profit levels based on market volatility (ATR) at the moment of entry:
• TP1: Conservative target (1x Risk).
• TP2: Moderate target (2x Risk).
• MAX PROFIT: Aggressive target (4x Risk).
4. Accumulation Bar Coloring
Candles are colored to reflect the true strength of the move:
• Teal/Red: Strong trend active.
• Gray: Accumulation or consolidation phase. This helps traders avoid chopping markets or weak signals.
5. Confidence Score
A dynamic percentage (50% - 99%) is displayed above signals, calculated based on the steepness and momentum of the wave change, giving you an instant metric of the trend's initial strength.
How to Use
1. Identify Trend: Look at the colored ribbon. Do not trade against the ribbon color.
2. Wait for Signals: Look for "BUY" or "SELL" labels. For higher accuracy, wait for the "+" signals (e.g., "BUY+").
3. Confirm with Color: Ensure the bar color is not Gray (Weak/Accumulation). A Teal bar confirms a Buy; a Red bar confirms a Sell.
4. Manage Trade: Use the trend ribbon as a trailing stop-loss and the projected TP lines for exiting positions.
Settings
• Wave Length: Adjusts the smoothness of the trend (Default: 24).
• Sensitivity Factor: Multiplier for the ATR bands. Higher values reduce false signals but may delay entry (Default: 2.0).
• Show Signals/TP: Toggles for visual elements to keep the chart clean.
ICT Killzones Auto-Extend-j0M4113ymarks out highs lows of session, midnight open, 8:30 open and many more customisable inputs
Multi-Timeframe Moving Average Tracker
Tracks user-defined higher timeframe moving averages on a 1-min chart (maybe higher?).
Useful to see where current price is in relation to a higher timeframe (e.g., 5-min, 1-hr) moving average like the 50 period. This allows the trader to determine size position risk based on personal rules (e.g., price below the 1-hr 40p EMA is high risk for lower price, so position size needs to be lightened, etc).
The higher timeframe moving average is live and plotted on the lower chart as a line (user-defined type and color) with the timeframe and period noted. It will move as the period closes (i.e., 5-min period closes every 5 minutes, 1-hr period closes every 60 minutes, etc.).
Superbank Grid The Superbank Grid automatically plots institutional-grade price zones across Forex, Indices, and Crypto, giving traders a consistent framework for identifying major liquidity areas, psychological levels, and high-probability reaction zones — on any timeframe.
This indicator is designed to eliminate guesswork by anchoring price to repeatable, whole-number structures used by professional traders.
What It Draws
Forex (All FX Pairs)
Major Zones: Every 1,000 pips
Median Levels: 500 pips
Quarter Levels: 250 & 750 pips
Minor Grid: 100-pip intervals
Examples:
EURUSD:
Major → 0.7000 · 0.8000 · 0.9000 · 1.0000 · 1.1000
Quarters → 0.7250 · 0.7500 · 0.7750
USDJPY:
Major → 60 · 70 · 80 · 90 · 100 · 110
Quarters → 62.5 · 65.0 · 67.5 · 122.5 · 125.0 · 127.5
Indices & Crypto
Major “Superbank” Zones: $10,000
Median Levels: $5,000
Minor Grid: $1,000
Ideal for:
NAS100
US30
SPX
BTC
ETH
Key Features
Works on all timeframes
Auto-adapts to Forex, JPY pairs, Indices, and Crypto
Prevents chart auto-scale distortion (“screen squish”)
Displays only relevant zones near current price
Adjustable colors, line weights, and label sizes
Optional visibility toggles for Major, Median, Quarter, and Minor levels
Best Use Cases
Identifying institutional liquidity pools
Marking reaction zones and decision points
Structuring entries, targets, and stop placement
Aligning price action with Big Money levels
Swing trading, position trading, and intraday execution
Important Notes
This indicator is a context and structure tool, not a signal generator.
Best used in combination with market structure, order flow, and risk management.
Designed to reflect how professional traders segment price, not retail indicators.
Who This Is For
Traders who think in zones, liquidity, and scale — not random indicators.
If you trade:
Forex
Indices
Crypto
and want a repeatable framework for understanding where price matters…
This tool belongs on your chart.
London Hi/Lo/50%Simple London range with 50% level and stop loss 4 points above or below London range Hi/Lo. Inspired by trader Kane's strategy. Built by clawd
Short-Term Weekly Refuges (Shelters)## // Introduction //
══════════════
Short-Term Weekly Refuges (Shelters) (WR or RS) is a structural analysis indicator designed to track price action during the current week. It combines a configurable ZigZag with Fibonacci retracements anchored to recent phases, using the Weekly Opening Price (W.O.P.) as a key reference level.
This indicator is optimized for 4H timeframe but also works on 1H and 15min charts.
## // Theoretical Foundation of the Indicator //
═══════════════════════════════
The WR (RS) indicator provides a structural framework for following price action during the current trading week.
The core concept: Recent ZigZag phases, combined with the Weekly Opening Price, create dynamic support and resistance levels that institutional traders often monitor and use for intraweek positioning. The indicator allows you to select which recent phase (1-10) serves as the Fibonacci anchor.
## // Indicator Objectives //
══════════════════
1) Display a configurable ZigZag showing recent price structure with numbered phases (1 = most recent). Users should configure the ZigZag parameters based on whether they are analyzing a Major Degree Pattern (larger swings, less noise) or a Minor Degree Pattern (smaller swings, more detail), following standard Elliott Wave terminology. Configure the ZigZag to match the degree of your analysis: use higher Depth values for Major Degree Patterns, or lower values for Minor Degree Patterns.
2) Draw Fibonacci retracements on a user-selected phase, with two modes:
• "On ZigZag": Traditional Fibonacci on the selected phase.
• "Relative to W.O.P.": Fibonacci from phase anchor (i0) to Weekly Opening Price.
3) Show Weekly Opening Price lines as horizontal references, with the current week's line extended into the future.
4) Provide Pivot Up/Down markers for additional confirmation of local highs and lows.
5) Support multiple simultaneous indicator loads with visual identifier labels to distinguish between different analysis degrees (e.g., "Major Degree Pattern" vs "Minor Degree Pattern").
6) Optional Embedded Indicator: Enable Intraday Shelters (RID) - percentage-based support/resistance levels calculated from the Daily Opening Price, useful for 1H and 15min trading.
## // Key Features //
══════════════
• **Flexible ZigZag**: Adjustable Depth, Deviation, and Backstep parameters to adapt to any asset's volatility.
• **Phase Selection**: Choose from the 10 most recent phases for Fibonacci anchoring.
• **Dual Fibonacci Modes**: Trace on the ZigZag phase itself, or relative to the Weekly Opening Price.
• **New Age Color Palette**: Professional Fibonacci color scheme used by old school experienced traders.
• **Weekly Opening Price (W.O.P.)**: Historical weekly opens plus current week projection.
• **"Show Only W.O.P." Mode**: Isolate just the Weekly Opening Price line for cleaner charts on non-4H timeframes.
• **Optional Intraday Shelters (RID)**: 11 percentage levels (±0.382%, ±1%, ±1.5%, ±2%, ±2.5%) based on Daily Opening Price.
• **Multi-Load Support**: Visual identifier tags and Large Label for running multiple indicator instances simultaneously.
## // Recommended Workflow //
═════════════════════
1) Load the indicator on a 4H chart.
2) Adjust ZigZag parameters (Depth, Deviation) until the phases match your visual analysis of recent price structure.
3) Select the phase you want to use as Fibonacci anchor (typically Phase 2, 3 or higher).
4) Choose Fibonacci mode: "On ZigZag" for phase analysis, or "Relative to W.O.P." for analysis based on weekly opening price context.
5) Monitor how price interacts with the Fibonacci levels and Weekly Opening Price throughout the week.
6) Optionally enable RID for intraday precision on 1H or 15min charts.
## // Integration with Other Refuge Indicators //
════════════════════════════════
WR (RS) is part of a complete refuge-based analysis ecosystem:
• LTR (RLP) (Long-Term Refuges): For automatic determination of the predominant phase of a ZigZag, which institutional investors choose as the basis for a Fibo whose levels calculate the projection for order placement over the following months and years.
• LTRS (RLPS) (Simple Long-Term Refuges): Simplified version of LTR in which the known coordinates of the predominant phases (obtained with the LTR indicator) of one or up to five assets are easily captured for permanent long-term operation.
• WR (RS) (Short-Term Weekly Refuges): (This indicator) For short-term tactical analysis (4H, 1H) based on chosen phases of a ZigZag that define Fibo levels generated during the near past week(s) and probably effective in the present week.
• IDR (RID) (Intra-Day Refuges): For daily operations relying on intraday levels on timeframes of 1H or less. Ideal for scalping traders.
By combining LTR, LTRS, WR and IDR, you obtain a multi-level framework that allows you to operate with clarity at any time horizon, from intraday positions to investments spanning months and years.
## // Additional Notes //
════════════════
1) Default parameters are optimized for volatile assets (crypto, tech stocks). For forex or less volatile instruments, consider reducing Deviation to 3-8%.
2) The "Phase in Development" (dashed line) shows the tentative current ZigZag segment that may still change as new bars form.
3) Bug reports, improvement proposals for the ZigZag generator, pattern determination, or Fibo composition, etc., will be greatly appreciated and taken into account for a future version. Best regards and happy hunting.
(Sorry: Spanish translation erased trying to avoid confusing publishing banning rules).
MarketStructureLab Structure Zones (FREE) This indicator highlights key structural zones where the market is most likely to:
• continue the current move
• pause, consolidate, or transition into a range
There are no buy/sell signals, arrows, or predictions.
Only structure, context, and reaction areas.
How it works
• Detects confirmed swing highs and lows using pivot logic
• Filters insignificant moves with an ATR-based threshold
• Builds structure zones (ranges, not lines) around key levels
• Displays only the active working window around the current price
• Shows a simple Market State: Trend / Range / Transition
No repaint tricks. No future leaks. Pure price structure.
How to use
Use the zones as context, not signals:
• observe reactions and acceptance
• combine with your own entry model (price action, volume, trend filter)
• works on any market and any timeframe
This tool is designed for traders who prefer clarity over complexity.
This is a FREE MVP version.
More advanced structure logic and tools will be released in future versions.
Not financial advice.
market structure, structure zones, support resistance, supply demand, swing, pivot, price action, range, trend, ATR
Engulfing Candle Mid-pointsThis Pine Script, “Engulfing Candle Mid-points,” identifies bullish and bearish engulfing candles within a user-selected intraday time range. For a candle to qualify, it must fully engulf the previous candle’s body in the opposite direction and meet a configurable minimum body size in points. When such a candle is detected, the script draws a horizontal line at the mid-point of the candle’s body, extending forward for a user-defined number of bars. The script stores only the five most recent bullish and bearish lines to keep the chart clean, and all line colors, widths, and extension lengths are configurable, allowing traders to visually track significant price moves during specific trading sessions.
Smart Liquidity & Step-TrendSmart Liquidity & Step-Trend
Overview
The Smart Liquidity & Step-Trend is a technical analysis tool designed to identify market manipulation points, specifically Liquidity Sweeps, and filter them using a Dynamic Multi-Timeframe (MTF) Trend.
By combining Price Action concepts with institutional flow logic, this indicator helps traders spot high-probability reversal zones where "Smart Money" typically enters the market by capturing retail stop-losses.
The Core Concept: Where is the Liquidity?
Markets do not move randomly. Institutional players require significant liquidity to fill their large orders. This liquidity is often found where retail traders place their stop-loss orders: above obvious swing highs and below obvious swing lows.
A Liquidity Sweep occurs when the price briefly breaks through these key levels to trigger stops/orders and then immediately reverses back into the range. This indicator visualizes these events as potential turning points.
To increase the probability of success, the Step-Trend (EMA) provides a higher-timeframe context, ensuring you are aware of the dominant market direction.
Key Features
Advanced Sweep Detection: Automatically identifies false breakouts of key swing highs and lows.
Dynamic MTF Logic:
- Trend Filter: The EMA (Exponential Moving Average) is calculated on a timeframe of your choice (e.g., 4H) even while viewing a lower timeframe (e.g., 15m).
- MTF Swings: Support and Resistance zones are derived from MTF data for higher reliability.
Temporary vs. Historical Zones:
- Mitigation Logic (Default): Zones are automatically deleted once the price closes through them. This keeps your chart clean, showing only active and relevant levels that haven't been "tested" yet.
- History Mode: Toggle "Show Historical Zones" to keep all past levels on the chart for backtesting and analysis.
ATR Filter (Zone Importance): Adjustable sensitivity to filter out market noise and focus on significant liquidity grabs.
How to Trade with This Indicator
1. Trend Confluence (Recommended)
This is the highest probability setup.
- BUY Signal: Look for a "SUPPORT" zone (teal) forming below the price while the Step-Trend EMA indicates an uptrend. This suggests a "buy-the-dip" manipulation. Use the "Trend Confluence Buy Signal" alert.
- SELL Signal: Look for a "RESISTANCE" zone (orange) forming above the price while the Step-Trend EMA indicates a downtrend. Use the "Trend Confluence Sell Signal" alert.
2. Scalping & Reversals
- Users can utilize the "SUPPORT" and "RESISTANCE" zones as potential targets or quick scalp entry points even against the main trend. Use the "Any Trend" sweep alerts for this style of trading.
Settings Explained
- Liquidity & Trend Timeframe: The timeframe used for trend calculation and swing detection.
- Swing Sensitivity: How "obvious" a high or low must be to be considered a liquidity target.
- Zone Importance (ATR Filter): Defines how deep the sweep must be relative to current volatility.
- Show Historical Zones: Switch between a clean chart (temporary zones) and a backtesting view (historical zones).
Important Notice:
No indicator is 100% accurate. This tool is intended to confirm your own analysis and trading strategies. Always use proper Risk Management and do not trade based on just one indicator.
I hope this tool will help you improve your trading!
Psico LevelsPsychological Levels - 000 / 250 / 500 / 750
This indicator automatically draws psychological price levels (.000, .250, .500, .750) directly on your chart.
Psychological levels are "round" prices that tend to attract traders' attention and often act as natural support/resistance zones. These levels are particularly relevant in forex, crypto, and indices.
FEATURES:
- Horizontal lines at .000, .250, .500, .750 levels
- Enable/disable each level individually
- Customizable colors for each level type
- Adjustable base step (default 1.0)
- Lines automatically extend to the right
SETTINGS:
- Base Step: sets the interval between main levels (1.0 = 1.000)
- Show .000/.250/.500/.750: toggle individual levels on/off
- Customizable colors for each level
HOW TO USE:
Ideal for identifying significant price zones where market reactions are likely to occur. The .000 and .500 levels are generally the most relevant, while .250 and .750 provide intermediate levels.
Perfect for scalping, day trading, and swing trading on any timeframe.
5% D/ID or 15%W DropCan be used to trigger alerts for 5% daily drops or intra-day drops or 15% drops during the past 5 days. Useful for selling puts.
Pivot Points (PP/BC/TC)A) Central Pivot (CP)
The Central Pivot is the main equilibrium level for the session. It represents fair value where buyers and sellers are balanced. Price above CP shows bullish bias; price below CP shows bearish bias.
B) Top Central (TC)
The Top Central is the upper boundary of the CPR. It acts as short-term resistance in normal conditions and support in strong bullish trends. Acceptance above TC suggests upside continuation.
C) Bottom Central (BC)
The Bottom Central is the lower boundary of the CPR. It acts as short-term support in normal conditions and resistance in strong bearish trends. Acceptance below BC suggests downside continuation.
SMT Scalping PRO (NQ vs ES)Indicator Description: SMT Scalping PRO (NQ vs ES)
SMT Scalping PRO is a specialized technical indicator designed for traders who use Smart Money Technique (SMT) divergences between two symbols — in this case, NQ (Nasdaq 100) and ES (S&P 500). The indicator helps identify potential short-term bullish and bearish market moves by analyzing swing points across both instruments.
Key Features:
Dual-Symbol Comparison: Tracks the primary symbol and a comparison symbol simultaneously, using their open prices.
Swing Detection: Automatically identifies pivot highs and pivot lows based on a user-defined sensitivity setting (Swing Sensitivity), allowing faster or slower response to price swings.
SMT Divergence Signals: Detects bullish or bearish divergences when one asset’s swing movement does not align with the other, signaling potential market turning points.
Customizable Labels: Shows SMT signals directly on the chart with configurable background color, text color, and label size for easy visualization.
Alerts: Optional alerts notify the trader when bullish or bearish SMT conditions occur, helping capture trading opportunities in real time.
Inputs:
Comparison Symbol: Symbol to compare against (default: ES).
Swing Sensitivity: Determines responsiveness of swing detection (lower = faster signals).
Label Settings: Enable/disable labels, choose label size and colors.
Alerts: Enable or disable real-time alerts for SMT signals.
Use Case:
Ideal for scalpers and short-term traders who monitor intermarket relationships and want a visual, easy-to-read indication of potential divergence-driven market moves between indices or correlated instruments.
Pivot Points - Market Structure with percent changeRULES:
1) Inputs that control pivots
• leftBars: how many bars to the left of the pivot must be lower (for a high pivot) or higher (for a low pivot).
• rightBars: how many bars to the right of the pivot must be lower (for a high pivot) or higher (for a low pivot).
These two values define the “strictness” of a swing.
2) Pivot High logic (ta.pivothigh)
A pivot high is confirmed at bar t when:
• The high at t is the maximum within the window:
○ from t - leftBars through t + rightBars
• In practical terms:
○ the prior leftBars bars have highs below that high
○ the next rightBars bars have highs below that high
In code:
• ph = ta.pivothigh(high, leftBars, rightBars)
Behavior:
• ph returns the pivot high price, but only after rightBars future bars have printed.
• Until then it returns na.
Where it is plotted:
• When ph is confirmed on the current bar, the actual pivot occurred rightBars bars ago, so we place the label at:
○ pivotBar = bar_index - rightBars
○ price = ph
3) Pivot Low logic (ta.pivotlow)
A pivot low is confirmed at bar t when:
• The low at t is the minimum within the window:
○ from t - leftBars through t + rightBars
• In practical terms:
○ the prior leftBars bars have lows above that low
○ the next rightBars bars have lows above that low
In code:
• pl = ta.pivotlow(low, leftBars, rightBars)
Same confirmation behavior:
• pl only becomes non-na after rightBars bars have passed.
• The label is plotted at bar_index - rightBars.
4) Confirmation delay (important)
Because pivots need “future” bars to confirm, every pivot is lagged by rightBars bars. This is expected and correct: it prevents repainting of the pivot point once confirmed.
5) The alternation rule (your added constraint)
On top of the raw pivot detection above, the script enforces:
• You cannot accept another pivot high until a pivot low has been accepted.
• You cannot accept another pivot low until a pivot high has been accepted.
Implementation:
• Track lastAccepted = "high" or "low".
• Only process pivotHigh when lastAccepted != "high".
• Only process pivotLow when lastAccepted != "low".
This is what prevents consecutive HHs (or LHs) printing without an intervening HL/LL pivot, and vice versa.
REALTIME BARS THAT ARE NOT REPAINTED BUT HAVE A 3 BAR DELAY ON THE CHART TIMEFRAME:
The confirmation delay is exactly rightBars bars.
• A pivot is only confirmed after rightBars future bars have printed.
• So the signal arrives rightBars × your chart timeframe after the actual turning point.
Examples:
• If rightBars = 3:
○ On a Daily chart: ~3 trading days after the pivot bar.
○ On a 65-minute chart: 3 × 65 = 195 minutes (about 3h 15m) after the pivot bar.
○ On a 10-minute chart: 30 minutes after the pivot bar.
Note: the pivot label is plotted back on the pivot bar (bar_index - rightBars), but you only learn it rightBars bars later.
Consolidation zones + BreakoutThis Pine Script v6 indicator is designed to detect consolidation zones and mark breakout entries (long or short) when price exits those zones.
Indicator purpose
Identify periods where price moves in a tight range for several consecutive bars (consolidation).
Highlight those zones on the chart with a yellow shaded area between the local high and low.
Mark potential LONG and SHORT entries when price breaks out of a consolidation zone.
Core consolidation logic
The indicator measures whether the market is “compressed” by comparing the price range of recent bars with volatility measured via ATR:
It computes the highest high and lowest low of the last lookback bars:
rangeHigh = ta.highest(high, lookback)
rangeLow = ta.lowest(low, lookback)
It calculates the current range:
rng = rangeHigh - rangeLow
It calculates ATR over atrLen bars as a volatility benchmark:
atrVal = ta.atr(atrLen)
It defines a compressed range (base consolidation) when the range is smaller than a multiple of ATR:
baseConso = rng < atrVal * atrMult
Here, atrMult controls how tight the range must be. Lower values (0.8–1.0) require strong compression; higher values (1.5–2.0) are more permissive.
Minimum bars in consolidation
To avoid calling a very short pause a consolidation, the script enforces a minimum duration:
It uses ta.barssince(not baseConso) to count how many bars have passed since the last time the consolidation condition was false.
If that count is greater than or equal to minBars, the market is considered to be in consolidation:
text
isConsolidating = ta.barssince(not baseConso) >= minBars
This prevents 2–3 sideways bars from being treated as a full consolidation zone. The minBars input lets you adapt the duration to your timeframe and trading style.
Plotting the consolidation zone
When isConsolidating is true, the script shades the consolidation area:
It plots two invisible series for the zone’s high and low:
text
pHigh = plot(rangeHigh, display = display.none)
pLow = plot(rangeLow, display = display.none)
It creates a yellow semi‑transparent fill between those lines only while in consolidation:
text
fillColor = isConsolidating ? color.new(#ffeb3b, 80) : color.new(#ffeb3b, 100)
fill(pHigh, pLow, color = fillColor, title = "Consolidation Zone")
Outside consolidation, the color becomes almost fully transparent so the shaded zone disappears. This keeps the chart clean and focuses attention on the actual ranges.
Breakout detection (LONG / SHORT)
The script then looks for breakouts when price leaves a consolidation zone:
It checks if the previous bar was inside consolidation:
wasConso = isConsolidating
A bullish breakout (LONG) occurs when:
The current bar is no longer in consolidation (not isConsolidating).
The previous bar was in consolidation (wasConso).
The close breaks above the previous consolidation high (close > rangeHigh ):
text
breakLong = not isConsolidating and wasConso and close > rangeHigh
A bearish breakout (SHORT) occurs when:
The current bar is no longer in consolidation.
The previous bar was in consolidation.
The close breaks below the previous consolidation low (close < rangeLow ):
text
breakShort = not isConsolidating and wasConso and close < rangeLow
On each breakout, a label is drawn at the breakout bar:
text
if breakLong
label.new(bar_index, low, "LONG",
style = label.style_label_up,
textcolor = color.white,
color = color.new(color.teal, 0),
size = size.tiny)
if breakShort
label.new(bar_index, high, "SHORT",
style = label.style_label_down,
textcolor = color.white,
color = color.new(color.red, 0),
size = size.tiny)
These labels highlight where price transitions from sideways action to a potential directional move.
User inputs and tuning
lookback (Bars for range)
Number of bars used to compute the consolidation high/low. Higher values produce wider, less frequent zones; lower values detect shorter consolidations.
minBars (Minimum bars in consolidation)
Minimum number of consecutive bars that must meet the compression condition. On 15‑minute charts, values between 6 and 12 often work, but this depends on the asset.
atrLen and atrMult
Control how strict the compression rule is.
atrLen: ATR period.
atrMult: maximum allowed range as a multiple of ATR.
Increasing atrMult finds more zones; decreasing it makes the filter stricter.
showText
Optional helper label with a short description, useful when sharing the script with other users on the TradingView community.
Practical usage
Apply the indicator to your preferred timeframe (for example, 15‑minute crypto charts).
Tweak lookback, minBars, and atrMult until the yellow zones match the consolidations you would mark manually.
Use the LONG and SHORT labels as areas of interest for studying range breakouts and building your own entry/exit rules, always combining them with risk management and a complete trading strategy.
This way, the script turns a visual concept—sideways consolidation followed by breakout—into a systematic, testable signal in Pine Script v6.
200 EMA Scalping 1 Minute (Only Nifty 1 Min Scalping)Only for scalping in 1 minute timeframe in Nifty 50.
HTF Flip Close Levels, Daily Weekly Monthly TASHTF Flip Close Levels (D/W/M) — Support & Resistance Tool
This indicator automatically plots Daily, Weekly, and Monthly support & resistance levels based on higher-timeframe candle close behaviour.
🔹 What this tool does
The script detects HTF momentum flips using closed candles only:
Support is created when:
A red candle is followed by a green candle
The level is drawn at the close of the red candle
Resistance is created when:
A green candle is followed by a red candle
The level is drawn at the close of the green candle
This creates objective, rule-based horizontal levels derived purely from price behavior, not indicators.
🔹 Features
✅ Plots Daily, Weekly, and Monthly levels simultaneously
✅ Works on any timeframe (1m, 5m, 1H, Daily, Weekly, etc.)
✅ Keeps full historical levels, not just the most recent ones
✅ Optional auto-hide tapped levels (when price touches them)
✅ Tap detection:
Wick touch
or Close cross/touch
✅ Levels are always based on HTF candle closes, never wicks
✅ Designed to stay consistent across timeframe changes
🔹 How to use it (IMPORTANT)
This indicator:
❌ Does NOT predict market direction
❌ Does NOT generate buy/sell signals
❌ Does NOT tell you when to enter or exit
It is a context & confluence tool.
You should use these levels together with:
Market structure
Trend analysis
Volume / orderflow / CVD
Your own entry model
Your own risk management
Think of these levels as areas of interest, not automatic trade signals.
🔹 Best use cases
Confluence with:
Local support/resistance
VWAP / Anchored VWAP
Range highs/lows
Liquidity zones
Reversal or continuation patterns
Identifying:
HTF reaction zones
Decision points
Areas where other traders are likely watching
⚠️ Disclaimer
This indicator is a technical analysis tool only.
It is NOT financial advice.
It does NOT guarantee profits.
All trading decisions and risk are your responsibility.
Use it as part of a complete trading system, not as a standalone strategy.
Engulfing Breakout StructureEngulfing Breakout Structure (EBS)
" Identify High-Probability Market Structures, Not Just Patterns. "
The E ngulfing Breakout Structure (EBS) is a professional-grade analysis tool designed to filter market noise and identify the true origins of significant price movements. While standard Engulfing patterns occur frequently, many lead to "fakeouts" within a range. EBS solves this by treating an engulfing candle as a potential "structure" that is only validated once a decisive Break-away occurs.
How it Works: The EBS Logic
Unlike traditional indicators that plot signals immediately, EBS follows a strict confirmation process:
Structure Formation (Invisible): The script internally tracks "Candidate" engulfing candles.
Break-away Validation: The structure is only drawn on the chart after price aggressively breaks out of the engulfing range, accompanied by a Fair Value Gap (FVG).
Historical Anchoring: Once confirmed, the block is plotted back to its origin, highlighting the exact zone where the market imbalance was created.
Key Features
Break-away Filter: Eliminates low-probability signals by ensuring price has left the "zone of indecision."
Dynamic Structure Plotting: Automatically draws the supply/demand blocks that acted as the catalyst for the breakout.
Smart FVG Integration: Detects and highlights the gaps created during the breakout, providing additional confluence for entry.
EBS Break-away Confirmed: Triggered the moment a new structure is validated by a decisive price breakout. This alert signals that a new supply or demand zone has been established.
EBS Structure Tested (Mitigation): Triggered when price returns to touch a previously confirmed EBS block. This "Mitigation" often presents the highest risk-to-reward entry opportunity as it tests the origin of the breakout.
Trading Strategy
The Breakout (Aggressive): Enter as soon as the EBS block and FVG appear, following the momentum.
The Retest (Conservative): Wait for price to return and "mitigate" the EBS block. This retest of a confirmed breakout structure is a classic institutional entry pattern.






















