X VIBVolume Imbalance Zones
X VIB highlights price-levels where buying or selling pressure overwhelmed the opposing side within a single bar transition, leaving a void that the market often revisits. The script paints those voids as boxes so you can quickly see where liquidity may rest, where price may pause or react, and which imbalances persist across sessions.
What it plots
For each completed calculation bar (your chart’s timeframe or a higher timeframe you choose), the indicator draws a box that spans the prior bar’s close to the current bar’s open—only when that bar-to-bar transition exhibits a valid volume imbalance (VIB) by the selected rules. Boxes are time-anchored from the previous bar’s time to the current bar’s time close, and they are capped to a configurable count so the chart remains readable.
Two ways to define “Volume Imbalance”
X VIB calculates imbalances in two complementary ways. Both techniques isolate bar-to-bar displacement that reflects one-sided pressure, but they differ in strictness and how much confirmation they require.
Continuity VIB (Bar-to-Bar Displacement)
A strict definition that requires aligned progress and overlap between consecutive bars. In practical terms, a bullish continuity VIB demands that the new bar advances beyond the prior bar’s close, opens above it, and maintains upward progress without erasing the displacement; the bearish case mirrors this to the downside.
Use when: you want the cleanest, most structurally reliable voids that reflect decisive initiative flow.
Effect on boxes: typically fewer, higher-quality zones that mark locations of strong one-sided intent.
Gap-Qualified VIB (Displacement with Gap Confirmation)
A confirmatory definition that treats the bar-to-bar displacement as an imbalance only if the transition also observes a protective “gap-like” relationship with surrounding prices. This extra condition filters out many borderline transitions and emphasizes voids that were less likely to be traded through on their formation.
Use when: you want additional confirmation that the void had genuine follow-through pressure at birth.
Effect on boxes: often slightly fewer but “stickier” zones that can attract price on retests.
Both modes are drawn identically on the chart (as boxes spanning the displacement). Their difference is purely in the qualification of what counts as a VIB. You can display either set independently or together to compare how each mode surfaces structure.
Multi-Timeframe (MTF) logic
You can compute imbalances on a higher timeframe (e.g., 15-minute) while viewing a lower timeframe chart. When MTF is active, X VIB:
Samples open, high, low, close, time, and time_close from the selected HTF in a single, synchronized request (no gaps, no lookahead).
Only evaluates and draws boxes once per HTF bar close, ensuring clean, stable zones that don’t repaint intra-bar.
How traders use these zones
Reversion into voids: Price often returns to “fill” part of a void before deciding on continuation or reversal.
Context for entries/exits: VIB boxes provide precise, mechanically derived levels for limit entries, scale-outs, and invalidation points.
Confluence: Combine with session opens, HTF levels, or volatility bands to grade setups. Continuity VIBs can mark impulse anchors; Gap-Qualified VIBs often mark stickier pockets.
Inputs & controls
Calculate on higher timeframe? Toggle MTF computation; choose your Calc timeframe (e.g., 15).
Show VIBs: Master toggle for drawing imbalance boxes.
Color & Opacity: Pick the box fill and border intensity that suits your theme.
# Instances: Cap how many historical boxes remain on the chart to avoid clutter.
Notes & best practices
Signal density: Continuity VIBs tend to be more frequent on fast charts; Gap-Qualified VIBs are more selective. Try both and keep what aligns with your trade plan.
MTF discipline: When using a higher calc timeframe, analyze reactions primarily at that timeframe’s pace to avoid over-fitting to noise.
Lifecycle awareness: Not all voids fill. Track which boxes persist; durable voids often define the map of the session.
Candlestick analysis
Tristan's Star: 15m Shooting Star DetectorThis script is designed to be used on the 1-minute chart , but it analyzes the market as if you were watching the 15-minute candles.
Every cluster of 15 one-minute candles is grouped together and treated as a single 15-minute candle.
When that 15-minute “synthetic” candle looks like a shooting star pattern (small body near the low, long upper wick, short lower wick, bearish bias), the script triggers a signal.
At the close of that 15-minute cluster, the script will:
Plot a single “Sell” label on the last 1-minute bar of the group.
Draw a horizontal line across the 15 bars at the high, showing the level that created the shooting star.
Optionally display a table cell in the corner with the word “SELL.”
This lets you stay on the 1-minute timeframe for precision entries and exits, while still being alerted when the higher-timeframe (15-minute) shows a bearish reversal pattern.
ローソク実体ブレイク(日足・4H・1H対応, ON/OFF切替付き, リプレイ安定版, テーブル表示付き)When a candlestick breaks at the body of the opposite candlestick, a horizontal line is drawn at the high and low of the broken candlestick. An arrow is drawn in the direction of the break. Available in three timeframes: daily, 4-hour, and 1-hour. Table display and individual on/off options. Might be useful for candlestick logic.
CFR - Candle Formation RatioDescription
This indicator is designed to detect candles with small bodies and significant wick-to-body ratios, often useful for identifying doji-like structures and potential accumulation areas.
Features
Filter candles by maximum body size (% of the total candle range).
Require that wicks are at least X times larger than the body.
Define the position of the body within the candle (e.g., body must be between 40% and 60% of the candle height).
Visual output: a single arrow marker when conditions are met.
Fully customizable marker color and size.
⚠️ Note: The settings of this version are currently in Turkish. An English version of the settings will be released in the future.
TF-Gated CCI x MA + ConsCount + Vol S/R — Signal (v2.6)This is a strategy based on 3 indicators with a view of predicting price of the market in the next 1.5-7.5 minutes depending on the chart you are using. it is best suitable to use with brokers like Tickz.
銘柄表示+ローソク実体ブレイク+週間ラインThree indicators in one package
1. Display symbol and timeframe
2. Mark and horizontal line at body and bar break
3. Weekly line ahead of next week's forecast
All three are independent indicators and can be used individually.
Optimized Candlestick Entry Indicator1. Conflict Prevention System:
Pattern Strength Scoring: Each pattern gets a strength score (0-1) based on how well it matches ideal characteristics
Context Filtering: Patterns only trigger in appropriate market conditions (uptrend/downtrend)
Signal Prioritization: When multiple patterns occur, only the strongest one triggers
Mutual Exclusion: Prevents simultaneous buy/sell signals on the same candle
2. Enhanced Pattern Recognition:
Minimum Strength Threshold: Configurable minimum pattern strength (default 60%)
Trend Context Awareness: Hammer/Inverted Hammer only in downtrends, Hanging Man/Shooting Star only in uptrends
Improved Ratios: Better body-to-wick ratio calculations
Volume Consideration: Patterns require meaningful price ranges
3. Smart Decision Logic:
Pattern Counting: Counts active bullish vs bearish patterns
Conflict Resolution: If both signals exist, chooses the stronger one
Final Signal Generation: Only one signal type per candle
4. Advanced Features:
Trend Filter: Optional MA-based trend filter (20-period default)
Strength Display: Shows pattern strength percentage in labels
Context Information: Alerts include trend direction
Visual Enhancements: Larger, clearer signals with strength indicators
5. Configuration Options:
Trend Filter Toggle: Enable/disable trend-based filtering
Minimum Pattern Strength: Adjust sensitivity (0.3-1.0)
Individual Pattern Control: Enable/disable specific patterns
Visual Customization: Control labels, shapes, and alerts
How It Prevents Conflicts:
Context Separation: Bullish patterns only trigger in bearish contexts and vice versa
Strength Comparison: When conflicts arise, only the strongest pattern signals
Pattern Validation: Each pattern must meet strict strength criteria
Final Decision Layer: A final logic layer ensures only one signal type per bar
This optimized version will give you clear, non-conflicting entry signals with much higher accuracy and reliability!Retry
Strong Body Close Candle (90%)This indicator highlights Strong Body Close Candles, which are single bars where the real body makes up the vast majority of the total range and the close is positioned very close to the candle’s extreme. By default, the script looks for candles where the body is at least 90% of the full high-low range, and the close falls within the top 10% (for bullish) or bottom 10% (for bearish). These settings ensure that only very strong, conviction-driven candles are marked. The script plots labels above or below qualifying bars, colors the candle accordingly, and provides alert conditions so you can be notified in real time when such a candle forms.
Both percentages are fully adjustable so you can fine-tune the strictness of the definition. For example, if you change the body threshold to 85% and the close-to-extreme threshold to 15%, the script will highlight candles where the body makes up at least 85% of the total range and the close is within 15% of the high or low. This adjustment allows for a slightly looser definition, catching more frequent signals while still maintaining strength criteria. Built-in alerts let you choose between bullish and bearish signals separately (or both), ensuring you won’t miss setups even when you’re away from the chart.
This tool is flexible across timeframes and instruments. On lower timeframes, signals may appear more frequently, highlighting intraday momentum bursts, while on higher timeframes such as daily or weekly charts, these signals often represent periods of strong directional conviction. Traders can combine this indicator with additional filters such as trend direction, volume confirmation, VWAP, or moving averages to improve reliability and fit it into their broader strategy. Because the body and close thresholds are user-defined, you have control over whether the indicator is tuned to rare but powerful candles (stricter settings) or more frequent signals (looser settings).
The indicator is designed to be non-repainting since it only evaluates candles after they close. It can be used purely visually with chart labels and bar coloring or as part of an automated workflow with TradingView alerts. Alerts are triggered on bar close whenever a bullish or bearish strong body close candle is detected, allowing you to integrate them into your trading process via pop-ups, emails, mobile notifications, or webhooks. Whether you’re looking for sharp reversals, momentum continuation signals, or simply want to filter out weaker candles, this tool provides a clear and adjustable framework for identifying high-conviction bars.
Liquidity + FVG + OB Markings (Fixed v6)This indicator is built for price-action traders.
It automatically finds and plots three key structures on your chart:
Liquidity Levels – swing highs & lows that often get targeted by price.
Fair-Value Gaps (FVG) – inefficient price gaps between candles.
Order-Blocks (OB) – zones created by strong, high-volume impulsive candles.
It also provides alerts and a small information table so you can quickly gauge the current market context.
EMA20 (Cur/1H/D) + 5m Bar CountPlots EMA20 for current TF, 1H, and Daily, plus a 5-minute bar counter starting from 09:30 NY time, showing every Nth bar (default 2).
VWAP Exhaustion Bars - HyruVWAP Exhaustion Bars
Quick visual spotting of market exhaustion levels with color-coded RSI bars and VWAP bands.
What it does:
Colors candles based on RSI exhaustion levels (5 red shades for overbought, 4 green for oversold)
Shows rolling VWAP with standard deviation bands
Drops triangle alerts when price hits the bands - red for resistance, green for support
Built-in alerts for extreme levels and band touches
Perfect for:
Scalping reversals at exhaustion points
Identifying potential bounce zones
Quick visual confirmation of overbought/oversold conditions
Clean, fast, and gets straight to the point. No clutter, just actionable signals when you need them most.
Default settings work great, but tweak the RSI length and thresholds to match your trading style.
MACD Josh MACD Study — Visual Crossover Tags
Overview:
This script displays MACD signals in a clear, visual way by showing:
Histogram = EMA(Fast) − EMA(Slow)
Signal = EMA(Histogram, Signal Length)
It adds labels and arrows to help you see crossover events between the Histogram and the Signal line more easily.
⚠️ Disclaimer: This tool is for educational and research purposes only. It is not financial advice or an investment recommendation. Past performance does not guarantee future results. Users should make their own decisions and manage risk responsibly.
Features
Central Zero Line with Signal and Histogram plots
Optional labels/arrows to highlight Histogram–Signal crossovers
Alerts for crossover and crossunder events, integrated with TradingView’s alert system
Standard adjustable inputs: Fast EMA, Slow EMA, Signal EMA
How to Interpret (for study only)
When the Histogram crosses above the Signal, a visual label/arrow marks a positive MACD event
When the Histogram crosses below the Signal, a visual label/arrow marks a negative MACD event
The “BUY/SELL” labels are visual study tags only — they do not represent trade instructions or recommendations
Responsible Usage Tips
Test across multiple timeframes and different assets
Combine with higher-timeframe trend, support/resistance, or volume for confirmation
Use alerts with caution, and always test in a demo environment first
Technical Notes
The script does not use future data and does not repaint signals once bars are closed
Results depend on market conditions and may vary across assets and timeframes
License & Credits
Written in Pine Script® v5 for TradingView
The indicator name shown on chart is for labeling purposes only and carries no implication of advice or solicitation
CNagda Anchor2EntryCNagda Anchor2Entry Pine Script v6 overlay indicator pulls higher-timeframe (HTF) signal events to define anchor high/low levels and then projects visual entry labels on the lower-timeframe (LTF). It also draws auto-oriented Fibonacci retracement/extension levels for context, but it does not execute orders, stops, or targets—only visual guidance.
Inputs
Key inputs include Lookback Length for HTF scanning and a Signal Timeframe used with request.security to import HTF events onto the active chart.
Entry behavior can be set to “Confirm only” or “Wait candle,” trade side can be restricted to Buy/Sell/Both, and individual strategies (Buy WAIT/S1; Sell REV/S1/S2/S3) can be toggled.
HTF logic
The script defines WAIT/BUY setup and confirmation, SELL reversal on breaking the WAIT BUY low, and several volume/candle-based patterns (Sell S1/S2/S3, Buy S1).
It captures the associated highs/lows at those events with ta.valuewhen and imports them via request.security to form anchors (anc_hi/anc_lo) and “new trigger” booleans that gate label creation on the LTF.
Flip entries
When enabled, “Flip entries” generate contrarian labels based on breaking or confirming HTF anchors: crossing above anc_hi can trigger a flip-to-sell label, and crossing below anc_lo can trigger a flip-to-buy label.
The flip mode supports Immediate (on cross) or Confirm (on sustained break) to control how strict the trigger is.
Fibonacci drawing
User-specified Fib levels are parsed from a string, safely converted to floats, and drawn as dotted horizontal lines only when they fall inside an approximate visible viewport. Orientation (up or down) is decided automatically from pending signal direction and a simple context score (candle bias, trend, and price vs. mid), with efficient redraw/clear guards to avoid clutter.
Dynamic anchors
If HTF anchors are missing or too far from current price (checked with an ATR-based threshold), the script falls back to local swing highs/lows to keep the reference range relevant. This dynamic switch helps Fib levels and labels remain close to current market structure without manual intervention.
Signal labels
Labels are created only on confirmed bars to avoid repainting noise, with one “latest” label kept by deleting the previous one. The script places BUY/SELL labels for WAIT/CONFIRM, direct HTF patterns (Buy S1, Sell S1/S2/S3), and contrarian flip events, offset slightly from highs/lows with clear coloring and configurable sizes.
Visual context
Bars are softly colored (lime tint for bullish, orange tint for bearish) for quick context, and everything renders as an overlay on the price chart. Fib labels include a Δ readout (distance from current close), and line extension length, label sizes, and viewport padding are adjustable.
How to use
Set the Signal Timeframe and Lookback Length to establish which HTF structures and ranges will drive the anchors and entry conditions. Choose entry flow (Wait vs Confirm), enable Flip if contrarian triggers are desired, select the trade side, toggle strategies, and customize Fibonacci levels plus dynamic-anchor fallback for practical on-chart guidance.
Notes
This is a visual decision-support tool; it does not place trades, stops, or targets and should be validated on charts before live use. It is written for Pine Script v6 and relies heavily on request.security for HTF-to-LTF transfer of signals and anchors.
AlgoPilotX - Breakout & Breakdown Meter (v1)Version Note:
This is a revised and improved version of the AlgoPilotX – Breakout & Breakdown Meter. It includes expanded explanations of the underlying logic, variable usage, and originality to comply with TradingView guidelines.
AlgoPilotX – Breakout & Breakdown Meter is a structured trading tool that combines Fair Value Gap (FVG) detection, session-based support/resistance breakouts, and a clean market condition info panel. It’s designed to help traders spot potential setups early and confirm stronger breakouts or breakdowns with context from momentum, volatility, and trend indicators.
How It Works
Session Levels → The first candle high/low of the session defines dynamic support/resistance. Unlike static pivots, these levels update with each new trading session and reflect real intraday sentiment.
Fair Value Gaps (FVGs) → A three-candle imbalance highlights inefficiencies. When detected, the script marks the open of the third candle as a potential entry (light green/red arrow).
Pullback Confirmations → If price pulls back into session support/resistance and then breaks away strongly, a stronger entry signal (dark green/red arrow) is plotted.
Breakouts & Breakdowns → Additional arrows appear when price crosses decisively above resistance or below support.
Signal Hierarchy → Arrows vary by color/size:
Light = early/potential setups.
Dark/Large = stronger confirmations.
Info Panel Dashboard → RSI, MACD, Bollinger Bands, and EMAs are displayed in a compact table with both numeric values and Bullish/Bearish/Neutral states, color-coded for quick interpretation.
How the Functions and Variables Work Together
Session Levels (Support & Resistance)
The script uses time() and session inputs to identify the first candle of the chosen trading session.
Variables sessionHigh and sessionLow are stored with var so they persist until the next session.
These levels are then plotted as dynamic support/resistance lines. This approach is different from static pivots or daily highs/lows, because it adapts in real-time to the market open.
Fair Value Gap (FVG) Detection
Conditions check for three-candle imbalances ( low > high for bullish, high < low for bearish).
When detected, a potential entry is marked at the open of the third candle.
Variables fvgBull and fvgBear define this logic , making FVGs a core entry condition rather than a side overlay.
Entry Hierarchy (Light vs. Dark Arrows)
longPotentialEntry and shortPotentialEntry mark light green/red arrows as early signals.
pullbackToSupport and pullbackToResistance build on these by requiring price to return to session levels and then break away again.
This creates the dark green/red arrows for stronger entries, introducing a two-step filtering process.
Breakout & Breakdown Detection
breakAbove = ta.crossover(close, sessionHigh)
breakBelow = ta.crossunder(close, sessionLow)
These conditions confirm true breakouts or breakdowns beyond support/resistance, reducing noise.
Info Panel Construction
A table is created and updated each bar.
Functions like ta.rsi(), ta.ema(), ta.sma(), and ta.stdev() calculate RSI, MACD, EMAs, and Bollinger Bands.
Each indicator’s state is summarized into human-readable text (e.g., “Bullish,” “Bearish,” “Above,” “Oversold”) and displayed with color coding using the helper function f_stateColor().
Values are also displayed numerically (RSI, MACD histogram, EMA levels, BB width), making this a dashboard rather than just arrows on a chart.
Helper Function for States
f_stateColor(state) translates qualitative states into consistent colors (green for bullish/above, red for bearish/below, orange for neutral, purple for overbought/oversold).
This ensures that every signal in the info panel has a visual identity that traders can read instantly.
Alerts Integration
alertcondition() is tied to each major event: FVG potential entries, strong pullback confirmations, and breakout/breakdown signals.
This allows the script to be used for alerts, notifications and automation , not just visual charting.
How to Use
1. Default timeframe = 15m (adjustable).
2. The first session candle defines support & resistance.
3. Watch for arrows:
Light green (▲) below candle → Potential breakout long (FVG detected).
Dark green (▲) below candle → Strong breakout confirmation after pullback.
Light red (▼) above candle → Potential breakdown short (FVG detected).
Dark red (▼) above candle → Strong breakdown confirmation after pullback.
Larger arrows = higher confidence signals.
4. Check the Info Panel for context:
RSI → momentum
MACD → trend confirmation
Bollinger Bands → overbought/oversold
EMA20 & EMA50 → short- and medium-term trend bias
5. Always confirm with your own price action, volume, and risk management rules.
6. Easily move the Info Panel to any corner of the chart via settings to keep your view clear.
Why This Structure Is Original
Not a mashup : Instead of simply overlaying RSI, MACD, or EMAs, the script integrates them into a signal-filtering framework.
Dynamic anchoring: Session-based high/low variables make levels adaptive to intraday structure, unlike fixed pivots.
Dual entry tiering: Light vs. dark arrows are built by combining FVGs + pullback conditions, offering nuance most breakout scripts lack.
Dashboard-style panel: Variables are summarized into a real-time info box with both numbers and state labels, replacing multiple chart overlays with one compact tool.
Modular functions: Breakout, pullback, FVG detection, and indicator states are modularized with separate variables — making the script flexible, extendable, and unique in design.
Disclaimer
This script is for educational purposes only. It does not constitute financial advice and does not guarantee profitable outcomes. Always backtest thoroughly, paper trade, and use proper risk management before trading live.
mohamed rebouh zigzag//
// mohamed rebouh
//@version=5
//
// THIS CODE IS BASED FROM THE MT4 ZIGZAG INDICATOR
// THE ZIGZAG SETTINGS FOR THE MAIN ONE ON TRADINGVIEW DO NOT WORK THE SAME AS MT4
// I HOPE U LOVE IT
//
indicator(' mohamed rebouh ', overlay=true)
// inputs
Depth = input(12, title='Depth') // Depth
Deviation = input(5, title='Deviation') // Deviation
// ZigZag
var lastlow = 0.0
var lasthigh = 0.0
data(x) =>
d = request.security(syminfo.tickerid, timeframe.period, x)
d
getLow(x, y, z, a) =>
lastlow1 = y
v = data(x)
m = v == lastlow1 or data(z) - v > a * syminfo.mintick
if v != lastlow1
lastlow1 := v
if m
v := 0.0
v
getHigh(x, y, z, a) =>
lasthigh1 = y
v = data(x)
m = v == lasthigh1 or v - data(z) > a * syminfo.mintick
if v != lasthigh1
lasthigh1 := v
if m
v := 0.0
v
= getLow(ta.lowest(Depth), lastlow, low, Deviation)
lastlow := e
zBB = v != 0.0
= getHigh(ta.highest(Depth), lasthigh, high, Deviation)
lasthigh := e1
zSS = v1 != 0.0
zigzagDirection = -1
zigzagHigh = 0
zigzagLow = 0
zigzagDirection := zBB ? 0 : zSS ? 1 : nz(zigzagDirection , -1)
virtualLow = zigzagLow + 1
if not zBB or zBB and zigzagDirection == zigzagDirection and low > low
zigzagLow := nz(zigzagLow ) + 1
zigzagLow
virtualHigh = zigzagHigh + 1
if not zSS or zSS and zigzagDirection == zigzagDirection and high < high
zigzagHigh := nz(zigzagHigh ) + 1
zigzagHigh
line zigzag = line.new(bar_index - zigzagLow, low , bar_index - zigzagHigh, high , color=color.red, style=line.style_solid, width=2)
if zigzagDirection == zigzagDirection
line.delete(zigzag )
Opening ATR + High Momentum (10/30/60)this is a custom momentum indicator using atr
A fixed, compiling Pine v5 script is below with the three issues corrected: no plots in local scope, a ≤10-character shorttitle, and cleaned ternaries/formatting that remove the “end of line without line continuation” error.
Custom Candle Coloring (3% Drop / Breakout / Follow-through)Naveen's custom bars. It helps with custom color of the bars to see significant candle movements and their interpretations
Liquidity+FVG+OB Strategy (v6)How the strategy works (summary)
Entry Long when a Bullish FVG is detected (optionally requires a recent Bullish OB).
Entry Short when a Bearish FVG is detected (optionally requires a recent Bearish OB).
Stop Loss and Take Profit are placed using ATR multiples (configurable).
Position sizing is fixed contract/lot size (configurable).
You can require OB confirmation (within ob_confirm_window bars).
Alerts still exist and visuals are preserved.
Multi-Timeframe MACD Score (Customizable)this is a momentum based indicator to know the trend so we go with the trend.
TF-Gated CCI+ConsCount+Vol S/R —Signal (v2.6-cci-ascdesc)This scrip take trade on turning of cci after considering valet of CM_Total consec and volume based S/R
Multi-Timeframe MACD Score(customizable)this is a momentum based indcator to know the direction of the market
Multi-Timeframe MACD Score(Customized)this is a momentum based indicator to know the direction of the market