VWAP Kalman FilterOverview
This indicator applies Kalman filtering techniques to Volume Weighted Average Price (VWAP) calculations, providing a statistically optimized approach to VWAP analysis. The Kalman filter reduces noise while maintaining responsiveness to genuine price movements, addressing common VWAP limitations in volatile or low-volume conditions.
Technical Implementation
Kalman Filter Mathematics
The indicator implements a state-space model for VWAP estimation:
- Prediction Step: x̂(k|k-1) = x̂(k-1|k-1) + v(k-1)
- Update Step: x̂(k|k) = x̂(k|k-1) + K(k)
- Kalman Gain: K(k) = P(k|k-1) / (P(k|k-1) + R)
Where:
- x̂ = estimated VWAP state
- K = Kalman gain (adaptive weighting factor)
- P = error covariance
- R = measurement noise
- Q = process noise
- v = optional velocity component
Core Components
Dual VWAP System
- Standard VWAP: Traditional volume-weighted calculation
- Kalman-filtered VWAP: Noise-reduced estimation with optional velocity tracking
- Real-time divergence measurement between filtered and unfiltered values
Adaptive Filtering
- Process Noise (Q): Controls adaptation to price changes (0.001-1.0)
- Measurement Noise (R): Determines smoothing intensity (0.01-5.0)
- Optional velocity tracking for momentum-based filtering
Multi-Timeframe Anchoring
- Session, Weekly, Monthly, Quarterly, and Yearly anchor periods
- Automatic Kalman state reset on anchor changes
- Maintains VWAP integrity across timeframes
Features
Visual Components
- Dual VWAP Lines: Compare filtered vs. unfiltered in real-time
- Dynamic Bands: Three-level deviation bands (1σ, 2σ, 3σ)
- Trend Coloring: Automatic color adaptation based on price position
- Cloud Visualization: Highlights divergence between standard and Kalman VWAP
- Signal Markers: Crossover and band-touch indicators
Trading Signals
- VWAP crossover detection with Kalman filtering
- Band touch alerts at multiple standard deviation levels
- Velocity-based momentum confirmation (optional)
- Divergence warnings when filtered/unfiltered values separate
Information Display
- Real-time VWAP values (both standard and filtered)
- Trend direction indicator
- Velocity/momentum reading (when enabled)
- Divergence percentage calculation
- Anchor period display
Input Parameters
VWAP Settings
- Anchor Period: Choose calculation reset period
- Band Multipliers: Customize deviation band distances
- Display Options: Toggle standard VWAP and bands
Kalman Parameters
- Length: Base period for calculations (5-200)
- Process Noise (Q: Higher values increase responsiveness
- Measurement Noise (R): Higher values increase smoothing
- Velocity Tracking: Enable momentum-based filtering
Visual Controls
- Toggle filtered/unfiltered VWAP display
- Band visibility options
- Signal markers on/off
- Cloud fill between VWAPs
- Bar coloring by trend
Use Cases
Noise Reduction
Particularly effective during:
- Low volume periods (pre-market, lunch hours)
- Volatile market conditions
- Fast-moving markets where standard VWAP whipsaws
Trend Identification
- Cleaner trend signals with reduced false crosses
- Earlier trend detection through velocity component
- Confirmation through divergence analysis
Support/Resistance
- Filtered VWAP provides more stable S/R levels
- Bands adapt to filtered values for better zone identification
- Reduced false breakout signals
Technical Advantages
1. Optimal Estimation: Mathematically optimal under Gaussian noise assumptions
2. Adaptive Response: Self-adjusting to market conditions
3. Predictive Element: Velocity component provides forward-looking insight
4. Noise Immunity: Superior noise rejection vs. simple moving average smoothing
Limitations
- Assumes linear price dynamics
- Requires parameter optimization for different instruments
- May lag during sudden volatility regime changes
- Not suitable as standalone trading system
Mathematical Background
Based on control systems theory, the Kalman filter provides recursive Bayesian estimation originally developed for aerospace applications. This implementation adapts the algorithm specifically for financial time series, maintaining VWAP's volume-weighted properties while adding statistical filtering.
Comparison with Standard VWAP
Standard VWAP Issues Addressed:
- Choppy behavior in low volume
- Whipsaws around VWAP line
- Lag in trend identification
- Noise in deviation bands
Kalman VWAP Benefits:
- Smooth yet responsive line
- Fewer false signals
- Optional momentum tracking
- Statistically optimized filtering
Alert Conditions
The indicator includes several pre-configured alert conditions:
- Bullish/Bearish VWAP crosses
- Upper/Lower band touches
- High divergence warnings
- Velocity shifts (if enabled)
---
This open-source indicator is provided as-is for educational and trading purposes. No guarantees are made regarding trading performance. Users should conduct their own testing and validation before using in live trading.
"weekly" için komut dosyalarını ara
Realtime Squeeze Box [CHE] Realtime Squeeze Box — Detects lowvolatility consolidation periods and draws trimmed price range boxes in realtime to highlight potential breakout setups without clutter from outliers.
Summary
This indicator identifies "squeeze" phases where recent price volatility falls below a dynamic baseline threshold, signaling potential energy buildup for directional moves. By requiring a minimum number of consecutive bars in squeeze, it reduces noise from fleeting dips, making signals more reliable than simple threshold crosses. The core innovation is realtime box visualization: during active squeezes, it builds and updates a box capturing the price range while ignoring extreme values via quantile trimming, providing a cleaner view of consolidation bounds. This differs from static volatility bands by focusing on trimmed ranges and suppressing overlapping boxes, which helps traders spot genuine setups amid choppy markets. Overall, it aids in anticipating breakouts by combining volatility filtering with visual containment of price action.
Motivation: Why this design?
Traders often face whipsaws during brief volatility lulls that mimic true consolidations, leading to premature entries, or miss setups because standard volatility measures lag in adapting to changing market regimes. This design addresses that by using a hold requirement on consecutive lowvolatility bars to denoise signals, ensuring only sustained squeezes trigger visuals. The core idea—comparing rolling standard deviation to a smoothed baseline—creates a responsive yet stable filter for lowenergy periods, while the trimmed box approach isolates the core price cluster, making it easier to gauge breakout potential without distortion from spikes.
What’s different vs. standard approaches?
Reference baseline: Traditional squeeze indicators like the Bollinger Band Squeeze or TTM Squeeze rely on fixed multiples of bands or momentum oscillators crossing zero, which can fire on isolated bars or ignore range compression nuances.
Architecture differences:
Realtime box construction that updates barbybar during squeezes, using arrays to track and trim price values.
Quantilebased outlier rejection to define box bounds, focusing on the bulk of prices rather than full range.
Overlap suppression logic that skips redundant boxes if the new range intersects heavily with the prior one.
Hold counter for consecutive bar validation, adding persistence before signaling.
Practical effect: Charts show fewer, more defined orange boxes encapsulating tight price action, with a horizontal line extension marking the midpoint postsqueeze—visibly reducing clutter in sideways markets and highlighting "coiled" ranges that standard plots might blur with full highs/lows. This matters for quicker visual scanning of multitimeframe setups, as boxes selflimit to recent history and avoid piling up.
How it works (technical)
The indicator starts by computing a rolling average and standard deviation over a userdefined length on the chosen source price series. This deviation measure is then smoothed into a baseline using either a simple or exponential average over a longer window, serving as a reference for normal volatility. A squeeze triggers when the current deviation dips below this baseline scaled by a multiplier less than one, but only after a minimum number of consecutive bars confirm it, which resets the counter on breaks.
Upon squeeze start, it clears a buffer and begins collecting source prices barbybar, limited to the first few bars to keep computation light. For visualization, if enabled, it sorts the buffer and finds a quantile threshold, then identifies the minimum value at or below that threshold to set upper and lower box bounds—effectively clamping the range to exclude tails above the quantile. The box draws from the start bar to the current one, updating its right edge and levels dynamically; if the new bounds overlap significantly with the last completed box, it suppresses drawing to avoid redundancy.
Once the hold limit or squeeze ends, the box freezes: its final bounds become the last reference, a midpoint line extends rightward from the end, and a tiny circle label marks the point. Buffers and states reset on new squeezes, with historical boxes and lines capped to prevent overload. All logic runs on every bar but uses confirmed historical data for calculations, with realtime updates only affecting the active box's position—no future peeking occurs. Initialization seeds with null values, building states progressively from the first bars.
Parameter Guide
Source: Selects the price series (e.g., close, hl2) for deviation and box building; influences sensitivity to wicks or bodies. Default: close. Tradeoffs/Tips: Use hl2 for balanced range view in volatile assets; stick to close for pure directional focus—test on your timeframe to avoid oversmoothing trends.
Length (Mean/SD): Sets window for average and deviation calculation; shorter values make detection quicker but noisier. Default: 20. Tradeoffs/Tips: Increase to 30+ for stability in higher timeframes, reducing false starts; below 10 risks overreacting to singlebar noise.
Baseline Length: Defines smoothing window for the deviation baseline; longer periods create a steadier reference, filtering regime shifts. Default: 50. Tradeoffs/Tips: Pair with Length at 1:2 ratio for calm markets; shorten to 30 if baselines lag during fast volatility drops, but watch for added whips.
Squeeze Multiplier (<1.0): Scales the baseline downward to set the squeeze threshold; lower values tighten criteria for rarer, stronger signals. Default: 0.8. Tradeoffs/Tips: Tighten to 0.6 for highvol assets like crypto to cut noise; loosen to 0.9 in forex for more frequent but shallower setups—balances hit rate vs. depth.
Baseline via EMA (instead of SMA): Switches baseline smoothing to exponential for faster adaptation to recent changes vs. equalweighted simple average. Default: false. Tradeoffs/Tips: Enable in trending markets for quicker baseline drops; disable for uniform history weighting in rangebound conditions to avoid overreacting.
SD: Sample (len1) instead of Population (len): Adjusts deviation formula to divide by length minus one for smallsample bias correction, slightly inflating values. Default: false. Tradeoffs/Tips: Use sample in short windows (<20) for more conservative thresholds; population suits long looks where bias is negligible, keeping signals tighter.
Min. Hold Bars in Squeeze: Requires this many consecutive squeeze bars before confirming; higher denoise but may clip early setups. Default: 1. Tradeoffs/Tips: Bump to 35 for intraday to filter ticks; keep at 1 for swings where quick consolidations matter—trades off timeliness for reliability.
Debug: Plot SD & Threshold: Toggles lines showing raw deviation and threshold for visual backtesting of squeeze logic. Default: false. Tradeoffs/Tips: Enable during tuning to eyeball crossovers; disable live to declutter—great for verifying multiplier impact without alerts.
Tint Bars when Squeeze Active: Overlays semitransparent color on bars during open box phases for quick squeeze spotting. Default: false. Tradeoffs/Tips: Pair with low opacity for subtlety; turn off if using boxes alone, as tint can obscure candlesticks in dense charts.
Tint Opacity (0..100): Controls background tint strength during active squeezes; higher values darken for emphasis. Default: 85. Tradeoffs/Tips: Dial to 60 for light touch; max at 100 risks hiding price action—adjust per chart theme for visibility.
Stored Price (during Squeeze): Price series captured in the buffer for box bounds; defaults to source but allows customization. Default: close. Tradeoffs/Tips: Switch to high/low for wider boxes in gappy markets; keep close for midline focus—impacts trim effectiveness on outliers.
Quantile q (0..1): Fraction of sorted prices below which tails are cut; higher q keeps more data but risks including spikes. Default: 0.718. Tradeoffs/Tips: Lower to 0.5 for aggressive trim in noisy assets; raise to 0.8 for fuller ranges—tune via debug to match your consolidation depth.
Box Fill Color: Sets interior shade of squeeze boxes; semitransparent for layering. Default: orange (80% trans.). Tradeoffs/Tips: Soften with more transparency in multiindicator setups; bold for standalone use—ensures boxes pop without overwhelming.
Box Border Color: Defines outline hue and solidity for box edges. Default: orange (0% trans.). Tradeoffs/Tips: Match fill for cohesion or contrast for edges; thin width keeps it clean—helps delineate bounds in zoomed views.
Keep Last N Boxes: Limits historical boxes/lines/labels to this count, deleting oldest for performance. Default: 10. Tradeoffs/Tips: Increase to 50 for weekly reviews; set to 0 for unlimited (risks lag)—balances history vs. speed on long charts.
Draw Box in Realtime (build/update): Enables live extension of boxes during squeezes vs. waiting for end. Default: true. Tradeoffs/Tips: Disable for confirmedonly views to mimic backtests; enable for proactive trading—adds minor repaint on live bars.
Box: Max First N Bars: Caps buffer collection to initial squeeze bars, freezing after for efficiency. Default: 15. Tradeoffs/Tips: Shorten to 510 for fast intraday; extend to 20 in dailies—prevents bloated arrays but may truncate long squeezes.
Reading & Interpretation
Squeeze phases appear as orange boxes encapsulating the trimmed price cluster during lowvolatility holds—narrow boxes signal tight consolidations, while wider ones indicate looser ranges within the threshold. The box's top and bottom represent the quantilecapped high and low of collected prices, with the interior fill shading the containment zone; ignore extremes outside for "true" bounds. Postsqueeze, a solid horizontal line extends right from the box's midpoint, acting as a reference level for potential breakout tests—drifting prices toward or away from it can hint at building momentum. Tiny orange circles at the line's start mark completion points for easy scanning. Debug lines (if on) show deviation hugging or crossing the threshold, confirming hold logic; a persistent hug below suggests prolonged calm, while spikes above reset counters.
Practical Workflows & Combinations
Trend following: Enter long on squeezeend close above the box top (or midpoint line) confirmed by higher high in structure; filter with rising 50period average to avoid countertrend traps. Use boxes as support/resistance proxies—short below bottom in downtrends.
Exits/Stops: Trail stops to the box midpoint during postsqueeze runs for conservative holds; go aggressive by exiting on retest of opposite box side. If debug shows repeated threshold grazes, tighten stops to curb drawdowns in ranging followups.
Multiasset/MultiTF: Defaults work across stocks, forex, and crypto on 15min+ frames; scale Length proportionally (e.g., x2 on hourly). Layer with highertimeframe boxes for confluence—e.g., daily squeeze + 1H box for entry timing. (Unknown/Optional: Specific multiTF scaling recipes beyond proportional adjustment.)
Behavior, Constraints & Performance
Repaint/confirmation: Core calculations use historical closes, confirming on bar close; active boxes repaint their right edge and levels live during squeezes if enabled, but freeze irrevocably on hold limit or end—mitigates via barbybar buffer adds without future leaks. No lookahead indexes.
security()/HTF: None used, so no external timeframe repaints; all native to chart resolution.
Resources: Caps at 300 boxes/lines/labels total; small arrays (up to 20 elements) and short loops in sorting/minfinding keep it light—suitable for 10k+ bar charts without throttling. Persistent variables track state across bars efficiently.
Known limits: May lag on ultrasharp volatility spikes due to baseline smoothing; gaps or thin markets can skew trims if buffer hits cap early; overlaps suppress visuals but might hide chained squeezes—(Unknown/Optional: Edge cases in nonstandard sessions).
Sensible Defaults & Quick Tuning
Start with defaults for most liquid assets on 1Hdaily: Length 20, Multiplier 0.8, Hold 1, Quantile 0.718—yields balanced detection without excess noise. For too many false starts (choppy charts), increase Hold to 3 and Baseline Length to 70 for stricter confirmation, reducing signals by 3050%. If squeezes feel sluggish or miss quick coils, shorten Length to 14 and enable EMA baseline for snappier adaptation, but monitor for added flips. In highvol environments like options, tighten Multiplier to 0.6 and Quantile to 0.6 to focus on core ranges; reverse for calm pairs by loosening to 0.95. Always backtest tweaks on your asset's history.
What this indicator is—and isn’t
This is a volatilityfiltered visualization tool for spotting and bounding consolidation phases, best as a signal layer atop price action and trend filters—not a standalone predictor of direction or strength. It highlights setups but ignores volume, momentum, or news context, so pair with discreteness rules like higher highs/lows. Never use it alone for entries; always layer risk management, such as 12% stops beyond box extremes, and position sizing based on account drawdown tolerance.
Disclaimer
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
Do not use this indicator on HeikinAshi, Renko, Kagi, PointandFigure, or Range charts, as these chart types can produce unrealistic results for signal markers and alerts.
Best regards and happy trading
Chervolino
Position Sizer (Share Qty)
This indicator enables fast & accurate position sizing for traders using (user defined) fixed dollar risk, eliminating the need for manual calculations and supporting disciplined risk management directly on the chart
Calculates precise share quantity for fixed-risk trades using the formula Shares = Risk Amount / (Current Price – Stop Price), rounded to the nearest whole share, updating in real time on every bar
Offers two dynamic stop-loss options: Low of Day (LoD) — tracked only during Regular Trading Hours (9:30 AM – 4:00 PM ET) with automatic daily reset — or Low of Week (LoW) via weekly timeframe data
Displays all critical trade data in a clean, customizable on-screen table showing: Risk Amount, Stop Loss type (LoD/LoW), Stop Price, and calculated Shares Qty
Allows full table placement control with four corner positions with optional Top Offset and Bottom Offset (0–20 blank rows each) to prevent overlap with price action or other indicators
Provides complete visual styling control for header text/background, value text/background, and share quantity text/background
Ensures efficient rendering by recreating the table only when position, row count, or layout changes, deleting the prior instance to avoid flicker or memory issues
Handles edge cases safely: shows 0 shares if stop is 'na' or above current price, and initializes LoD only on the first RTH bar of each session
For use on equities only (table will not display on futures instruments)
--
Future improvements:
Visual Stop Loss line for either LoD or LoW
Functionality and toggle to include Extended hours (PM /AH) for LoD stop pricing
Traderei SessionsTraderei Sessions shows the previous daily H/L + previous weekly H + L, daily open from the current day, the H/L from Asia/London/NY Session, including the 50% Level for Premium or Discount Price.
VPOC for each Session. VPOC do not work on FX ! only Crypto + Gold !
2 EMAs and 1 SMA, + 1 additional EMA/SMA.
default settings for EMA 20/50, SMA 200
all lines, labels can be toggled
Day of Week LetterLetters printed on the Daily candle corresponding the day of the trading week it is on. Used for weekly range logic
Set it to 'bring to front' to see it
PDH PDL Open ClosePDH/PDL/Open/Close Levels Indicator
Overview
This Pine Script indicator plots the Previous Day High (PDH), Previous Day Low (PDL), Previous Day Open (PDO), and Previous Day Close (PDC) levels on your chart. It's designed for traders who rely on key daily levels to identify potential support, resistance, and intraday reference points. The indicator supports multiple timeframes, allowing you to visualize these levels from higher timeframes (e.g., weekly or monthly) directly on lower timeframe charts.
Built with Pine Script v6, it's lightweight, customizable, and overlays seamlessly on any symbol. Lines extend slightly into the future for better visibility, and labels provide clear identification with price values.
Key Features
- Multi-Timeframe Support: Choose from predefined timeframes (5m to 1M) via the input settings to fetch and plot levels from the selected period.
- Clean Visualization:
- PDH and PDL: Solid black lines for high/low levels.
- PDO: Dotted blue line for the opening price.
- PDC: Dotted red line for the closing price.
- Dynamic Labels: Automatically placed at the end of each line, showing the timeframe and exact price (e.g., "1D High: 150.25").
- Efficient Updates: Lines and labels update in real-time without cluttering the chart—old elements are automatically cleaned up.
- Extension Handling: Lines extend 2 bars ahead by default, adjustable if needed via code modifications.
How to Use
1. Add to Chart**: Copy the script into TradingView's Pine Editor, save, and add it to your chart.
2. Customize Timeframe: In the indicator settings, select your desired timeframe (default: 1D). This pulls levels from the previous period of that timeframe.
3. Interpret Levels:
- Use PDH/PDL as potential resistance/support zones.
- PDO/PDC can highlight session biases (e.g., gap fills or continuation patterns).
- Ideal for day trading, swing setups, or aligning with higher timeframe context.
4. Best Practices: Works on any market (stocks, forex, crypto). Combine with volume or momentum indicators for confluence.
Settings
- Timeframe: Dropdown with options: 5m, 10m, 15m, 30m, 45m, 1H, 2H, 3H, 4H, 1D, 1W, 1M.
- No other inputs for simplicity—colors, styles, and extensions are hardcoded for a clean default look. Edit the script to tweak (e.g., line colors or extension length).
PIVOT-V.13 05-09-25This Pine Script automatically detects pivot levels and generates buy/sell signals based on price action around those pivots. It identifies key support and resistance zones derived from previous period highs, lows, and closes, then marks optimal entry, target, and stop-loss levels on the chart.
The script is designed to assist traders in systematic decision-making using pivot-based strategies.
🔍 Core Features
Automatic Pivot Detection: Calculates and updates pivots in real-time using standard formulas.
Smart Trade Setup:
Buy Signal: Triggered when price action confirms strength above a pivot or resistance level.
Sell Signal: Triggered when price action confirms weakness below a pivot or support level.
Entry, Target & Stop-Loss Levels: Automatically plots potential entry points, stop-loss levels, and take-profit zones based on the nearest pivot structure.
Customizable Settings:
Choose pivot type and timeframe (daily, weekly, or monthly).
Adjust risk ratio, stop size, and confirmation filters.
Enable/disable visual labels or alerts.
Visual Clarity: Clearly marks all pivot levels and trade signals on the chart with colored labels and lines.
🎯 Purpose
This script helps traders quickly identify high-probability entry zones and maintain disciplined trade management by following pre-defined pivot-based rules — reducing emotional bias and enhancing consistency.
X Tail that Wagsintraday session-framework and ETH-anchored VWAP tool for TradingView. It draws today’s OVN (ETH) high/mid/low, today’s RTH-day open, previous day open/high/low, and a carried ETH VWAP handle (yesterday’s 4:00 PM NY VWAP, projected forward) to give you a clean, non-repainting scaffold for bias, structure, and execution. All timestamps are New York–local with DST handled explicitly, so historical sessions align correctly across time changes.
Key Capabilities
ETH OVN Range (18:00 → 09:30 NY)
Captures the rolling overnight high/low and computes the mid; at 09:30 NY it locks those levels and extends them to 16:00 NY (same day).
Optional labels (size/color configurable) placed slightly to the right of the 4 PM timestamp for readability.
Daily Handles (Today & Previous Day)
Today’s open line starts at the ETH open (anchor preserved) and extends toward 4 PM NY (or up to the “current bar + 5 bars” cap), with label control.
Previous day open/high/low plotted as discrete reference lines for carry-over structure.
ETH-Anchored VWAP (Live) + Bands
ETH-anchored VWAP runs only during the active ETH session (DST-aware).
Optional VWAP bands (0.5×, 1.0×, 2.0× multipliers) plotted as line-break series.
Carried ETH VWAP Handle (PD 4 PM Snapshot)
At 16:00 NY, the script snapshots the final ETH VWAP value.
On the next ETH open, it projects that value as a static dashed line through the session (non-mutating, non-repainting), with optional label.
Labeling & Styling
Single-toggle label system with color and five sizes.
Per-line color/width controls for quick visual hierarchy.
Internal “tail” logic keeps right endpoints near price (open-anchored lines extend to min(4 PM, now + 5 bars)), avoiding chart-wide overdraw.
Robust Session Logic
All session boundaries computed in NY local time; DST rules applied for historical bars.
Cross-midnight windows handled safely (no gaps or misalignment around day rolls).
Primary Use Cases
Session Bias & Context
Use OVN H/M/L and today’s open to define structural bias zones before RTH begins. A break-and-hold above OVN mid, for example, can filter long ideas; conversely, rejection at OVN high can warn of mean reversion.
Carry-Forward Mean/Value Reference
The carried ETH VWAP (PD 4 PM) acts as a “value memory” line for the next day. Traders can:
Fade tests away from it in balanced conditions,
Use it as a pullback/acceptance gauge during trends,
Track liquidity grabs when price spikes through and reclaims.
Execution Planning & Risk
Anchor stops/targets around PD H/L and OVN H/M/L for well-defined invalidation.
Combine with your entry model (order-flow, momentum, or pattern) to time fades at range extremes or momentum breaks from OVN mid.
Confluence Mapping
Layer the tool with opening range tools, HTF zones, or profile/VWAPs (weekly/daily) to spot high-quality confluence where multiple references cluster.
Regime & Day-Type Read
Quickly see whether RTH accepts/rejects the OVN range or gravitates to PD VWAP handle, helping classify the day (trend, balanced, double-distribution, etc.).
Quick Start
Apply to your intraday chart (any instrument supported by TradingView; best on ≤15m for live intraday context).
In Current Day group, keep Open and OVN HL on; optionally display the mid.
In Previous Day group, enable PD Open/HL for carry-over levels.
Enable AVWAP if you want live ETH-anchored VWAP and its Bands for distance context.
Keep PD VWAP on to project yesterday’s 4 PM ETH VWAP as a static dashed line into today.
Use the Label group to size/color the on-chart tags.
Settings Overview (Plain-English)
Label: Toggle labels on/off; choose label text color and size.
Current Day:
Open (color/width) — daily open line anchored at ETH open.
OVN HL (and Mid) — overnight high/low and midpoint, locked at 09:30 and extended to 16:00.
AVWAP + Bands — ETH-anchored VWAP with optional 0.5×/1×/2× bands.
Previous Day:
PD Open/HL — yesterday’s daily handles.
PD VWAP — the carried snapshot of yesterday’s 4 PM ETH VWAP projected forward (dashed).
Notes & Best Practices
Time Zone: All session logic is hard-coded to America/New_York and DST-robust. No manual DST tweaks required.
Non-Repainting: The carried PD VWAP line is a snapshot; once drawn, it does not back-fill or mutate.
Intraday Use: Designed for intraday execution. It will display on higher TFs, but the session granularity is most informative at ≤15m.
Performance: Script caps lines/labels (500) and uses short “tails” to keep charts responsive.
Compatibility: Uses request.security(..., "D", series, lookahead_on) intentionally to lock daily handles early for planning; this is by design.
Typical Playbook Examples
Fade Extremes in Balance: As RTH opens inside OVN, look for rejection wicks at OVN High with confluence from PD VWAP handle overhead; risk above OVN High.
Trend Continuation: In directional sessions, acceptances above OVN Mid with price pulling back to the live ETH VWAP can offer continuation entries.
Reversion to Value: Sharp extensions away from the carried PD VWAP that quickly stall often revert to that handle; use it as a target or as an acceptance test.
Liquidity Pool TimesThis script automatically plots key liquidity pool times on your chart. I will release an updated script that plots the names on the far right when i can figure it out. Until then you will see Monthly Open/Close Weekly Open/Close and Midnight/10AM open
BlackScrum Swing Boxes 1/2/3 After seeing influencers selling their indicator suite's online, I decided to start making replicas of them, maybe mine are better, maybe they are worse. I use them in my day to day trading and they help me make money, hopefully they help you make money.
Not financial advice, Do Your Own Research.
Everything provided without warranty or liability. If you stuff up, learn from it, get better, we all make mistakes.
// BlackScrum — 1/2/3-Bar Swing Boxes (auto timeframe)
//
// DESCRIPTION
// This indicator displays three swing-direction boxes (1B, 2B, 3B) in the top-right corner of the chart.
// The boxes automatically adapt to the chart's timeframe (15m, 1H, 4H, 1D, etc.).
// Each box represents the direction of the most recently confirmed swing pivot:
// • 1B → 1-bar swing (fastest, most sensitive)
// • 2B → 2-bar swing (medium confirmation)
// • 3B → 3-bar swing (slowest, strongest confirmation)
//
// COLORS
// • GREEN = last confirmed swing pivot was a higher low (up swing)
// • RED = last confirmed swing pivot was a lower high (down swing)
// • GREY = no clear swing yet (fresh/transition area)
//
// CONFLUENCE
// • ALL GREEN = bullish alignment across 1B, 2B, 3B → strong trend continuation signal
// • ALL RED = bearish alignment across all three → strong downtrend continuation signal
//
// HOW TO USE (TRADEPLAY)
//
// 1) ENTRIES
// • Aggressive entry → enter when ALL GREEN prints on your timeframe.
// • Safer pullback entry → wait for 1B to briefly turn red during a green 2B/3B,
// then flip back to green. Enter on the re-flip.
// • Multi-timeframe filter:
// Take longs only when higher TF (e.g., 1H/4H) boxes are at least neutral-to-green.
//
// 2) EXITS
// • Weakness exit → when 1B flips against your position while 2B is neutral/red.
// • Full exit → when ALL RED prints.
// • Time stop → if price hasn’t moved after several bars of your execution timeframe.
//
// 3) STOP-LOSS / RISK
// • Place stops beyond the latest opposite swing used by 2B or 3B.
// • Add 0.5–1× ATR buffer if your market has stop-hunt volatility.
// • Always size position based on the distance to the swing stop.
//
// 4) WHEN TO IGNORE SIGNALS
// • Chop zones → 1B flipping repeatedly while 2B/3B disagree.
// • News candles → wait for pivots to confirm on the *closed* bar.
//
// 5) USING WITH OTHER TOOLS
// • With a trend ribbon (e.g., Larsson-style):
// Only take ALL GREEN longs when the ribbon is UP, and ALL RED shorts when ribbon is DOWN.
// • With a Fear & Greed index:
// Prefer longs when F&G > 60,
// Avoid longs when F&G < 40 unless countertrend scalping.
//
// 6) TIMEFRAME GUIDANCE
// • Scalping: 5m / 15m, confirmed by 1H or 4H boxes.
// • Swinging: 1H / 4H with daily filter.
// • Positioning: 1D with weekly confirmation.
//
// 7) INTERPRETATION CHEATSHEET
// • 1B green, 2B grey, 3B red → short-term bounce inside higher timeframe downtrend.
// • 1B/2B green, 3B grey → early trend reversal forming.
// • All grey → fresh swing area; wait for direction.
//
// 8) CUSTOMIZATION
// • len1 / len2 / len3 control sensitivity (higher = slower & cleaner).
// • Can add a timeframe header box (e.g., “15m / 4H / 1D”).
// • Can add a multi-timeframe grid (e.g., 15m | 1H | 4H | 1D each with 1B/2B/3B).
//
// ====================================================================================================
dO / wO / mO + MA 50/200 + PrevDay H/L Description
This indicator plots key reference levels used by professional traders:
Daily Open (dO)
Weekly Open (wO)
Monthly Open (mO)
Previous Day High (pdH) and Previous Day Low (pdL)
Moving Averages: 50 & 200 SMA
Each level is drawn as a clean dotted white line with a fixed label directly on the price chart.
All levels can be individually toggled on or off via checkboxes in the settings panel.
The pdH/pdL lines start exactly from the candles that created them, providing clear structure for breakout, retracement, and liquidity analysis.
The 50/200 SMA are included for long-term trend context.
This tool is designed for traders who rely on multi-timeframe structure and precision levels for both intraday and swing strategies.
Features
Toggle visibility for dO, wO, mO, pdH, and pdL
Accurate placement of previous day levels
Lightweight and responsive
Clean minimal visual design
Supports any symbol and timeframe
Usage Notes
Perfect for confluence-based trading:
Combine pdH/pdL with session opens to identify key liquidity zones
Use SMA 50/200 for directional bias
Works on crypto, forex, indices, and equities
Golden Flow MapGolden Flow Map is a multi–timeframe moving–average system
designed to reveal the underlying direction of long–term market flow,
beyond daily volatility or short–term signals.
This script overlays four major trend lines — each representing a different layer of market rhythm:
Timeframe Length Meaning
🟣 1D – 365 MA Annual average — the true life line of the trend
🔴 1D – 200 MA Institutional benchmark — the long-term threshold
🟢 1W – 20 MA Mid-cycle momentum guide
🟠 3D – 100 MA Wave transition detector — captures trend shifts early
By combining these four perspectives on a single chart,
you can instantly distinguish between a short-term bounce and a major trend reversal.
🧭 How to Use
When all four lines align in one direction → that’s the main current of the market.
If price loses the 200D or 365D, ignore small rebounds — the structure has shifted.
The cross between Weekly 20 and 3D 100 often marks a wave transition.
Focus on alignment order rather than crossovers —
markets ultimately return to the direction of the higher timeframe.
⚙️ Features
SMA / EMA toggle
Individual MA on/off controls
Built-in alerts for 200D and 1W20 cross events
🧠 Concept
“Indicators are not signals — they are maps.”
This tool is not meant to predict, but to reveal the pulse of the market
and guide you through its long-term structure.
✍️ Creator’s Note
Developed from DDU’s personal long-term trend framework,
this indicator serves as a visual compass to expand a trader’s vision
from short-term reactions to macro-level flow.
Overnight Time Box Overnight Time Box (22:59 → 09:59, minutes & TZ)
Automatically draws a time-based box for a customizable window that can cross midnight. Perfect for marking the overnight range up to London open (e.g., 22:59–09:59 in Europe/Bucharest), but works with any minute-level window.
What it does
Builds a daily box covering all price action between two user-defined times (e.g., 22:59 → 09:59).
Tracks session High/Low in real time and can plot extended HL lines for reference.
Keeps historical boxes on the chart for backtesting and review (no flicker, no errors).
How to use
Add the script to an intraday chart.
Configure:
Time zone (default: Europe/Bucharest).
Interval (HHMM-HHMM) — e.g., 2259-0959 (minutes supported).
Optional: High/Low lines, fill color, border color, line width.
Use on intraday timeframes (M1–H4).
Note: On Daily/Weekly/Monthly, a heads-up label reminds you it’s designed for intraday use.
Inputs
Time zone: correct DST handling.
Interval (HHMM-HHMM): supports windows that span midnight.
Draw High/Low lines: extended HL guides for the session.
Colors & widths: full visual customization.
Use cases
Mark the overnight range into London open (10:00 RO).
Delimit Killzones / ICT Silver Bullet windows.
Study range, liquidity raids, FVGs before major sessions.
Tech notes
Built on Pine Script v5 using input.session → stable, DST-safe.
Increased max_boxes_count / max_lines_count to preserve history.
Boxes are “frozen” at session end and remain on chart.
Limitations
Intended for intraday only.
One interval per script instance; attach multiple instances for multiple windows.
Volume Cluster Support and Resistance Levels [QuantAlgo]🟢 Overview
This indicator identifies statistically significant support and resistance levels through volume cluster analysis, isolating price zones characterized by elevated trading activity and institutional participation. By quantifying areas where volume concentration exceeded historical norms, it reveals price levels with demonstrated supply-demand imbalances that exhibit persistent influence on subsequent price action. The methodology is asset-agnostic and timeframe-independent, applicable across equities, cryptocurrencies, forex, and commodities from intraday to weekly intervals.
🟢 Key Features
1. Support and Resistance Levels
The indicator scans historical price data to identify bars where volume exceeds a user-defined threshold multiplier relative to the rolling average. For each qualifying bar, a representative price is calculated using the average of high, low, and close. Proximate price levels within a specified percentage range are then aggregated into discrete clusters using volume-weighted averaging, eliminating redundant signals. Clusters are ranked by cumulative volume to determine statistical significance. Finally, the indicator plots horizontal levels at each cluster price: support levels (green) below current price indicate zones where historical buying pressure exceeded selling pressure, while resistance levels (red) above current price mark zones where sellers historically dominated. These levels represent areas of established liquidity and price discovery, where institutional order flow previously concentrated.
The Touch Count (T) metric quantifies historical price interaction frequency, while Total Volume (TV) measures aggregate trading activity at each level, providing objective criteria for assessing level strength and trade execution decisions.
2. Volume Histogram
A histogram appears below the price chart, displaying relative volume for each bar within the lookback period, with bar height scaled to the maximum volume observed. Green bars represent up-periods (close > open) indicating buying pressure, while red bars show down-periods (close < open) indicating selling pressure. This visualization helps you confirm the validity of support/resistance levels by seeing where volume actually spiked, identify accumulation/distribution patterns, and validate breakouts by checking if they occur on above-average volume.
3. Built-in Alerts
Automated alerts trigger when price crosses below support levels or breaks above resistance levels, allowing you to monitor multiple assets without constant chart-watching.
4. Customizable Color Schemes
The indicator provides four preset color configurations (Classic, Aqua, Cosmic, Custom) optimized for visual clarity across different charting environments. Each scheme maintains consistent color mapping for support and resistance zones across both level lines and volume histogram components. The Custom configuration permits full color specification to accommodate individual charting setups, ensuring optimal visual contrast for extended analysis sessions.
Classic:
Aqua:
Cosmic:
Custom:
🟢 Pro Tips
→ Trade entry optimization: Execute long positions at support levels with high touch counts or upon confirmed resistance breakouts accompanied by above-average volume
→ Risk parameter definition: Position stop-loss orders near identified support/resistance zones with statistical significance to minimize premature exits
→ Breakout validation: Require volume confirmation exceeding historical average when price penetrates resistance to filter false breakouts
→ Level strength assessment: Prioritize levels with higher touch counts and total volume metrics for enhanced probability trade setups
→ Multi-timeframe confluence: Synthesize support/resistance levels across multiple timeframes to identify high-conviction zones where daily support aligns with 4-hour resistance structures
Ethereum Sleepy Wallets – 6-Month DormancyWhat This Indicator Does
It measures how many Ethereum addresses have been completely inactive for at least 6 months (≥ 180 days) — using official Glassnode and CryptoQuant on-chain metrics.
This reveals deep conviction among long-term ETH holders
Core Concept: Direct 6-Month Dormancy
The indicator uses two precise on-chain signals:
Total Unique ETH Addresses
From GLASSNODE:ETH_ADDRESSES or CRYPTOQUANT:ETH_TOTAL_ADDRESSES
Counts every address ever used on Ethereum
Addresses Inactive ≥ 180 Days
From GLASSNODE:ETH_ADDRESSES_GREATER_THAN_180_DAYS
Counts every address that has not sent or received ETH in 6+ months
Sleepy ETH = Dormant ≥ 180 Days
Sleepy Ratio % = (Sleepy / Total) × 100
This is not an estimate — it’s direct, real dormancy.
Why 6-Month Dormancy Matters
Short-term activity (7-day) = noise from DeFi, NFTs, trading
180-day inactivity = true HODLing — coins untouched through entire market cycles
Historically:
Rising dormancy → supply drying up → bullish pressure
Falling dormancy → long-term holders selling → bearish warning
How It Works (Step-by-Step)
Fetches daily data from Glassnode (Pro+) or CryptoQuant (free)
Selects real data if available; otherwise uses robust fallback
Calculates raw sleepy wallets = addresses inactive ≥ 180 days
Smooths the signal with a 21-day simple moving average (SMA) to filter noise
Computes Sleepy Ratio % for instant conviction reading
Displays live info table with exact values on every bar
How to Use It
Signal
Interpretation
Suggested Action
Sleepy Ratio > 75% and rising
Extreme long-term HODLing
Strong accumulation — buy/hold
Smooth Sleepy trending up
Dormancy growing over 21 days
Bullish supply shock forming
Sleepy Ratio < 68% and falling
Long-term coins re-entering circulation
Caution — possible distribution
Smooth Sleepy dropping fast
HODLers breaking after 6+ months
Bearish warning — consider exits
Use on Daily (D) or Weekly (W) charts for clean, reliable signals.
Pro+ vs Free Mode
Mode
Data Source
Accuracy
Pro+ (Glassnode ON)
Real 180-day dormancy metric
100% precise
Free (Glassnode OFF)
CryptoQuant + price-scaled estimate
~80% historical correlation
Toggle in settings: Use Glassnode Data
What Makes This Indicator Original
First open-source script to directly plot Ethereum’s 6-month dormancy using official ADDRESSES_GREATER_THAN_180_DAYS
No fake math — uses true inactivity, not active address subtraction
Dual-source logic ensures usability on any TradingView plan
Dual output: raw sleepy count + 21-day SMA for precision and trend
Live info table shows real-time values and data source
BUY LOW, BUY MORE, SELL HIGH -BUFFET STRATEGY LITE__________________________________________________________________________
Buy Low, Buy More, Sell High With Buffett Meter (LITE – JTMarketAI)
__________________________________________________________________________
Category: Quantitative Momentum & Liquidity Flow
Author: JTMarketAI
Architecture: Non-Repainting
This strategy accumulates into validated pullbacks during fear cycles, scales intelligently as price declines into liquidity support, and exits when momentum weakens after meaningful run-ups. It uses synthetic higher-timeframe OHLC data (non-repainting), liquidity imbalance confirmation, adaptive KAMA trend logic, RSI validation, and a live Buffett macro valuation gauge.
This is a patient, conviction-based accumulation engine designed for equities.
It is not a scalp bot.
__________________________________________________________________________
Core Features
__________________________________________________________________________
Non-repainting (confirmed bars only)
Synthetic HTF OHLC (no lookahead)
Dynamic trailing exit preserves ~80–87% of peak profit
Bull vs Bear liquidity dominance and flow imbalance
Rolling lowest-low tracking (LLL)
NY-session alignment (default)
Buffett Macro Meter integration
Technical Highlights
Flow-confidence derived from volume-order pressure
Adaptive KAMA smoothing for lower-lag confirmation
Daily > Weekly > Monthly synthetic aggregation
LLL progression display for trend exhaustion
Fully profiler-optimized
Supports averaging down when pyramiding enabled
__________________________________________________________________________
Why It Does Not Repaint
__________________________________________________________________________
All state updates occur only on confirmed bars
Synthetic HTFs built without lookahead
Persistent arrays freeze historical values
Trailing highs updated only after confirmation
No forward-reference to future bars
__________________________________________________________________________
Lite Edition Notes
__________________________________________________________________________
Manual trading focused
Buffett Meter enabled
Up to 20 trades per session
Visual dashboard included
No alerts, automation, or webhooks (PRO unlocks IBKR + TradersPost)
__________________________________________________________________________
Limitations
__________________________________________________________________________
Best on intraday equities (1m–4h)
Designed for US stocks only
High-resource if full visuals enabled
Avoid penny stocks and extremely low-volume tickers
Does not guard against after-hours gaps or major news moves
__________________________________________________________________________
Warnings
__________________________________________________________________________
Contrarian scaling requires discipline and patience
Expect longer-duration trades, not rapid scalps
Use on quality tickers unlikely to permanently collapse
Confirm price behavior outside cash session
Test manually before automating anything
Not suitable for every market environment or asset
Notes on Philosophy
This strategy attempts to accumulate when markets overshoot lower, and distribute after recovery momentum fades. It reflects a patient, value-driven approach built on the principle of buying fear and reducing exposure into strength.
__________________________________________________________________________
Disclaimer
__________________________________________________________________________
For research and educational use only. Not financial advice. Past performance does not guarantee future results. Test thoroughly and use appropriate risk management.
__________________________________________________________________________
Hashtags
__________________________________________________________________________
#buffett #quantstrategy #valuemomentum #accumulation #contrarian #nonrepaint #equitystrategy #swingtrading #liquidityanalysis #synthetichtf #tradingviewstrategy
BUY LOW, BUY MORE, SELL HIGH - MARKET FLOW STRATEGY LITE
TV Description - Buffett Meter Lite
body{font-family:Arial,Helvetica,sans-serif;max-width:900px;margin:32px auto;line-height:1.4} h1,h2{margin:16px 0 8px}
Buy Low, Buy More, Sell High With Buffett Meter (Lite v1283 – JTM)
Category: Quantitative Momentum & Liquidity Flow
Author: JTM
Architecture: Non-Repainting
This strategy accumulates into validated pullbacks during fear cycles, scales intelligently as price declines into liquidity support, and exits when momentum weakens after meaningful run-ups. It uses synthetic higher-timeframe OHLC data (non-repainting), liquidity imbalance confirmation, adaptive KAMA trend logic, RSI validation, and a live Buffett macro valuation gauge.
This is a patient, conviction-based accumulation engine designed for equities.
It is not a scalp bot.
Core Features
Non-repainting (confirmed bars only)
Synthetic HTF OHLC (no lookahead)
Dynamic trailing exit preserves ~80–87% of peak profit
Bull vs Bear liquidity dominance and flow imbalance
Rolling lowest-low tracking (LLL)
NY-session alignment (default)
Buffett Macro Meter integration
Technical Highlights
Flow-confidence derived from volume-order pressure
Adaptive KAMA smoothing for lower-lag confirmation
Daily > Weekly > Monthly synthetic aggregation
LLL progression display for trend exhaustion
Fully profiler-optimized
Supports averaging down when pyramiding enabled
Why It Does Not Repaint
All state updates occur only on confirmed bars
Synthetic HTFs built without lookahead
Persistent arrays freeze historical values
Trailing highs updated only after confirmation
No forward-reference to future bars
Lite Edition Notes
Manual trading focused
Buffett Meter enabled
Limit of 20 trades per session
Buffet Meter dashboard included
No alerts, automation, or webhooks (PRO unlocks IBKR + TradersPost)
Limitations
Best on intraday equities (1m–4h)
Designed for US stocks only
High-resource if full visuals enabled
Avoid penny stocks and extremely low-volume tickers
Does not guard against after-hours gaps or major news moves
Warnings
Contrarian scaling requires discipline and patience
Expect longer-duration trades, not rapid scalps
Use on quality tickers unlikely to permanently collapse
Confirm price behavior outside cash session
Test manually before automating anything
Not suitable for every market environment or asset
Notes on Philosophy
This strategy attempts to accumulate when markets overshoot lower, and distribute after recovery momentum fades. It reflects a patient, value-driven approach built on the principle of buying fear and reducing exposure into strength.
This is edge-based, not “trade every wiggle” logic
“Be fearful when others are greedy, and greedy when others are fearful.” — Buffett
“The stock market transfers money from the impatient to the patient.” — Buffett
Disclaimer
For research and educational use only. Not financial advice. Past performance does not guarantee future results. Test thoroughly and use appropriate risk management.
Hashtags
#buffett #quantstrategy #valuemomentum #accumulation #contrarian #nonrepaint #equitystrategy #swingtrading #liquidityanalysis #synthetichtf #tradingviewstrategy
Time & Session Dividers### indicator Summary
This indicator is a powerful utility designed to help you visualize time-based market structure by drawing customizable vertical lines on your chart. It allows you to clearly mark the beginning of new timeframes (like hours, days, or weeks) and highlight specific trading sessions or time slots (like the London open or a news event).
It comes with **6 independent dividers** that you can configure to your exact needs:
* **3 Timeframe Dividers**
* **3 Custom Time Slot Dividers**
### Key Features
* **Timeframe Separators:** Set up to 3 different higher timeframes (e.g., 1H, 4H, 1D). The indicator will automatically draw a vertical line at the start of each new bar for that timeframe, helping you easily see hourly, daily, or weekly boundaries.
* **Custom Time Slots (Sessions):** Define up to 3 specific time windows (e.g., "09:30-16:00" for the New York session). The indicator will draw a line at the **start** of this session and another line at the **end**, allowing you to isolate specific periods of market activity.
* **Full Customization:** Each of the 6 dividers is fully independent and can be customized with:
* A simple toggle to turn it on or off.
* A unique color.
* A line style (Solid, Dotted, or Dashed).
* A toggle to show or hide its text label.
* **Smart Labels:** Labels for timeframe dividers display the timeframe (e.g., "4H"), while labels for time slots automatically format to show the precise start or end time (e.g., "09:30" and "16:00").
### How to Use
1. Add the "Timeframe Vertical Lines" indicator to your chart.
2. Open the indicator's **Settings** panel.
3. **To add a timeframe line (e.g., Daily):**
* Go to the "Timeframe Divider 1" group.
* Check the "Show Divider 1" box.
* Set the "Timeframe 1" to "1D".
* Adjust the color, style, and text visibility to your liking.
4. **To add a session line (e.g., London Session):**
* Go to the "Time Slot Divider 1" group.
* Check the "Show Time Slot Divider 1" box.
* Set the "Time Slot 1" to your desired session, e.g., "0800-1700".
* Adjust the color and style. The script will now draw lines at 08:00 and 17:00 (based on the chart's timezone).
5. Repeat the process using the other available divider slots to build a complete temporal map of your chart.
Multi-Anchor VWAP | Trade Symmetry🧩 Multi-Anchor VWAP
Description:
Dynamic VWAP anchored to Session, Week, Month, Quarter, and Year — all in one view.
Full Description:
This indicator plots multiple VWAPs (Volume-Weighted Average Prices) simultaneously — each anchored to a different time period:
Session, Week, Month, Quarter, and Year.
💡 Ideal for traders who track institutional mean reversion and liquidity zones across multiple timeframes.
Features
✅ Session, Weekly, Monthly, Quarterly, and Yearly Anchored VWAPs
✅ Independent color and visibility controls for each anchor
✅ Adjustable label position and size
✅ Option to hide VWAPs on Daily or higher charts
✅ Clean and efficient performance
This tool helps you visualize volume-weighted mean levels where price often reacts — offering a clear map of bias and equilibrium across all major time horizons.
Pinbar MTF - No Repaint# Pinbar MTF - No Repaint Indicator
## Complete Technical Documentation
---
## 📊 Overview
**Pinbar MTF (Multi-Timeframe) - No Repaint** is a professional-grade TradingView Pine Script indicator designed to detect high-probability pinbar reversal patterns with advanced filtering systems. The indicator is specifically engineered to be **100% non-repainting**, making it reliable for both live trading and backtesting.
### Key Features
✅ **Non-Repainting** - Signals only appear AFTER bar closes, never disappear
✅ **Three-Layer Filter System** - ATR, SWING, and RSI filters
✅ **Automatic SL/TP Calculation** - Based on risk:reward ratios
✅ **Real-time Alerts** - TradingView notifications for all signals
✅ **Visual Trade Management** - Lines, labels, and areas for entries, stops, and targets
✅ **Backtesting Ready** - Reliable historical data for strategy testing
---
## 🎯 What is a Pinbar?
A **Pinbar (Pin Bar/Pinocchio Bar)** is a single candlestick pattern that indicates a potential price reversal:
### Bullish Pinbar (BUY Signal)
- **Long lower wick** (rejection of lower prices)
- **Small body at the top** of the candle
- Shows buyers rejected sellers' attempt to push price down
- Forms at support levels or swing lows
- Entry signal for LONG positions
### Bearish Pinbar (SELL Signal)
- **Long upper wick** (rejection of higher prices)
- **Small body at the bottom** of the candle
- Shows sellers rejected buyers' attempt to push price up
- Forms at resistance levels or swing highs
- Entry signal for SHORT positions
---
## 🔧 How the Indicator Works
### 1. **Pinbar Detection Logic**
The indicator analyzes the **previous closed bar ** to identify pinbar patterns:
```
Bullish Pinbar Requirements:
- Lower wick > 72% of total candle range (adjustable)
- Upper wick < 28% of total candle range
- Close > Open (bullish candle body)
Bearish Pinbar Requirements:
- Upper wick > 72% of total candle range (adjustable)
- Lower wick < 28% of total candle range
- Close < Open (bearish candle body)
```
**Why check ?** By analyzing the previous completed bar, we ensure the pattern is fully formed and won't change, preventing repainting.
---
### 2. **Three-Layer Filter System**
#### 🔍 **Filter #1: ATR (Average True Range) Filter**
- **Purpose**: Ensures the pinbar has significant size
- **Function**: Only signals if pinbar range ≥ ATR value
- **Benefit**: Filters out small, insignificant pinbars
- **Settings**:
- Enable/Disable toggle
- ATR Period (default: 7)
**Example**: If ATR = 50 pips, only pinbars with 50+ pip range will signal.
---
#### 🔍 **Filter #2: SWING Filter** (Always Active)
- **Purpose**: Confirms pinbar forms at swing highs/lows
- **Function**: Validates the pinbar is an absolute high/low
- **Benefit**: Identifies true reversal points
- **Settings**:
- Swing Candles (default: 3)
**How it works**:
- For bullish pinbar: Checks if low is lowest of past 3 bars
- For bearish pinbar: Checks if high is highest of past 3 bars
**Example**: With 3 swing candles, a bullish pinbar must have the lowest low among the last 3 bars.
---
#### 🔍 **Filter #3: RSI (Relative Strength Index) Filter**
- **Purpose**: Confirms momentum conditions
- **Function**: Prevents signals in extreme momentum zones
- **Benefit**: Avoids counter-trend trades
- **Settings**:
- Enable/Disable toggle
- RSI Period (default: 7)
- RSI Source (Close, Open, High, Low, HL2, HLC3, OHLC4)
- Overbought Level (default: 70)
- Oversold Level (default: 30)
**Logic**:
- Bullish Pinbar: Only signals if RSI < 70 (not overbought)
- Bearish Pinbar: Only signals if RSI > 30 (not oversold)
---
### 3. **Stop Loss Calculation**
Two methods available:
#### Method A: ATR-Based Stop Loss (Recommended)
```
Bullish Pinbar:
SL = Pinbar Low - (1 × ATR)
Bearish Pinbar:
SL = Pinbar High + (1 × ATR)
```
**Benefit**: Dynamic stops that adapt to market volatility
#### Method B: Fixed Pips Stop Loss
```
Bullish Pinbar:
SL = Pinbar Low - (Fixed Pips)
Bearish Pinbar:
SL = Pinbar High + (Fixed Pips)
```
**Settings**:
- Calculate Stop with ATR (toggle)
- Stop Pips without ATR (default: 5)
---
### 4. **Take Profit Calculation**
Take Profit is calculated based on Risk:Reward ratio:
```
Bullish Trade:
TP = Entry + (Entry - SL) × Risk:Reward Ratio
Bearish Trade:
TP = Entry - (SL - Entry) × Risk:Reward Ratio
```
**Example**:
- Entry: 1.2000
- SL: 1.1950 (50 pip risk)
- RR: 2:1
- TP: 1.2100 (100 pip reward = 50 × 2)
**Settings**:
- Risk:Reward Ratio (default: 1.0, range: 0.1 to 10.0)
---
## 📈 Visual Elements
### On-Chart Displays
1. **Signal Markers**
- 🟢 **Green Triangle Up** = Bullish Pinbar (BUY)
- 🔴 **Red Triangle Down** = Bearish Pinbar (SELL)
- Placed directly on the pinbar candle
2. **Entry Labels**
- Green "BUY" label with entry price
- Red "SELL" label with entry price
- Shows exact entry level
3. **Stop Loss Lines**
- 🔴 Red horizontal line
- "SL" label
- Extends 20 bars forward
4. **Take Profit Lines**
- 🟢 Green horizontal line
- "TP" label
- Extends 20 bars forward
5. **Risk/Reward Areas** (Optional)
- Red shaded box = Risk zone (Entry to SL)
- Green shaded box = Reward zone (Entry to TP)
- Visual risk:reward visualization
6. **Info Table** (Top Right)
- Displays current settings
- Shows filter status (ON/OFF)
- Real-time RSI value
- Quick reference panel
---
## 🔔 Alert System
Three alert types available:
### 1. Combined Alert: "Pinbar Signal (Any Direction)"
- Fires for BOTH bullish and bearish pinbars
- **Best for**: General monitoring
- **Message**: "Pinbar Signal Detected on {TICKER} at {PRICE}"
### 2. Bullish Alert: "Bullish Pinbar Alert"
- Fires ONLY for BUY signals
- **Best for**: Long-only strategies
- **Message**: "BUY Signal on {TICKER} at {PRICE}"
### 3. Bearish Alert: "Bearish Pinbar Alert"
- Fires ONLY for SELL signals
- **Best for**: Short-only strategies
- **Message**: "SELL Signal on {TICKER} at {PRICE}"
---
## ⚙️ Input Parameters Reference
### **Filters Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| ATR Filter on Pinbar Range? | ✅ ON | Boolean | Enable/disable ATR filter |
| ATR Period | 7 | 1+ | Lookback period for ATR calculation |
| Swing Candles | 3 | 1+ | Bars to check for swing high/low |
| RSI Filter on Pinbar? | ❌ OFF | Boolean | Enable/disable RSI filter |
| RSI Period | 7 | 2+ | Lookback period for RSI calculation |
| RSI Source | Close | Multiple | Price data for RSI (Close/Open/High/Low/etc) |
| RSI Overbought Level | 70 | 50-100 | Upper threshold for RSI filter |
| RSI Oversold Level | 30 | 0-50 | Lower threshold for RSI filter |
### **Pinbar Detection Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Shadow % vs Body | 72 | 50-95 | Minimum wick size as % of total range |
### **Visualization Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Show SL and TP Lines? | ✅ ON | Boolean | Display stop loss and take profit lines |
| Show SL and TP Area? | ❌ OFF | Boolean | Show shaded risk/reward boxes |
### **Risk Management Group**
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| Risk:Reward Ratio | 1.0 | 0.1-10.0 | Target profit vs risk (1.0 = 1:1, 2.0 = 1:2) |
| Calculate Stop with ATR? | ✅ ON | Boolean | Use ATR for stop calculation |
| Stop Pips without ATR | 5 | 1+ | Fixed pip stop when ATR disabled |
---
## 🚫 Non-Repainting Architecture
### What is Repainting?
**Repainting** occurs when an indicator's historical signals differ from what appeared in real-time. This makes backtesting unreliable and can lead to false confidence in a strategy.
### How This Indicator Prevents Repainting
1. **Closed Bar Analysis**
- All calculations use ` ` offset (previous bar)
- Only analyzes COMPLETED candles
- Signals appear on the bar AFTER the pinbar closes
2. **Confirmed Swing Points**
- Waits for sufficient bar history before signaling
- Only checks historical bars that cannot change
- Prevents premature swing detection
3. **Static Alert Timing**
- Alerts fire only after bar completion
- No conditional logic that changes historically
- Same results in replay mode and live trading
### Verification Method
To verify non-repainting behavior:
1. Apply indicator to chart
2. Note signal locations and prices
3. Refresh browser / reload chart
4. **Signals remain in exact same locations**
---
## 💼 Trading Strategy Guidelines
### Entry Rules
**For Bullish Pinbar (LONG):**
1. Wait for green triangle to appear
2. Enter at close of pinbar (shown in label)
3. Alternative: Enter on break of pinbar high
4. Place stop loss at red SL line
5. Set target at green TP line
**For Bearish Pinbar (SHORT):**
1. Wait for red triangle to appear
2. Enter at close of pinbar (shown in label)
3. Alternative: Enter on break of pinbar low
4. Place stop loss at red SL line
5. Set target at green TP line
### Risk Management
- **Position Sizing**: Risk only 1-2% of account per trade
- **Stop Loss**: Always use the calculated SL (never move it wider)
- **Take Profit**: Use calculated TP or trail stop after 1:1 RR
- **Multiple Timeframes**: Confirm signals on higher timeframe
### Best Practices
✅ **DO:**
- Wait for bar to close before entering
- Trade in direction of higher timeframe trend
- Use on liquid markets with clear support/resistance
- Combine with price action analysis
- Keep a trading journal
❌ **DON'T:**
- Enter before bar closes (prevents seeing full pattern)
- Trade against strong trends
- Ignore the filters (they improve win rate)
- Risk more than 2% per trade
- Trade every signal (be selective)
---
## 📊 Backtesting & Data Export
### Available Data Points
The indicator exports these values for strategy development:
| Output | Description |
|--------|-------------|
| Bullish Signal | 1 = BUY signal, 0 = No signal |
| Bearish Signal | 1 = SELL signal, 0 = No signal |
| Bull SL | Stop loss level for long trades |
| Bull TP | Take profit level for long trades |
| Bull Entry | Entry price for long trades |
| Bear SL | Stop loss level for short trades |
| Bear TP | Take profit level for short trades |
| Bear Entry | Entry price for short trades |
### How to Use in Strategy
These values can be accessed by Pine Script strategies using:
```pine
indicator_values = request.security(syminfo.tickerid, timeframe.period,
)
```
---
## 🎓 Understanding the Filters
### Why Use Multiple Filters?
Single-indicator systems often generate too many false signals. This indicator uses a **confluence approach**:
1. **Pinbar Pattern** = Price rejection detected
2. **+ SWING Filter** = Rejection at key level
3. **+ ATR Filter** = Significant move
4. **+ RSI Filter** = Favorable momentum
**Result**: Higher probability setups with better risk:reward
### Filter Optimization
**Conservative Settings** (Fewer, Higher Quality Signals):
- ATR Filter: ON
- Swing Candles: 5
- RSI Filter: ON
- Shadow %: 75%
**Aggressive Settings** (More Signals, More Noise):
- ATR Filter: OFF
- Swing Candles: 2
- RSI Filter: OFF
- Shadow %: 65%
**Balanced Settings** (Recommended):
- ATR Filter: ON
- Swing Candles: 3
- RSI Filter: OFF (or ON for trending markets)
- Shadow %: 72%
---
## 🔍 Troubleshooting
### "No Signals Appearing"
**Possible Causes:**
1. Filters are too strict
2. No pinbars forming on chart
3. Insufficient bar history
**Solutions:**
- Reduce Shadow % to 65%
- Reduce Swing Candles to 2
- Disable ATR or RSI filters temporarily
- Check that chart has enough data loaded
### "Too Many Signals"
**Solutions:**
- Enable ATR filter
- Increase Swing Candles to 4-5
- Enable RSI filter
- Increase Shadow % to 75-80%
### "Signals Appearing Late"
**This is normal behavior!** The indicator:
- Analyzes previous closed bar
- Signals appear on the bar AFTER the pinbar
- This is what prevents repainting
- Signal latency is 1 bar (by design)
---
## 📝 Technical Specifications
**Indicator Type:** Overlay (displays on price chart)
**Pine Script Version:** 5
**Max Labels:** 500
**Max Lines:** 500
**Repainting:** None (100% non-repainting)
**Data Window Values:** 8 exported values
**Alert Types:** 3 (Combined, Bullish, Bearish)
**Performance:**
- Lightweight script (fast execution)
- Works on all timeframes
- Compatible with all markets (Forex, Crypto, Stocks, Futures)
- No data snooping bias
---
## 🎯 Use Cases
### 1. **Swing Trading**
- Timeframe: Daily, 4H
- Filter Settings: All enabled
- Best for: Catching major reversals
### 2. **Day Trading**
- Timeframe: 15m, 1H
- Filter Settings: ATR + SWING only
- Best for: Intraday reversals
### 3. **Scalping**
- Timeframe: 5m, 15m
- Filter Settings: SWING only (aggressive)
- Best for: Quick reversals (requires experience)
### 4. **Position Trading**
- Timeframe: Weekly, Daily
- Filter Settings: All enabled + high RR (2:1 or 3:1)
- Best for: Long-term trend reversal catches
---
## 🏆 Advantages Over Other Pinbar Indicators
✅ **Guaranteed Non-Repainting** - Many pinbar indicators repaint; this one never does
✅ **Automatic SL/TP** - No manual calculation needed
✅ **Multi-Layer Filtering** - Reduces false signals significantly
✅ **Visual Trade Management** - Clear entry, stop, and target levels
✅ **Flexible Configuration** - Adaptable to any trading style
✅ **Alert System** - Never miss a setup
✅ **Backtesting Ready** - Reliable historical data
✅ **Professional Grade** - Suitable for live trading
---
## 📚 Educational Resources
### Recommended Reading on Pinbars
- "The Pin Bar Trading Strategy" by Nial Fuller
- "Price Action Trading" by Al Brooks
- TradingView Education: Price Action Patterns
### Practice Recommendations
1. Paper trade signals for 20+ trades before live trading
2. Backtest on different timeframes and markets
3. Keep detailed records of all trades
4. Analyze winning vs losing setups
5. Refine filter settings based on results
---
## ⚖️ Disclaimer
This indicator is a tool for technical analysis and does not guarantee profits. Trading involves substantial risk of loss. Past performance is not indicative of future results.
- Always use proper risk management
- Never risk more than you can afford to lose
- Consider your trading experience and objectives
- Seek independent financial advice if needed
---
## 📧 Version Information
**Current Version:** 1.0
**Last Updated:** 2024
**Compatibility:** TradingView Pine Script v5
**Status:** Production Ready
---
## 🔄 Future Enhancements (Potential)
Possible future additions:
- Multi-timeframe confirmation option
- Volume filter integration
- Customizable color schemes
- Win rate statistics display
- Partial profit taking levels
- Trailing stop functionality
---
## 📖 Quick Start Guide
### 5-Minute Setup
1. **Add to Chart**
- Open TradingView
- Go to Pine Editor
- Paste the code
- Click "Add to Chart"
2. **Configure Settings**
- Open indicator settings (gear icon)
- Start with default settings
- Enable "Show SL and TP Lines"
3. **Set Alert**
- Right-click indicator name
- Click "Add Alert"
- Select "Pinbar Signal (Any Direction)"
- Configure notification method
4. **Test**
- Scroll back on chart
- Verify signals make sense
- Check that signals don't repaint
5. **Trade** (After Practice!)
- Wait for alert
- Verify signal quality
- Enter, place SL/TP
- Manage trade
---
## 🎯 Final Thoughts
The **Pinbar MTF - No Repaint** indicator is designed for serious traders who value:
- **Reliability** over flashy signals
- **Quality** over quantity
- **Honesty** over false promises
This indicator will NOT:
- Make you rich overnight
- Win every trade
- Replace proper trading education
This indicator WILL:
- Identify high-probability reversal setups
- Save you analysis time
- Provide consistent, non-repainting signals
- Help you develop a systematic trading approach
**Success in trading comes from:**
1. Proper education (60%)
2. Risk management (30%)
3. Technical tools like this indicator (10%)
Use this tool as part of a complete trading plan, not as a standalone solution.
Fibonacci Auto Retracement & HTF candles ReferenceAdvanced Higher Timeframe (HTF) Candle & Fibonacci Viewer
Overview:
The Advanced HTF Candle & Fibonacci Viewer is a professional Trading View indicator designed to help traders overlay higher timeframe price structures onto lower timeframe charts. By combining daily candle analysis with precise Fibonacci retracement levels, this tool allows traders to identify critical support and resistance zones, potential breakouts, and retracement opportunities without switching charts.
Special Thanks:
This script includes a small part of coding inspired by Zeiierman, whose work on HTF analysis provided the foundation for visualizing higher timeframe structures. Full credit to Zeiierman for their invaluable contribution to the Trading View community.
Key Features:
1. Multi-Day HTF Range Display
Automatically displays high and low of 1–7 previous days.
Highlights candle bodies and wicks for clear structure visualization.
Ideal for spotting daily ranges and breakout levels.
2. Dynamic Fibonacci Levels
Standard levels: 0%, 11.8%, 23.6%, 38.2%, 50%, 61.8%, 76.4%, 88.2%, 100%.
Optional mid-level lines for intraday support/resistance identification.
Levels adjust automatically to reflect price action direction.
3. Customizable Labels & Colors
Adjustable text size, color, transparency, and offset.
Fully customizable candle and Fibonacci colors.
Mid-level lines can be shown or hidden for a cleaner look.
4. Persistent Levels
Levels remain until the next trading session or breakout, helping track trends and retracements consistently.
5. Multi-Timeframe Optimization
Works on any chart timeframe, from 1-minute to weekly charts.
Provides higher timeframe insight while trading on lower timeframes.
Why Traders Love This Indicator:
View higher timeframe action without switching charts.
Identify high-probability entry and exit zones.
Combine with other indicators for complete market analysis.
Useful for swing traders, day traders, and scalpers alike.
Customization Options:
Number of previous days (1–7)
Show/hide mid-level lines
Show/hide labels
Customize label size, color, and offset
Customize Fibonacci and candle colors
Ideal Use Cases:
Swing Trading: Identify daily key levels for entry, exit, and stop-loss.
Day Trading: Use HTF ranges on intraday charts to spot breakouts and reversals.
Fibonacci Analysis: Locate retracement zones efficiently.
Trend Confirmation: Validate trades with higher timeframe structure.
Summary:
The Advanced HTF Candle & Fibonacci Viewer is a powerful tool for traders seeking clarity, structure, and precision. With higher timeframe insight overlaid on active charts and proper credit to Zeiierman for their HTF coding contribution, this indicator helps traders make informed, confident decisions in any market.






















