Liquidity Pro Map [ChartPrime]⯁ OVERVIEW
Liquidity Pro Map is a market-structure tool that simulates liquidity distribution by splitting price history into buy-side and sell-side profiles. Using candle volume and the standard deviation of close, the indicator builds two mirrored volume maps on the right-hand side of the chart. It also extends liquidity levels backwards in time until they are crossed by price, allowing you to see which zones remain untouched and where liquidity is most likely resting. Cumulative skew lines and highlighted POC levels give additional clarity on imbalance between buyers and sellers.
⯁ KEY FEATURES
Dual Liquidity Profiles: The chart is divided into buy-side (green) and sell-side (red) liquidity profiles, letting you instantly compare both sides of order flow.
Level Extension Logic: Each liquidity level is extended back in time until price crosses it. If not crossed, it persists all the way to the indicator’s lookback period, marking zones that remain “untapped.”
Dynamic Binning with Standard Deviation: The indicator distributes candle volumes into bins using close-price deviation, creating a more realistic liquidity map than static price levels.
priceDeviation = ta.stdev(close, 25) * 2
priceReference = close > open ? low - priceDeviation : high + priceDeviation
Cumulative Volume Skew Lines: Polylines on the right-hand side show the aggregated buy and sell volume profiles, making it easy to spot imbalance.
POC Identification: Highest-volume levels on both sides are marked as POC (Point of Control) , providing key zones of interest.
Clear Color Coding: Gradient shading intensifies with volume concentration—dark teal/green for buy zones, dark pink/red for sell zones.
⯁ HOW IT WORKS (UNDER THE HOOD)
Volume Distribution: Each bar’s volume is assigned to a price bin based on its reference price (close ± standard deviation offset).
Buy vs. Sell Splitting: If bins above last close price, volume is allocated to sell-side liquidity; otherwise, it’s allocated to buy-side liquidity.
Level Extension: Boxes marking liquidity bins extend back until crossed by price. If uncrossed, they anchor all the way to the start of the lookback window.
Cumulative Polylines: As bins are stacked, cumulative buy and sell values form skew polylines plotted at the right edge.
POC Levels: The highest-volume bin on each side is highlighted with labels and arrows, marking where the heaviest liquidity is concentrated.
⯁ USAGE
Use buy/sell profiles to see where liquidity is likely resting. Green shelves suggest potential support zones; red shelves suggest resistance or sell liquidity pools.
Watch untouched extended levels —these often become magnets for price as liquidity is swept.
Track POC levels as primary liquidity targets, where reactions or fakeouts are most common.
Compare cumulative skew lines to judge which side dominates in volume. Heavy buy skew may indicate absorption of sell pressure, and vice versa.
Adjust lookback period to switch between intraday liquidity maps and larger swing-based profiles.
Use separator feature to hide bins borders for better visual clarity.
Use as a confluence tool with OBs, support/resistance, and liquidity sweep setups.
⯁ CONCLUSION
Liquidity Pro Map transforms candle volume into a structured simulation of where liquidity may rest across the chart. By dividing buy vs. sell profiles, extending untouched levels, and marking cumulative skew and POC, it equips traders with a clear visual map of potential liquidity pools. This allows for better anticipation of sweeps, reversals, and areas of high market activity.
Indicators and strategies
PolyFilter [BackQuant]PolyFilter
A flexible, low-lag trend filter with three smoothing engines—optimized for clean bias, fewer whipsaws, and clear alerting.
What it does
PolyFilter draws a single “intelligent” baseline that adapts to price while suppressing noise. You choose the engine— Fractional MA , Ehlers 2-Pole Super Smoother , or a Multi-Kernel blend . The line can color itself by slope (trend) or by position vs price (above/below), and you get four ready-made alerts for flips and crosses.
What it plots
PolyFilter line — your smoothed trend baseline (width set by “Line Width”).
Optional candle & background coloring — choose: color by trend slope or by whether price is above/below the filter.
Signal markers — Arrows with L/S when the slope flips or when price crosses the line (if you enable shapes/alerts).
How the three engines differ
Fractional MA (experimental) — A power-law weighting of past bars (heavier focus on the most recent samples without throwing away history). The Adaptation Speed acts like the “fraction” exponent (default 0.618). Lower values lean more on recent bars; higher values spread weight further back.
Ehlers 2-Pole Super Smoother — Classic low-lag IIR smoother that aggressively reduces high-frequency noise while preserving turns. Great default when you want a steady, responsive baseline with minimal parameter fuss.
Multi-Kernel — A 70/30 blend of a Gaussian window and an exponential kernel. The Gaussian contributes smooth structure; the exponential adds a hint of responsiveness. Useful for assets that oscillate but still trend.
Reading the colors
Trend mode (default) — Line & candles turn green while the filter is rising (signal > signal ) and red while it’s falling.
Above/Below mode — Line & candles reflect price’s position relative to the filter: green when price > filter, red when price < filter. This is handy if you treat the filter like a dynamic “fair value” or bias line.
Inputs you’ll actually use
Calculation Settings
Price Source — Default HLC/3. Switch to Close for stricter trend, or HLC3/HL2 to soften single-print spikes.
Filter Length — Window/period for all engines. Shorter = snappier turns; longer = smoother line.
Adaptation Speed — Only affects Fractional MA . Lower it for faster, more local weighting; raise it for smoother, more global weighting.
Filter Type — Pick one of: Fractional MA, Ehlers 2-Pole, Multi-Kernel.
UI & Plotting
Color based off… — Choose Trend (slope) or > or < Close (position vs price).
Long/Short Colors — Customize bull/bear hues to your theme.
Show Filter Line / Paint candles / Color background — Visual toggles for the line, bars, and backdrop.
Line Width — Make the filter stand out (2–3 works well on most charts).
Signals & Alerts
PolyFilter Trend Up — Slope flips upward (the filter crosses above its prior value). Good for early continuation entries or stop-tightening on shorts.
PolyFilter Trend Down — Slope flips downward. Often used to scale out longs or rotate bias.
PolyFilter Above Price — The filter line crosses up through price (filter > price). This can confirm that mean has “caught up” after a pullback.
PolyFilter Below Price — The filter line crosses down through price (filter < price). Useful to confirm momentum loss on bounces.
Quick starts (suggested presets)
Intraday (5–15m, crypto or indices) — Ehlers 2-Pole, Length 55–80. Trend coloring ON, candle paint ON. Look for pullbacks to a rising filter; avoid fading a falling one.
Swing (1H–4H) — Multi-Kernel, Length 80–120. Background color OFF (cleaner), candle paint ON. Add a higher-TF confirmation (e.g., 4H filter rising when you trade 1H).
Range-prone FX — Fractional MA, Length 70–100, Adaptation ~0.55–0.70. Consider Above/Below mode to trade mean reversion to the line with a strict risk cap.
How to use it in practice
Bias line — Trade in the direction of the filter slope; stand aside when it flattens and color chops back and forth.
Dynamic support/resistance — Treat the line as a moving value area. In trends, entries often appear on shallow tags of the line with structure confluence.
Regime switch — When the filter flips and holds color for several bars, tighten stops on the opposing side and look for first pullback in the new color.
Stacking filters — Many users run PolyFilter on the active chart and a slower instance (longer length) on a higher timeframe as a “macro bias” guardrail.
Tuning tips
If you see too many flips, lengthen the filter or switch to Multi-Kernel.
If turns feel late, shorten the filter or try Ehlers 2-Pole for lower lag.
On thin or very noisy symbols, prefer HLC3 as the source and longer lengths.
Performance note: very large lengths increase computation time for the Multi-Kernel and Fractional engines. Start moderate and scale up only if needed.
Summary
PolyFilter gives you a single, trustworthy baseline that you can read at a glance—either as a pure trend line (slope coloring) or as a dynamic “above/below fair value” reference. Pick the engine that matches your market’s personality, set a sensible length, and let the color and alerts guide bias, entries on pullbacks, and risk on reversals.
Structural Liquidity Signals [BullByte]Structural Liquidity Signals (SFP, FVG, BOS, AVWAP)
Short description
Detects liquidity sweeps (SFPs) at pivots and PD/W levels, highlights the latest FVG, tracks AVWAP stretch, arms percentile extremes, and triggers after confirmed micro BOS.
Full description
What this tool does
Structural Liquidity Signals shows where price likely tapped liquidity (stop clusters), then waits for structure to actually change before it prints a trigger. It spots:
Liquidity sweeps (SFPs) at recent pivots and at prior day/week highs/lows.
The latest Fair Value Gap (FVG) that often “pulls” price or serves as a reaction zone.
How far price is stretched from two VWAP anchors (one from the latest impulse, one from today’s session), scaled by ATR so it adapts to volatility.
A “percentile” extreme of an internal score. At extremes the script “arms” a setup; it only triggers after a small break of structure (BOS) on a closed bar.
Originality and design rationale, why it’s not “just a mashup”
This is not a mashup for its own sake. It’s a purpose-built flow that links where liquidity is likely to rest with how structure actually changes:
- Liquidity location: We focus on areas where stops commonly cluster—recent pivots and prior day/week highs/lows—then detect sweeps (SFPs) when price wicks beyond and closes back inside.
- Displacement context: We track the last Fair Value Gap (FVG) to account for recent inefficiency that often acts as a magnet or reaction zone.
- Stretch measurement: We anchor VWAP to the latest N-bar impulse and to the Daily session, then normalize stretch by ATR to assess dislocation consistently across assets/timeframes.
- Composite exhaustion: We combine stretch, wick skew, and volume surprise, then bend the result with a tanh transform so extremes are bounded and comparable.
- Dynamic extremes and discipline: Rather than triggering on every sweep, we “arm” at statistical extremes via percent-rank and only fire after a confirmed micro Break of Structure (BOS). This separates “interesting” from “actionable.”
Key concepts
SFP (liquidity sweep): A candle briefly trades beyond a level (where stops sit) and closes back inside. We detect these at:
Pivots (recent swing highs/lows confirmed by “left/right” bars).
Prior Day/Week High/Low (PDH/PDL/PWH/PWL).
FVG (Fair Value Gap): A small 3‑bar gap (bar2 high vs bar1 low, or vice versa). The latest gap often acts like a magnet or reaction zone. We track the most recent Up/Down gap and whether price is inside it.
AVWAP stretch: Distance from an Anchored VWAP divided by ATR (volatility). We use:
Impulse AVWAP: resets on each new N‑bar high/low.
Daily AVWAP: resets each new session.
PR (Percentile Rank): Where the current internal score sits versus its own recent history (0..100). We arm shorts at high PR, longs at low PR.
Micro BOS: A small break of the recent high (for longs) or low (for shorts). This is the “go/no‑go” confirmation.
How the parts work together
Find likely liquidity grabs (SFPs) at pivots and PD/W levels.
Add context from the latest FVG and AVWAP stretch (how far price is from “fair”).
Build a bounded score (so different markets/timeframes are comparable) and compute its percentile (PR).
Arm at extremes (high PR → short candidate; low PR → long candidate).
Only print a trigger after a micro BOS, on a closed bar, with spacing/cooldown rules.
What you see on the chart (legend)
Lines:
Teal line = Impulse AVWAP (resets on new N‑bar extreme).
Aqua line = Daily AVWAP (resets each session).
PDH/PDL/PWH/PWL = prior day/week levels (toggle on/off).
Zones:
Greenish box = latest Up FVG; Reddish box = latest Down FVG.
The shading/border changes after price trades back through it.
SFP labels:
SFP‑P = SFP at Pivot (dotted line marks that pivot’s price).
SFP‑L = SFP at Level (at PDH/PDL/PWH/PWL).
Throttle: To reduce clutter, SFPs are rate‑limited per direction.
Triggers:
Triangle up = long trigger after BOS; triangle down = short trigger after BOS.
Optional badge shows direction and PR at the moment of trigger.
Optional Trigger Zone is an ATR‑sized box around the trigger bar’s close (for visualization only).
Background:
Light green/red shading = a long/short setup is “armed” (not a trigger).
Dashboard (Mini/Pro) — what each item means
PR: Percentile of the internal score (0..100). Near 0 = bullish extreme, near 100 = bearish extreme.
Gauge: Text bar that mirrors PR.
State: Idle, Armed Long (with a countdown), or Armed Short.
Cooldown: Bars remaining before a new setup can arm after a trigger.
Bars Since / Last Px: How long since last trigger and its price.
FVG: Whether price is in the latest Up/Down FVG.
Imp/Day VWAP Dist, PD Dist(ATR): Distance from those references in ATR units.
ATR% (Gate), Trend(HTF): Status of optional regime filters (volatility/trend).
How to use it (step‑by‑step)
Keep the Safety toggles ON (default): triggers/visuals on bar‑close, optional confirmed HTF for trend slope.
Choose timeframe:
Intraday (5m–1h) or Swing (1h–4h). On very fast/thin charts, enable Performance mode and raise spacing/cooldown.
Watch the dashboard:
When PR reaches an extreme and an SFP context is present, the background shades (armed).
Wait for the trigger triangle:
It prints only after a micro BOS on a closed bar and after spacing/cooldown checks.
Use the Trigger Zone box as a visual reference only:
This script never tells you to buy/sell. Apply your own plan for entry, stop, and sizing.
Example:
Bullish: Sweep under PDL (SFP‑L) and reclaim; PR in lower tail arms long; BOS up confirms → long trigger on bar close (ATR-sized trigger zone shown).
Bearish: Sweep above PDH/pivot (SFP‑L/P) and reject; PR in upper tail arms short; BOS down confirms → short trigger on bar close (ATR-sized trigger zone shown).
Settings guide (with “when to adjust”)
Safety & Stability (defaults ON)
Confirm triggers at bar close, Draw visuals at bar close: Keep ON for clean, stable prints.
Use confirmed HTF values: Applies to HTF trend slope only; keeps it from changing until the HTF bar closes.
Performance mode: Turn ON if your chart is busy or laggy.
Core & Context
ATR Length: Bigger = smoother distances; smaller = more reactive.
Impulse AVWAP Anchor: Larger = fewer resets; smaller = resets more often.
Show Daily AVWAP: ON if you want session context.
Use last FVG in logic: ON to include FVG context in arming/score.
Show PDH/PDL/PWH/PWL: ON to see prior day/week levels that often attract sweeps.
Liquidity & Microstructure
Pivot Left/Right: Higher values = stronger/rarer pivots.
Min Wick Ratio (0..1): Higher = only more pronounced SFP wicks qualify.
BOS length: Larger = stricter BOS; smaller = quicker confirmations.
Signal persistence: Keeps SFP context alive for a few bars to avoid flicker.
Signal Gating
Percent‑Rank Lookback: Larger = more stable extremes; smaller = more reactive extremes.
Arm thresholds (qHi/qLo): Move closer to 0.5 to see more arms; move toward 0/1 to see fewer arms.
TTL, Cooldown, Min bars and Min ATR distance: Space out triggers so you’re not reacting to minor noise.
Regime Filters (optional)
ATR percentile gate: Only allow triggers when volatility is at/above a set percentile.
HTF trend gate: Only allow longs when the HTF slope is up (and shorts when it’s down), above a minimum slope.
Visuals & UX
Only show “important” SFPs: Filters pivot SFPs by Volume Z and |Impulse stretch|.
Trigger badges/history and Max badge count: Control label clutter.
Compact labels: Toggle SFP‑P/L vs full names.
Dashboard mode and position; Dark theme.
Reading PR (the built‑in “oscillator”)
PR ~ 0–10: Potential bullish extreme (long side can arm).
PR ~ 90–100: Potential bearish extreme (short side can arm).
Important: “Armed” ≠ “Enter.” A trigger still needs a micro BOS on a closed bar and spacing/cooldown to pass.
Repainting, confirmations, and HTF notes
By default, prints wait for the bar to close; this reduces repaint‑like effects.
Pivot SFPs only appear after the pivot confirms (after the chosen “right” bars).
PD/W levels come from the prior completed candles and do not change intraday.
If you enable confirmed HTF values, the HTF slope will not change until its higher‑timeframe bar completes (safer but slightly delayed).
Performance tips
If labels/zones clutter or the chart lags:
Turn ON Performance mode.
Hide FVG or the Trigger Zone.
Reduce badge history or turn badge history off.
If price scaling looks compressed:
Keep optional “score”/“PR” plots OFF (they overlay price and can affect scaling).
Alerts (neutral)
Structural Liquidity: LONG TRIGGER
Structural Liquidity: SHORT TRIGGER
These fire when a trigger condition is met on a confirmed bar (with defaults).
Limitations and risk
Not every sweep/extreme reverses; false triggers occur, especially on thin markets and low timeframes.
This indicator does not provide entries, exits, or position sizing—use your own plan and risk control.
Educational/informational only; no financial advice.
License and credits
© BullByte - MPL 2.0. Open‑source for learning and research.
Built from repeated observations of how liquidity runs, imbalance (FVG), and distance from “fair” (AVWAPs) combine, and how a small BOS often marks the moment structure actually shifts.
Smarter Money Concepts Dashboard [PhenLabs]📊Smarter Money Concepts Dashboard
Version: PineScript™v6
📌Description
The Smarter Money Concepts Dashboard is a comprehensive institutional trading analysis tool that combines six of our most powerful smarter money concepts indicators into one unified suite. This advanced system automatically detects and visualizes Fair Value Gaps, Inverted FVGs, Order Blocks, Wyckoff Springs/Upthrusts, Wick Rejection patterns, and ICT Market Structure analysis.
Built for serious traders who need institutional-grade market analysis, this dashboard eliminates subjective interpretation by automatically identifying where smart money is likely positioned. The integrated real-time dashboard provides instant status updates on all active patterns, making it easy to monitor market conditions at a glance.
🚀Points of Innovation
● Multi-Module Integration: Six different SMC concepts unified in one comprehensive system
● Real-Time Dashboard Display: Live tracking of all active patterns with customizable positioning
● Advanced Volume Filtering: Institutional volume confirmation across all pattern types
● Automated Pattern Management: Smart memory system prevents chart clutter while maintaining relevant zones
● Probability-Based Wyckoff Detection: Mathematical probability calculations for spring/upthrust patterns
● Dual FVG System: Both standard and inverted Fair Value Gap detection with equilibrium analysis
🔧Core Components
● Fair Value Gap Engine: Detects standard FVGs with volume confirmation and equilibrium line analysis
● Inverted FVG Module: Advanced IFVG detection using RVI momentum filtering for inversion confirmation
● Order Block System: Institutional order block identification with customizable mitigation methods
● Wyckoff Pattern Recognition: Automated spring and upthrust detection with probability scoring
● Wick Rejection Analysis: High-probability reversal patterns based on wick-to-body ratios
● ICT Market Structure: Simplified institutional concepts with commitment tracking
🔥Key Features
● Comprehensive Pattern Detection: All major SMC concepts in one indicator with automatic identification
● Volume-Confirmed Signals: Multiple volume filters ensure only institutional-grade patterns are highlighted
● Interactive Dashboard: Real-time status display with active pattern counts and module status
● Smart Memory Management: Automatic cleanup of old patterns while preserving relevant market zones
● Full Alert System: Complete notification coverage for all pattern types and signal generations
● Customizable Display Options: Adjustable colors, transparency, and positioning for all visual elements
🎨Visualization
● Color-Coded Zones: Distinct color schemes for bullish/bearish patterns across all modules
● Dynamic Box Extensions: Automatically extending zones until mitigation or invalidation
● Equilibrium Lines: Fair Value Gap midpoint analysis with dotted line visualization
● Signal Markers: Clear spring/upthrust signals with directional arrows and probability indicators
● Dashboard Table: Professional-grade status panel with module activation and pattern counts
● Candle Coloring: Wick rejection highlighting with transparency-based visual emphasis
📖Usage Guidelines
Fair Value Gap Settings
● Days to Analyze: Default 15, Range 1-100 - Controls historical FVG detection period
● Volume Filter: Enables institutional volume confirmation for gap validity
● Min Volume Ratio: Default 1.5 - Minimum volume spike required for gap recognition
● Show Equilibrium Lines: Displays FVG midpoint analysis for precise entry targeting
Order Block Configuration
● Scan Range: Default 25 bars - Lookback period for structure break identification
● Volume Filter: Institutional volume confirmation for order block validation
● Mitigation Method: Wick or Close-based invalidation for different trading styles
● Min Volume Ratio: Default 1.5 - Volume threshold for significant order block formation
Wyckoff Analysis Parameters
● S/R Lookback: Default 20 - Support/resistance calculation period for spring/upthrust detection
● Volume Spike Multiplier: Default 1.5 - Required volume increase for pattern confirmation
● Probability Threshold: Default 0.7 - Minimum probability score for signal generation
● ATR Recovery Period: Default 5 - Price recovery calculation for pattern strength assessment
Market Structure Settings
● Auto-Detect Zones: Automatic identification of high-volume thin zones
● Proximity Threshold: Default 0.20% - Price proximity requirements for zone interaction
● Test Window: Default 20 bars - Time period for zone commitment calculation
Display Customization
● Dashboard Position: Four corner options for optimal chart layout
● Text Size: Scalable from Tiny to Large for different screen configurations
● Pattern Colors: Full customization of all bullish and bearish zone colors
✅Best Use Cases
● Swing Trading: Identify major institutional zones for multi-day position entries
● Day Trading: Precise intraday entries at Fair Value Gaps and Order Block boundaries
● Trend Analysis: Market structure confirmation for directional bias establishment
● Risk Management: Clear invalidation levels provided by all pattern boundaries
● Multi-Timeframe Analysis: Works across all timeframes from 1-minute to monthly charts
⚠️Limitations
● Market Condition Dependency: Performance varies between trending and ranging market environments
● Volume Data Requirements: Requires accurate volume data for optimal pattern confirmation
● Lagging Nature: Some patterns confirmed after initial price movement has begun
● Pattern Density: High-volatility markets may generate excessive pattern signals
● Educational Tool: Requires understanding of smart money concepts for effective application
💡What Makes This Unique
● Complete SMC Integration: First indicator to combine all major smart money concepts comprehensively
● Real-Time Dashboard: Instant visual feedback on all active institutional patterns
● Advanced Volume Analysis: Multi-layered volume confirmation across all detection modules
● Probability-Based Signals: Mathematical approach to Wyckoff pattern recognition accuracy
● Professional Memory Management: Sophisticated pattern cleanup without losing market relevance
🔬How It Works
1. Pattern Detection Phase:
● Multi-timeframe scanning for institutional footprints across all enabled modules
● Volume analysis integration confirms patterns meet institutional trading criteria
● Real-time pattern validation ensures only high-probability setups are displayed
2. Signal Generation Process:
● Automated zone creation with precise boundary definitions for each pattern type
● Dynamic extension system maintains relevance until mitigation or invalidation occurs
● Alert system activation provides immediate notification of new pattern formations
3. Dashboard Update Cycle:
● Live status monitoring tracks all active patterns and module states continuously
● Pattern count updates provide instant feedback on current market condition density
● Commitment tracking for market structure analysis shows institutional engagement levels
💡Note:
This indicator represents institutional trading concepts and should be used as part of a comprehensive trading strategy. Pattern recognition accuracy improves with understanding of smart money principles. Combine with proper risk management and multiple confirmation methods for optimal results.
MTF Levels [OmegaTools]📖 Introduction
The Ω Levels Indicator is a complete market structure and level-mapping framework designed to help traders identify key zones where price is likely to react.
It blends classic technical anchors (VWAP, pivots, means, standard deviations) with modern statistical pattern recognition to dynamically project areas of manipulation, extension, and equilibrium.
At its core, Ω Levels creates an evolving map of market balance vs. imbalance, showing traders where liquidity is most likely to build and where price could pivot or accelerate.
But what makes it truly unique is the Pivot Forecaster — an embedded predictive engine that applies machine-learning inspired logic to recognize conditions that historically precede market turning points.
🔎 Key Features
Customizable Levels Framework
Define up to three levels (manipulation, extensions, VWAP, pivots, stdev bands, or prior extremes).
Choose mean references such as Open, VWAP, Pivot Mean, or Previous Session Mean.
Style controls (solid, dotted, dashed) and fill modes (internal, external, ranges) allow you to adapt the chart to your visual workflow.
Dynamic Zone Highlighting
Automatic fills between internal/external levels, or between specific level pairs (1–2, 1–3, 2–3).
Makes it easy to visualize value areas, expansions, and compression zones at a glance.
Multi-Timeframe Anchoring
Works on any timeframe, but calculations can be anchored to a higher timeframe (e.g., show daily VWAP & pivots on a 15m chart).
This allows traders to align intraday execution with higher timeframe context.
Pivot Forecaster (Machine Learning / Pattern Recognition)
This is the advanced predictive component.
The algorithm collects historical conditions observed around pivot highs and lows (volume state, ATR state, % candle expansion, oscillator conditions).
It then builds statistical “profiles” of typical pivot behavior and compares them in real-time against current market conditions.
When conditions match the “signature” of a pivot, the indicator highlights a Forecast Pivot High or Forecast Pivot Low (displayed as small diamond markers).
This functions as a pattern-recognition system, effectively learning from past pivots to anticipate where the next turning point is more likely to occur.
⚡ How Traders Can Use It
Intraday Execution: Use VWAP, manipulation, and extension levels to frame trades around liquidity zones.
Swing Context: Overlay higher timeframe pivots and means to guide medium-term positioning.
Fade Setups: Forecasted pivots often coincide with exhaustion zones where fading momentum carries edge.
Breakout Validation: When price breaks a structural level but the forecaster does not confirm a pivot, continuation probability is higher.
Risk Management: Levels provide natural stop/target placements, while pivot forecasts serve as warning signals for potential reversals.
⚙️ Settings Overview
Timeframe: Choose the anchor timeframe for calculations (default: Daily).
Means: Two selectable mean references (Open, VWAP, Pivot Point, Previous Mean).
Levels: Three levels can be customized (Manipulation, Extension, 1–2 StDev, Pivot Point, VWAP, Previous Extremes).
Fill Modes: Highlight zones between internal/external levels or custom ranges.
Visual Customization: Colors, line styles, fill opacity, and toggle for old levels.
Pivot Forecaster: Fully automated — no settings required, it adapts to instrument and timeframe.
🧭 Best Practices
Align Levels With Market Profile: Treat the levels as dynamic S/R zones and watch how price interacts with them.
Use Forecaster as Confirmation: The diamonds are not standalone signals; they are context filters that help you decide whether a move has higher reversal odds.
Higher Timeframe Anchoring: On intraday charts, set the timeframe to Daily or Weekly to trade with institutional levels.
Combine With ATR: Pair with the Ω ATR Indicator to size positions according to volatility while Ω Levels provides the structural roadmap.
📌 Summary
The Ω Levels Indicator is more than a level plotter — it’s a market map + predictive engine.
By combining traditional levels with an intelligent pivot forecaster, it gives traders both the static structure of where price should react, and the dynamic signal of where it is likely to react next.
This dual-layer approach — structural + predictive — makes it an invaluable tool for discretionary intraday traders, swing traders, and anyone who wants to anticipate price behavior instead of just reacting to it.
Heikin FlowHeikin Flow
by Ben Deharde, 2025
Overview
Heikin Flow is a trend and momentum oscillator built on a smoothed reverse-Heikin-Ashi baseline. It quantifies the distance between price and this baseline, then colors the histogram to reflect both direction and acceleration/deceleration. Use it standalone to read trend energy and shifts, or pair it with Heikin Rider for momentum-aware breakout confirmation.
What It Does
Computes a reverse-HA baseline and optionally smooths it with a selectable MA.
Plots a histogram of distance (price minus baseline) to visualize directional pressure.
Colors the histogram by trend state (above/below baseline) and momentum (accelerating vs. decelerating).
Provides alerts on zero-line crosses to spotlight potential momentum regime changes.
The histogram also helps to spot divergence between price and momentum (e.g., price making new highs while the histogram weakens).
How It Works
Reverse-HA Baseline
Heikin Flow derives a “reverse close” value from Heikin Ashi context (using prior HA open/close with current bar range) to capture underlying pressure. This value is range-bounded to avoid extremes, then optionally smoothed. The resulting line acts as a soft directional baseline.
Smoothing (Noise Control)
Choose SMA/EMA/HMA/VWMA/RMA and a length to control baseline responsiveness. Shorter lengths react faster, longer lengths emphasize trend consistency by filtering noise—useful when pairing with breakout tools like Rider.
Trend & Momentum Logic
Trend: If price is above the baseline, the environment is considered uptrend; below indicates downtrend.
Momentum: The change in distance bar-to-bar distinguishes acceleration (growing distance) from deceleration (shrinking distance).
This dual readout helps you see not just direction, but the quality of that direction—strong push vs. weakening move.
Coloring (Aligned with Heikin Rider Palette)
Deep Blue: Uptrend & accelerating
Light Blue: Uptrend & decelerating
Deep Red: Downtrend & accelerating
Soft Orange: Downtrend & decelerating
This mirrors the palette logic from Heikin Rider for immediate visual consistency across the suite.
How to use
Read the histogram above/below zero (price–baseline) as directional bias; watch color changes for momentum context.
Use zero-line crosses as momentum regime shifts; confirm with price action or Heikin Rider breakout signals.
Watch for divergence between price action and the histogram as an early clue of weakening moves.
Adjust smoothing method/length to fit your market and timeframe—faster for scalping, slower to highlight sustained trends.
Inputs
Smoothing Type & Length for the baseline (SMA/EMA/HMA/VWMA/RMA)
Info Box toggles (display and formatting)
Live Mode option for real-time vs. confirmed-bar behavior (avoids inadvertent lookahead)
Originality
Heikin Flow adapts the HA-driven methodology to an oscillator that focuses on distance-to-baseline and momentum quality, using a reverse-HA construction and flexible MA smoothing—complementing Heikin Rider’s smoothed HA envelope breakout design for a cohesive, momentum-aware workflow.
Alerts
Bullish Heikin Flow Cross — distance crosses above 0 (on bar close)
Bearish Heikin Flow Cross — distance crosses below 0 (on bar close)
Otekura Range Trade Algorithm [Tradebuddies]The Range Trade Algorithm calculates the levels for Monday.
On the chart you will see that the Monday levels will be marked as 1 0 -1.
The M High level calculates Monday's high close and plots it on the screen.
M Low calculates the low close of Monday and plots it on the screen.
The coloured lines on the screen are the points of the range levels formulated with fibonacci values.
The indicator has its own Value table. The prices of the levels are written.
Potential Range breakout targets tell prices at points matching the fibonacci values. These are Take profit or reversal points.
Buy and Sell indicators are determined by the range breakout.
Users can set an alarm on the indicator and receive direct notification with their targets when a new range occurs.
Fib values are multiplied by range values and create an average target according to the price situation. These values represent an area. Breakdown targets show that the target is targeted until the area.
Outside the Bollinger Bands Alerting Indicator Overview
The Outside the Bollinger Bands Alerting Indicator is a comprehensive technical analysis tool that combines multiple proven
indicators into a single, powerful system designed to identify high-probability reversal patterns at Bollinger Band extremes. This
indicator goes beyond simple band touches to detect sophisticated pattern formations that often signal strong directional moves.
Key Features & Capabilities
🎯 Advanced Pattern Recognition
Bollinger Band Breakout Patterns
- Detects "pierce-and-reject" formations where price breaks through a Bollinger Band but immediately reverses back inside
- Identifies failed breakouts that often lead to strong moves in the opposite direction
- Combines multiple confirmation signals: engulfing candle patterns, MACD momentum, and ATR volatility filters
- Visual alerts with symbols positioned below (bullish) or above (bearish) candles
Tweezer Top & Bottom Patterns
- Identifies consecutive candles with nearly identical highs (tweezer tops) or lows (tweezer bottoms)
- Requires at least one candle to breach the respective Bollinger Band
- Confirms reversal with directional close requirements
- Customizable tolerance settings for pattern sensitivity
- Visual alerts with ❙❙ symbols for easy identification
📊 Multi-Indicator Integration
Bollinger Bands Indicator
- Dual-band configuration with outer (2.0 std dev) and inner (1.5 std dev) bands that can be adjusted to suit your own parameters
- Configurable MA types: SMA, EMA, SMMA (RMA), WMA, VWMA
- Customizable length, source, and offset parameters
- Color-coded band fills for visual clarity
Moving Average Suite
- EMA 9, 21, 50, and 200 (individually toggleable)
- Special "SMA 3 High" for help visualizing and detecting Bollinger Band break-outs
- Dynamic color coding based on price relationship
Optional Ichimoku Cloud overlay
- Complete Ichimoku implementation with customizable periods
- Dynamic cloud coloring based on trend direction
- Toggleable overlay that doesn't interfere with other indicators
🚨 Comprehensive Alert System
Real-Time JSON Alerts
- Sends structured data on every confirmed bar close
- Includes all indicator values: BB levels, EMAs, MACD, RSI
- Contains signal states and crossover conditions
- Perfect for automated trading systems and webhooks
{"timestamp":1753118700000,"symbol":"ETHUSD","timeframe":"5","price":3773.3,"bollinger_bands":{"upper":3826.95,"basis":3788.32,"lower":3749.68},"emas":{"ema_9":3780.45,"ema_21":3788.92,"ema_50":3800.79,"ema_200":3787.74,"sma_3_high":3789.45},"macd":{"macd":-10.1932,"signal":-11.3266,"histogram":1.1334},"rsi":{"rsi":40.5,"rsi_ma":39.32,"level":"neutral"}}
Specific Alert Conditions
- MACD histogram state changes (rising to falling, falling to rising)
- RSI overbought/oversold crossovers
- All pattern detections (BB Bounce, Tweezer patterns)
- Bollinger Band breakout alerts
🎨 Visual Elements
Pattern Identification
- ♻ symbols for Bollinger Band breakout patterns (green for bullish, red for bearish)
- ❙❙ symbols for tweezer patterns (green below for bottoms, red above for tops)
- Color-coded band fills for trend visualization
Chart Overlay Options
- All moving averages with distinct colors
- Bollinger Bands with inner and outer boundaries
- Optional Ichimoku cloud with trend-based coloring
Trading Applications
Reversal Trading
- Identify high-probability reversal points at extreme price levels
- Use failed breakout patterns for entry signals
- Combine multiple timeframes for enhanced accuracy
Trend Analysis
- Monitor moving average relationships for trend direction
- Use Ichimoku cloud for trend strength assessment
- Track momentum with MACD and RSI integration
Risk Management
- ATR-based volatility filtering reduces false signals
- Multiple confirmation requirements improve signal quality
- Real-time alerts enable prompt decision making
Suggested Use
- Use on multiple timeframes for confluence
- Combine with support/resistance levels for enhanced accuracy
- Set up alerts for hands-free monitoring
- Customize settings based on market volatility and trading style
- Consider volume confirmation for stronger signals
unFair Value Gap Detector [theUltimator5]The unFair Value Gap Detector (uFVG) highlights imbalance zones that form when trend strength is weak but directional pressure spikes—a condition often followed by price reversion back into that level. Unlike the classic 3-candle ICT FVG, this tool is designed to help you have an unFair edge in gap retracement detection by plotting high probability gap reversion opportunities on the current timeframe and the next FIVE (yes five) higher timeframes.
What you’ll see:
Gap line per event: A single, no-nonsense line at the level price most often returns to.
Auto multi-timeframe view: uFVG ladders up through five higher timeframes and shows their levels too—each with its own color.
Smart de-clutter: Near-duplicate lines across timeframes are filtered so your chart stays readable.
Note: This indicator is intentionally minimalistic visually to minimize chart clutter, while still being an extremely powerful tool
Optional visuals:
Light background tint during quiet, coiling conditions.
Soft fill from price to the active line for quick context.
Compact labels that note the price and which timeframe printed it.
Why it is unique and effective (the “unfair” edge):
Early, practical context: Spots levels near when the imbalance forms—useful before the crowd catches on.
Clarity over noise: One line per event. No boxes, no sprawling zones, fewer “maybe” areas.
Timeframe confluence: When multiple timeframes cluster around the same price, you’ve got a stronger focal point.
Simple risk framing: If price slices through the line decisively, that idea’s done. Next.
How to use it:
Mean-reversion play: Look for price to tag the line, take profits into it, or fade a first reaction.
Continuation play: After the line is “mitigated,” reassess in the original direction.
Prioritize by timeframe: Higher-timeframe lines tend to carry more weight.
Respect clusters: Multiple lines stacked near one price often mark important pivots.
Customization
Colors: Separate colors for current and higher-timeframe lines.
Toggles: Turn on/off background highlights, line-to-price fill, and labels.
Minimal fuss: The rest is auto—timeframes, line lifecycle, and de-duplication are handled for you.
Trendline Breakout Strategy [KedArc Quant] Description
A single, rule-based system that builds two trendlines from confirmed swing pivots and trades their breakouts, with optional retest, trend-regime gates (EMA / HTF EMA), and ATR-based risk. All parts serve one decision flow: structure → breakout → gated entry → managed risk.
What it does (for traders)
Draws Up line (teal) through the last two Higher Lows and Down line (red) through the last two Lower Highs, then extends them forward.
Long when price breaks above red; Short when price breaks below teal.
Optional Retest entry: after a break, wait for a pullback toward the broken line within an ATR-scaled buffer.
Uses ATR stop and R-multiple target so risk is consistent across symbols/timeframes.
Labels HL1/HL2/LH1/LH2 so non-coders can verify which pivots built each line.
Why these components are combined
Pure breakout systems on trendlines suffer from three practical issues:
False breaks in chop → solved by trend-regime gates (EMA / HTF EMA) that only allow trades aligned with the prevailing trend.
Uneven volatility across markets/timeframes → solved by ATR-based stop/target, normalizing distance so R-multiples are comparable.
First break whipsaws near wedge apices → mitigated by the optional retest rule that demands a pullback/hold before entry.
These modules are not separate indicators with their own signals. They are support roles inside one method.
The pivot engine defines structure, the breakout detector defines signal, the regime gates decide if we’re allowed to take that signal, and the ATR module sizes risk.
Together they make the trendline breakout usable, testable, and explainable.
How it works (mechanism; each component explained)
1) Pivot engine (structure, non-repainting)
Swings are confirmed with ta.pivotlow/high(L, R). A pivot only exists after R bars (no look-ahead), so once plotted, the line built from those pivots will not repaint.
2) Trendline builder (geometry)
Teal line updates when two consecutive pivot lows satisfy HL2.price > HL1.price (and HL2 occurs after HL1).
Red line updates when two consecutive pivot highs satisfy LH2.price < LH1.price.
Lines are extended right and their current value is read every bar via line.get_price().
3) Breakout detector (signal)
On every bar, compute:
crossover(close, redLine) ⇒ Long breakout
crossunder(close, tealLine) ⇒ Short breakdown
4) Regime gates (trend filters, not separate signals)
EMA gate: allow longs only if close > EMA(len), shorts only if close < EMA(len).
HTF EMA gate (optional): same rule on a higher timeframe to avoid fighting the larger trend.
These do not create entries; they simply permit or block the breakout signal.
5) Retest module (optional confirmation)
After a breakout, record the line price. A valid retest occurs if price pulls back within an ATR-scaled buffer toward that broken line and then closes back in the breakout direction.
This reduces first-tick fakeouts.
6) Risk module (position exit)
Initial stop = ATR(len) × atrMult from entry.
Target = tpR × (ATR × atrMult) (e.g., 2R).
This keeps results consistent across instruments/timeframes.
Entries & exits
Long entry
Base: close breaks above red and passes EMA/HTF gates.
Retest (if enabled): after the break, price pulls back near the broken red line (within the ATR buffer) and holds; then enter.
Short entry
Mirror logic with teal (break below & gates), optionally with a retest.
Exit
strategy.exit places ATR stop & R-multiple target automatically.
Optional “flip”: close if the opposite base signal triggers.
How to use it (step-by-step)
Timeframe: 1–15m for intraday, 1–4h for swing.
Start defaults: Pivot L/R = 5, EMA len = 200, ATR len = 14, ATR mult = 2, TP = 2R, Retest = ON.
Tune sensitivity:
Faster lines (more trades): set L/R = 3–4.
Fewer counter-trend trades: enable HTF EMA (e.g., 60-min or Daily).
Visual audit: labels HL1/HL2 & LH1/LH2 show which pivots built each line—verify by eye.
Alerts: use Long breakout, Short breakdown, and Retest alerts to automate.
Originality (why it merits publication)
Trades the visualization: many “auto-trendline” tools only draw lines; this one turns them into testable, alertable rules.
Integrated design: each component has a defined role in the same pipeline—no unrelated indicators bolted together.
Transparent & non-repainting: pivot confirmation removes look-ahead; labels let non-coders understand the setup that produced each signal.
Notes & limitations
Lines update only after pivot confirmation; that lag is intentional to avoid repainting.
Breakouts near an apex can whipsaw; prefer Retest and/or HTF gate in choppy regimes.
Backtests are idealized; forward-test and size risk appropriately.
⚠️ Disclaimer
This script is provided for educational purposes only.
Past performance does not guarantee future results.
Trading involves risk, and users should exercise caution and use proper risk management when applying this strategy.
Pullback & ATR Trailing Strategy※日本語は英文の次に記載あります。
Overview
This indicator combines short-term RSI pullback/rebound signals with long-term RSI divergence to visualize potential buy and sell opportunities.
It also plots ATR-based trailing stops and partial take-profit lines, making it suitable for day trading and short-term trading.
Alerts are triggered when signal conditions are met.
Key Features
Detect short-term RSI pullbacks/rebounds (default 6 periods)
Detect divergences on long-term RSI
Visualize buy/sell signals with labels
Display ATR-based trailing stop and partial take-profit lines
Trigger alerts when conditions are met
Settings Explanation
Short-term RSI Length (rsiShortLen) Period for short-term RSI used to detect pullbacks or rebounds
Pullback Threshold (levelLow) RSI level below which a buy signal is considered
Rebound Threshold (levelHigh) RSI level above which a sell signal is considered
Long-term Timeframe (longTF) Timeframe used for divergence detection
Long-term RSI Length (longRSILen) Period for RSI on the long-term timeframe, used for divergence detection
Pivot Width Left / Right (pivotLeft / pivotRight)
Determines how we detect swing highs/lows (peaks and valleys).
For example, with pivotLeft=3 and pivotRight=3, a bar is considered a swing high if it is higher than the 3 bars to its left and 3 bars to its right.
Larger numbers detect only bigger swings, smaller numbers also detect smaller swings.
ATR Length (atrLen) Period for ATR calculation for trailing stops
ATR Multiplier (atrMult) Multiplier for ATR to calculate trailing stop distance
Partial Take-Profit Multiplier (tpMult) Multiplier to calculate half-profit level based on swing amplitude
Green line (Long Trail / translucent green)
ATR-based trailing stop line for long positions.
Used as a stop-loss or trailing stop for open buy trades.
Dark green line shows partial take-profit (TP), translucent green shows trailing stop level.
Red line (Short Trail / translucent red)
ATR-based trailing stop line for short positions.
Used as a stop-loss or trailing stop for open sell trades.
Dark red line shows partial take-profit (TP), translucent red shows trailing stop level.
Note: TP lines indicate partial take-profit targets, while ATR trailing lines indicate stop-loss/trailing stop levels if the price moves against the position.
日本語説明ーーーーーーーーーーーーーーーーーーーーーーーーーーーー
概要
このインジケーターは、短期RSIの押し目/戻りシグナルと、長期足RSIによるダイバージェンスを組み合わせて、買い・売りのチャンスを可視化します。
さらに、ATRベースのトレールストップラインや半分利確ラインも表示し、デイトレードや短期トレードに最適化しています。
シグナル条件に一致した場合にアラートも作動します。
主な機能
短期RSI(デフォルト6期間)で押し目・戻りを検出
長期足RSIでのダイバージェンスを検出
BUY/SELLラベルでシグナルを視覚化
ATRベースのトレールライン・半分利確ラインを表示
条件一致時にアラート発動
各設定の説明
短期RSI期間 (rsiShortLen) デイトレ用の短期RSIの期間。押し目や戻りのシグナルに使用
押し目閾値 (levelLow) RSIが下回ったら買いシグナル判定に使用
戻り閾値 (levelHigh) RSIが上回ったら売りシグナル判定に使用
長期足 (longTF) ダイバージェンス判定用の長期足の時間軸
長期RSI期間 (longRSILen) 長期足で計算するRSIの期間。ダイバージェンス判定に使用
左右ピボット幅 (pivotLeft / pivotRight) 高値や安値を「スイングの山・谷」として判定する時に使う幅です。
例えば pivotLeft=3, pivotRight=3 の場合、「左に3本、右に3本のローソク足より高い/低い点」をスイングの頂点や底と見なします。
数値を大きくすると大きな波だけを拾い、小さくすると小さな波も拾いやすくなります。
ATR期間 (atrLen) トレールライン計算用ATRの期間
ATR倍率 (atrMult) トレールラインの距離をATRに掛ける倍率
半分利確倍率 (tpMult) 押し目/戻り幅に対して半分利確ラインを設定する倍率
緑の線(Long Trail / 半透明緑)
ATRベースのトレールストップラインです。
買いポジション中の損切り目安やトレーリングストップとして使います。
緑の濃い線は半分利確ライン(TP)、薄い緑の線はトレールストップの位置を示します。
赤い線(Short Trail / 半透明赤)
ATRベースのトレールストップラインです。
売りポジション中の損切り目安やトレーリングストップとして使います。
赤の濃い線は半分利確ライン(TP)、薄い赤の線はトレールストップの位置を示します。
補足:TP(Take Profit)線は半分利確の目安で、ATRトレールラインはポジションが逆行した時の損切り目安です。
Heikin Ashi Overlay SuiteHeikin Ashi Overlay Suite is designed to give traders more control and clarity when working with Heikin Ashi candles — whether you're analyzing trend strength, reducing chart noise, or simply improving your visual read of market momentum. It works by layering multiple types of HA overlays and color systems on top of your standard candlestick chart — without switching chart types. With dynamic gradient coloring, smoothing options, and a predictive line tool, this script helps you see not just what the current trend is, but how strong it is, and what it would take to reverse it.
Heikin Ashi candles help reduce noise but this script goes further by:
➡️adding color intelligence that shows trend strength using a streak counter
➡️uses smoothing logic to clean up chop and whipsaws
➡️introduces a predictive close line — a subtle but powerful guide for anticipating trend flips before they happen
Everything is configurable: colors, candle sources, overlays, predictive tools, and line styles. It’s built for traders who want visual speed, but don’t want to sacrifice signal quality.
At its core, the script offers two powerful dropdown controls:
💥HA Color Scheme (Colors Regular Candles) — Applies Heikin Ashi-derived coloring to your regular candles based on trend direction or streak strength. This gives you instant visual context without switching to a separate chart type.
💥HA Candle Overlay Mode — Overlays actual Heikin Ashi-style candles directly on top of your chart, using your preferred source:
➡️Custom HA candles using internal formula logic
➡️TradingView’s built-in Heikin Ashi source with your own colors
➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
🎨 Custom + Gradient HA Coloring🎨
See trend strength at a glance:
➡️1–4 bar streaks → lighter tone
➡️5–8 bars → medium tone
➡️9+ bars → bold tone, ideal for momentum-based entries, exits, or scaling strategies
→ Choose from:
➡️Your own custom color set
➡️A simple 2-color base mode
➡️Or a 3-level gradient for progressive trend analysis (using the streak counter)
🏛️ TradingView Official Heikin Ashi Overlay
Prefer native HA candles but want your own colors?
This mode plots TradingView's Heikin Ashi source, with your personal bullish/bearish color scheme.
➡️Ensures consistency with built-in charts while still leveraging your visual style.
🌊 Smoothed Heikin Ashi Candles — Clarity in Chaos🌊
These aren’t your standard HA candles. Smoothed Heikin Ashi uses a two-step EMA process to transform chaotic price action into a cleaner, slower-moving trend structure:
🔹 First, it smooths the raw OHLC data using EMA — filtering out minor price fluctuations.
🔹 Then, it applies the Heikin Ashi transformation on top of the smoothed data.
🔹 Finally, it applies a second EMA smoothing pass to the HA values — creating ultra-smooth candles.
📈 What You See:
Trends appear more fluid and consistent.
Choppy ranges and fakeouts are visually suppressed.
Minor pullbacks within a trend are de-emphasized, helping you avoid premature exits.
🎯 Best For:
Swing traders looking to stay in positions longer.
Intraday traders dealing with volatile or noisy instruments.
Anyone who wants a "trend map" overlay without the distractions of raw price action.
✅ Reduces whipsaws
✅ Delivers high-contrast trend zones
✅ Makes reversals more visually apparent (but with a slight lag)
📍 Predictive Close Line📍
Shows where the real close must land to flip the current HA candle's color.
✅ Use it like predictive support/resistance
✅ Know if the trend is actually at risk
✅Visualize potential fakeouts or confirmation
Color-coded based on current HA direction (bullish, bearish, or neutral).
📈 Tick by tick & bar-to-bar Plots📈
Provides 2 plot types:
1)1 plot that tracks a bar tick by tick
2)another plot that tracks the close from bar to bar
For the bar to bar plot, you can choose between 2 options:
✅Full Plot — continuous line colored by HA trend
✅Recent Segments — color just the last few bars (configurable) to reduce chart clutter
✅ Customize width, number of bars, and visibility
➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
📘 How to Use this script📘
Imagine you're watching a choppy 15-minute chart on a volatile crypto pair — price action is messy, and it’s hard to tell if a trend is forming or just noise.
Here’s how to cut through the chaos using Heikin Ashi Overlay Suite:
🔹 Step 1: Enable "Smoothed HA Candles"
Start by turning on the smoothed candles. You’ll immediately notice the noise fades, and broader directional moves become easier to follow. It's like switching from static to clean trend zones.
🧠 Why: Smoothed HA uses a double EMA process that filters out small reversals and lets larger moves stand out. Perfect for sideways or jittery charts.
🔹 Step 2: Watch the Color Gradient Build
As the smoothed candles begin to align in one direction, the gradient coloring (1–4, 5–8, 9+ streaks) gives you an at-a-glance visual of how strong the trend is.
✅ If you see 9+ same-colored candles? You’re likely in a mature trend.
✅ If it resets often? You’re in chop — consider staying out.
🔹 Step 3: Use the Predictive Close Line for Anticipation
Now here’s the edge — this line tells you where the candle would have to close to flip colors.
📉 If price is hovering just above it during a bullish run — momentum may be weakening.
📈 If price bounces off it — the trend may be strengthening.
This is excellent for confirming entries, exits, or spotting early warning signs.
🔹 Step 4: Switch Between Candle Modes as Needed
You can flip between:
✅ Custom HA: Gradient candles with your colors
✅ TradingView HA: The official source with your styling
✅ None: Just color regular candles using the HA logic
Use what fits your style — everything is modular.
🔹 Step 5: Tune It to Your Chart
Lastly, tweak streak thresholds (currently only can do this within the source code), smoothing lengths, and line styles to match your timeframe and strategy.
🎯 Tailor The Settings to Fit Your Trading Style🎯
🔹 🧪 Scalper (1–5 min charts)
If you’re trading fast intraday moves, you want quicker responsiveness and less lag.
Try these settings:
🔸Smoothing Lengths: Use lower values (e.g. len = 3, len2 = 5)
🔸Candle Mode: Use Custom HA or TV’s HA for real-time color flips
🔸Predictive Close Line: Great for ultra-fast anticipation of color reversals
🔸Line Mode: Use Recent Segments mode to track short bursts of trend
🔸Colors: Use high-contrast, opaque colors for clarity
✅ These settings help you catch micro-trends and flip signals faster, while still filtering out the worst of the noise.
🔹 🧪 Swing Trader (30m–4h charts and beyond)
If you’re looking for multi-hour or multi-day trend confirmation, prioritize clarity and staying in moves longer.
Recommended setup:
🔸Smoothing Lengths: Medium to high values (e.g. len = 8, len2 = 21)
🔸Candle Mode: Use Smoothed HA Candles to block out intrabar chop
🔸Gradient Colors: Enable to visualize trend maturity and strength
🔸Predictive Close Line: Helps confirm trend continuation or spot early reversals
🔸Line Mode: Use Full Plot Line for clean HA-based trend tracking
✅ These settings give you a calm, clean view of the bigger picture — ideal for holding positions longer and avoiding early exits.
🔧 This script isn’t just a chart overlay — it’s a visual trend engine.🔧
Ideal For:
🔶 Trend-followers who want clean, color-coded confirmation
🔶 Reversal traders spotting exhaustion via predictive flips
🔶 Scalpers filtering noise with lighter smoothing
🔶 Swing traders using smoothed visuals to hold longer
📌 Final Note
Heikin Ashi Overlay Pro is designed to help you see momentum, trend shifts, and market structure with greater clarity — not to predict price on its own. For best results:
✔️ Combine with support/resistance, moving averages, or price action patterns
✔️ Use Predictive Close as a confirmation tool, not a signal generator
✔️ Pair gradient colors with structure to gauge trend maturity
✔️ Always zoom out and check higher timeframes for context
🧠 Use this as part of a layered approach — not a standalone system.
🙏 Credits🙏
⚡HA logic based on SimpleCryptoLife
⚡Smoothed HA concept adapted from a script by Jackvmk
💡💡💡Turn logic into clarity. Structure into trades. And uncertainty into confidence.💡💡💡
Multi-Timeframe MACD Score (Customizable)this is a momemtum based indicator to know the direction of the trend and also to remain in the trend for longer time
Black DragonUse the RSI bands; when the price touches the upper band, it tends to go down, and when the price touches the lower band, it tends to go up. Pay attention to enter a trade only when a reversal candle appears; suitable for scalping on the M15 timeframe.
TJR Session High/LowsThis indicator plots the session Highs and Lows for Tokyo (20:00–03:00), London (03:00–08:00), and New York (08:00–17:00).
Each session can be toggled on or off, and you can choose whether to display only the High, only the Low, or both.
Customization options include:
Colors and line styles (Solid, Dashed, Dotted) for each session
Line width
Optional vertical markers at the session boundaries (20:00, 03:00, 08:00, 17:00) – dashed blue lines by default
The indicator updates dynamically: session High/Low levels are recalculated in real time as new bars come in, and only the most recent session lines are shown (no clutter from past sessions).
Default session times are set for Tokyo, London, and New York, but you can adjust them if needed.
MACD ProThe MACD Pro is a modern take on the classic MACD, designed to give traders deeper insights into market momentum, trend conditions, and potential turning points. While it keeps the standard MACD foundation, it introduces a few enhancements to make it more adaptive and visually intuitive.
At its core, the indicator calculates the traditional MACD line, Signal line and Histogram. The histogram can be optionally displayed.
One of the things that set this version apart is the addition of the MACD Leader, an optional feature that makes the MACD more responsive to price action. By applying an adaptive smoothing factor (Leader Sensitivity), the Leader line can provide earlier momentum cues compared to the standard MACD and help anticipate shifts before they become obvious on a standard MACD indicator.
Another enhancement is the regime-based color system for the MACD line. Instead of simply coloring based on the MACD or histogram itself, this indicator identifies the overall market regime using momentum and trend strength conditions.
Bullish Regime: Momentum is positive and trend strength is above average.
Bearish Regime: Momentum is negative and trend strength is above average.
Sideways Regime: Momentum remains weak and within noise levels.
This regime detection allows the MACD line to visually adapt, giving traders an extra layer of context beyond standard MACD signals to blend momentum analysis with market conditions, helping distinguish between trending and ranging environments.
SMA-CrossOver This indicator is dedicated to the "Trader Overseas" channel.
It's a pullback trading strategy that the channel owner shares for free on YouTube.
Filter 1: Use the 200 SMA as an "Uptrend" or "Downtrend" filter.
Filter 2: When all SMAs line up,
to confirm "Uptrend" or "Downtrend."
Short-term MA = SMA14
Medium-term MA = SMA50 (with a buffer channel).
The example image shows an "Uptrend."
When all SMAs line up, there's a "Bull" signal.
(SMA21 crosses above SMA50.)
Strategy: Wait for an "ENTRY" when the price pulls back into the zone.
1. Short Pullback Zone = SMA14 - SMA50
2. Deep Pullback Zone = SMA50 + Buffer Channel
May be used in conjunction with Price Action as an additional filter.
Additional Explanation: "CrossOver" signals
"Bull" or "Bear" Signals indicate an "up" or "down" crossover of SMA21 and SMA50.
"Bull" or "Bear" signal may be used as "Exit" for the position trade.
But beware of false signals if the trend is sideways.
Each of the SMA can adjust value.
Price Action Concepts [RUDYINDICATOR]/// This work is licensed under a Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) creativecommons.org
// © RUDYBANK INDICATOR - formerly know as RUDY INDICATOR
//@version=5
indicator("Price Action Concepts ", shorttitle = "RUDYINDICATOR-V1
- Price Action RUDYINDICATOR ", overlay = true, max_lines_count = 500, max_labels_count = 500, max_boxes_count = 500, max_bars_back = 500, max_polylines_count = 100)
//-----------------------------------------------------------------------------{
//Boolean set
//-----------------------------------------------------------------------------{
s_BOS = 0
s_CHoCH = 1
i_BOS = 2
i_CHoCH = 3
i_pp_CHoCH = 4
green_candle = 5
red_candle = 6
s_CHoCHP = 7
i_CHoCHP = 8
boolean =
array.from(
false
, false
, false
, false
, false
, false
, false
, false
, false
)
//-----------------------------------------------------------------------------{
// User inputs
//-----------------------------------------------------------------------------{
show_swing_ms = input.string ("All" , "Swing " , inline = "1", group = "MARKET STRUCTURE" , options = )
show_internal_ms = input.string ("All" , "Internal " , inline = "2", group = "MARKET STRUCTURE" , options = )
internal_r_lookback = input.int (5 , "" , inline = "2", group = "MARKET STRUCTURE" , minval = 2)
swing_r_lookback = input.int (50 , "" , inline = "1", group = "MARKET STRUCTURE" , minval = 2)
ms_mode = input.string ("Manual" , "Market Structure Mode" , inline = "a", group = "MARKET STRUCTURE" , tooltip = " Use selected lenght Use automatic lenght" ,options = )
show_mtf_str = input.bool (true , "MTF Scanner" , inline = "9", group = "MARKET STRUCTURE" , tooltip = "Display Multi-Timeframe Market Structure Trend Directions. Green = Bullish. Red = Bearish")
show_eql = input.bool (false , "Show EQH/EQL" , inline = "6", group = "MARKET STRUCTURE")
plotcandle_bool = input.bool (false , "Plotcandle" , inline = "3", group = "MARKET STRUCTURE" , tooltip = "Displays a cleaner colored candlestick chart in place of the default candles. (requires hiding the current ticker candles)")
barcolor_bool = input.bool (false , "Bar Color" , inline = "4", group = "MARKET STRUCTURE" , tooltip = "Color the candle bodies according to market strucutre trend")
i_ms_up_BOS = input.color (#089981 , "" , inline = "2", group = "MARKET STRUCTURE")
i_ms_dn_BOS = input.color (#f23645 , "" , inline = "2", group = "MARKET STRUCTURE")
s_ms_up_BOS = input.color (#089981 , "" , inline = "1", group = "MARKET STRUCTURE")
s_ms_dn_BOS = input.color (#f23645 , "" , inline = "1", group = "MARKET STRUCTURE")
lvl_daily = input.bool (false , "Day " , inline = "1", group = "HIGHS & LOWS MTF")
lvl_weekly = input.bool (false , "Week " , inline = "2", group = "HIGHS & LOWS MTF")
lvl_monthly = input.bool (false , "Month" , inline = "3", group = "HIGHS & LOWS MTF")
lvl_yearly = input.bool (false , "Year " , inline = "4", group = "HIGHS & LOWS MTF")
css_d = input.color (color.blue , "" , inline = "1", group = "HIGHS & LOWS MTF")
css_w = input.color (color.blue , "" , inline = "2", group = "HIGHS & LOWS MTF")
css_m = input.color (color.blue , "" , inline = "3", group = "HIGHS & LOWS MTF")
css_y = input.color (color.blue , "" , inline = "4", group = "HIGHS & LOWS MTF")
s_d = input.string ('⎯⎯⎯' , '' , inline = '1', group = 'HIGHS & LOWS MTF' , options = )
s_w = input.string ('⎯⎯⎯' , '' , inline = '2', group = 'HIGHS & LOWS MTF' , options = )
s_m = input.string ('⎯⎯⎯' , '' , inline = '3', group = 'HIGHS & LOWS MTF' , options = )
s_y = input.string ('⎯⎯⎯' , '' , inline = '4', group = 'HIGHS & LOWS MTF' , options = )
ob_show = input.bool (true , "Show Last " , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volumetric order blocks on the chart Ammount of volumetric order blocks to show")
ob_num = input.int (5 , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Orderblocks number", minval = 1, maxval = 10)
ob_metrics_show = input.bool (true , "Internal Buy/Sell Activity" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display volume metrics that have formed the orderblock")
css_metric_up = input.color (color.new(#089981, 50) , " " , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
css_metric_dn = input.color (color.new(#f23645 , 50) , "" , inline = "2", group = "VOLUMETRIC ORDER BLOCKS")
ob_swings = input.bool (false , "Swing Order Blocks" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Display swing volumetric order blocks")
css_swing_up = input.color (color.new(color.gray , 90) , " " , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
css_swing_dn = input.color (color.new(color.silver, 90) , "" , inline = "a", group = "VOLUMETRIC ORDER BLOCKS")
ob_filter = input.string ("None" , "Filtering " , inline = "d", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Filter out volumetric order blocks by BOS/CHoCH/CHoCH+", options = )
ob_mitigation = input.string ("Absolute" , "Mitigation " , inline = "4", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Trigger to remove volumetric order blocks", options = )
ob_pos = input.string ("Precise" , "Positioning " , inline = "k", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Position of the Order Block Cover the whole candle Cover half candle Adjust to volatility Same as Accurate but more precise", options = )
use_grayscale = input.bool (false , "Grayscale" , inline = "6", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Use gray as basic order blocks color")
use_show_metric = input.bool (true , "Show Metrics" , inline = "7", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show volume associated with the orderblock and his relevance")
use_middle_line = input.bool (true , "Show Middle-Line" , inline = "8", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Show mid-line order blocks")
use_overlap = input.bool (true , "Hide Overlap" , inline = "9", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = "Hide overlapping order blocks")
use_overlap_method = input.string ("Previous" , "Overlap Method " , inline = "Z", group = "VOLUMETRIC ORDER BLOCKS" , tooltip = " Preserve the most recent volumetric order blocks Preserve the previous volumetric order blocks", options = )
ob_bull_css = input.color (color.new(#089981 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
ob_bear_css = input.color (color.new(#f23645 , 90) , "" , inline = "1", group = "VOLUMETRIC ORDER BLOCKS")
show_acc_dist_zone = input.bool (false , "" , inline = "1", group = "Accumulation And Distribution")
zone_mode = input.string ("Fast" , "" , inline = "1", group = "Accumulation And Distribution" , tooltip = " Find small zone pattern formation Find bigger zone pattern formation" ,options = )
acc_css = input.color (color.new(#089981 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
dist_css = input.color (color.new(#f23645 , 60) , "" , inline = "1", group = "Accumulation And Distribution")
show_lbl = input.bool (false , "Show swing point" , inline = "1", group = "High and Low" , tooltip = "Display swing point")
show_mtb = input.bool (false , "Show High/Low/Equilibrium" , inline = "2", group = "High and Low" , tooltip = "Display Strong/Weak High And Low and Equilibrium")
toplvl = input.color (color.red , "Premium Zone " , inline = "3", group = "High and Low")
midlvl = input.color (color.gray , "Equilibrium Zone" , inline = "4", group = "High and Low")
btmlvl = input.color (#089981 , "Discount Zone " , inline = "5", group = "High and Low")
fvg_enable = input.bool (false , " " , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap")
what_fvg = input.string ("FVG" , "" , inline = "1", group = "FAIR VALUE GAP" , tooltip = "Display fair value gap", options = )
fvg_num = input.int (5 , "Show Last " , inline = "1a", group = "FAIR VALUE GAP" , tooltip = "Number of fvg to show")
fvg_upcss = input.color (color.new(#089981, 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_dncss = input.color (color.new(color.red , 80) , "" , inline = "1", group = "FAIR VALUE GAP")
fvg_extend = input.int (10 , "Extend FVG" , inline = "2", group = "FAIR VALUE GAP" , tooltip = "Extend the display of the FVG.")
fvg_src = input.string ("Close" , "Mitigation " , inline = "3", group = "FAIR VALUE GAP" , tooltip = " Use the close of the body as trigger Use the extreme point of the body as trigger", options = )
fvg_tf = input.timeframe ("" , "Timeframe " , inline = "4", group = "FAIR VALUE GAP" , tooltip = "Timeframe of the fair value gap")
t = color.t (ob_bull_css)
invcol = color.new (color.white , 100)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - UDT }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
type bar
float o = open
float c = close
float h = high
float l = low
float v = volume
int n = bar_index
int t = time
type Zphl
line top
line bottom
label top_label
label bottom_label
bool stopcross
bool sbottomcross
bool itopcross
bool ibottomcross
string txtup
string txtdn
float topy
float bottomy
float topx
float bottomx
float tup
float tdn
int tupx
int tdnx
float itopy
float itopx
float ibottomy
float ibottomx
float uV
float dV
type FVG
box box
line ln
bool bull
float top
float btm
int left
int right
type ms
float p
int n
float l
type msDraw
int n
float p
color css
string txt
bool bull
type obC
float top
float btm
int left
float avg
float dV
float cV
int wM
int blVP
int brVP
int dir
float h
float l
int n
type obD
box ob
box eOB
box blB
box brB
line mL
type zone
chart.point points
float p
int c
int t
type hqlzone
box pbx
box ebx
box lbx
label plb
label elb
label lbl
type ehl
float pt
int t
float pb
int b
type pattern
string found = "None"
bool isfound = false
int period = 0
bool bull = false
type alerts
bool chochswing = false
bool chochplusswing = false
bool swingbos = false
bool chochplus = false
bool choch = false
bool bos = false
bool equal = false
bool ob = false
bool swingob = false
bool zone = false
bool fvg = false
bool obtouch = false
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - General Setup }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
bar b = bar.new()
var pattern p = pattern.new()
alerts blalert = alerts.new()
alerts bralert = alerts.new()
if p.isfound
p.period += 1
if p.period == 50
p.period := 0
p.found := "None"
p.isfound := false
p.bull := na
switch
b.c > b.o => boolean.set(green_candle, true)
b.c < b.o => boolean.set(red_candle , true)
f_zscore(src, lookback) =>
(src - ta.sma(src, lookback)) / ta.stdev(src, lookback)
var int iLen = internal_r_lookback
var int sLen = swing_r_lookback
vv = f_zscore(((close - close ) / close ) * 100,iLen)
if ms_mode == "Dynamic"
switch
vv >= 1.5 or vv <= -1.5 => iLen := 10
vv >= 1.6 or vv <= -1.6 => iLen := 9
vv >= 1.7 or vv <= -1.7 => iLen := 8
vv >= 1.8 or vv <= -1.8 => iLen := 7
vv >= 1.9 or vv <= -1.9 => iLen := 6
vv >= 2.0 or vv <= -2.0 => iLen := 5
=> iLen
var msline = array.new(0)
iH = ta.pivothigh(high, iLen, iLen)
sH = ta.pivothigh(high, sLen, sLen)
iL = ta.pivotlow (low , iLen, iLen)
sL = ta.pivotlow (low , sLen, sLen)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - ARRAYS }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
hl () =>
= request.security(syminfo.tickerid , 'D' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'W' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , 'M' , hl() , lookahead = barmerge.lookahead_on)
= request.security(syminfo.tickerid , '12M', hl() , lookahead = barmerge.lookahead_on)
lstyle(style) =>
out = switch style
'⎯⎯⎯' => line.style_solid
'----' => line.style_dashed
'····' => line.style_dotted
mtfphl(h, l ,tf ,css, pdhl_style) =>
var line hl = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var line ll = line.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, color = css
, style = lstyle(pdhl_style)
)
var label lbl = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}L', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
var label hlb = label.new(
na
, na
, xloc = xloc.bar_time
, text = str.format('P{0}H', tf)
, color = invcol
, textcolor = css
, size = size.small
, style = label.style_label_left
)
hy = ta.valuewhen(h != h , h , 1)
hx = ta.valuewhen(h == high , time , 1)
ly = ta.valuewhen(l != l , l , 1)
lx = ta.valuewhen(l == low , time , 1)
if barstate.islast
extension = time + (time - time ) * 50
line.set_xy1(hl , hx , hy)
line.set_xy2(hl , extension , hy)
label.set_xy(hlb, extension , hy)
line.set_xy1(ll , lx , ly)
line.set_xy2(ll , extension , ly)
label.set_xy(lbl, extension , ly)
if lvl_daily
mtfphl(pdh , pdl , 'D' , css_d, s_d)
if lvl_weekly
mtfphl(pwh , pwl , 'W' , css_w, s_w)
if lvl_monthly
mtfphl(pmh , pml, 'M' , css_m, s_m)
if lvl_yearly
mtfphl(pyh , pyl , '12M', css_y, s_y)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Market Structure }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method darkcss(color css, float factor, bool bull) =>
blue = color.b(css) * (1 - factor)
red = color.r(css) * (1 - factor)
green = color.g(css) * (1 - factor)
color.rgb(red, green, blue, 0)
method f_line(msDraw d, size, style) =>
var line id = na
var label lbl = na
id := line.new(
d.n
, d.p
, b.n
, d.p
, color = d.css
, width = 1
, style = style
)
if msline.size() >= 250
line.delete(msline.shift())
msline.push(id)
lbl := label.new(
int(math.avg(d.n, b.n))
, d.p
, d.txt
, color = invcol
, textcolor = d.css
, style = d.bull ? label.style_label_down : label.style_label_up
, size = size
, text_font_family = font.family_monospace
)
structure(bool mtf) =>
msDraw drw = na
bool isdrw = false
bool isdrwS = false
var color css = na
var color icss = na
var int itrend = 0
var int trend = 0
bool bull_ob = false
bool bear_ob = false
bool s_bull_ob = false
bool s_bear_ob = false
n = bar_index
var ms up = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms dn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sup = ms.new(
array.new()
, array.new< int >()
, array.new()
)
var ms sdn = ms.new(
array.new()
, array.new< int >()
, array.new()
)
switch show_swing_ms
"All" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, true )
"CHoCH" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, true ) , boolean.set(s_CHoCHP, false )
"CHoCH+" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, true )
"BOS" => boolean.set(s_BOS , true ), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
"None" => boolean.set(s_BOS , false), boolean.set(s_CHoCH, false) , boolean.set(s_CHoCHP, false )
=> na
switch show_internal_ms
"All" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, true )
"CHoCH" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, true ), boolean.set(i_CHoCHP, false)
"CHoCH+" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, true )
"BOS" => boolean.set(i_BOS, true ), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
"None" => boolean.set(i_BOS, false), boolean.set(i_CHoCH, false ), boolean.set(i_CHoCHP, false)
=> na
switch
iH =>
up.p.unshift(b.h )
up.l.unshift(b.h )
up.n.unshift(n )
iL =>
dn.p.unshift(b.l )
dn.l.unshift(b.l )
dn.n.unshift(n )
sL =>
sdn.p.unshift(b.l )
sdn.l.unshift(b.l )
sdn.n.unshift(n )
sH =>
sup.p.unshift(b.h )
sup.l.unshift(b.h )
sup.n.unshift(n )
// INTERNAL BULLISH STRUCTURE
if up.p.size() > 0 and dn.l.size() > 1
if ta.crossover(b.c, up.p.first())
bool CHoCH = na
string txt = na
if itrend < 0
CHoCH := true
switch
not CHoCH =>
txt := "BOS"
css := i_ms_up_BOS
blalert.bos := true
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS
, txt
, true
)
CHoCH =>
dn.l.first() > dn.l.get(1) ? blalert.chochplus : blalert.choch
txt := dn.l.first() > dn.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_up_BOS.darkcss(0.25, true)
if (dn.l.first() > dn.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
up.n.first()
, up.p.first()
, i_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => bull_ob := true
ob_filter == "BOS" and txt == "BOS" => bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bull_ob := true
itrend := 1
up.n.clear()
up.p.clear()
// INTERNAL BEARISH STRUCTURE
if dn.p.size() > 0 and up.l.size() > 1
if ta.crossunder(b.c, dn.p.first())
bool CHoCH = na
string txt = na
if itrend > 0
CHoCH := true
switch
not CHoCH =>
bralert.bos := true
txt := "BOS"
css := i_ms_dn_BOS
if boolean.get(i_BOS) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS
, txt
, false
)
CHoCH =>
if up.l.first() < up.l.get(1)
bralert.chochplus := true
else
bralert.choch := true
txt := up.l.first() < up.l.get(1) ? "CHoCH+" : "CHoCH"
css := i_ms_dn_BOS.darkcss(0.25, false)
if (up.l.first() < up.l.get(1) ? boolean.get(i_CHoCHP) : boolean.get(i_CHoCH)) and mtf == false and na(drw)
isdrw := true
drw := msDraw.new(
dn.n.first()
, dn.p.first()
, i_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => bear_ob := true
ob_filter == "BOS" and txt == "BOS" => bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => bear_ob := true
itrend := -1
dn.n.clear()
dn.p.clear()
// SWING BULLISH STRUCTURE
if sup.p.size() > 0 and sdn.l.size() > 1
if ta.crossover(b.c, sup.p.first())
bool CHoCH = na
string txt = na
if trend < 0
CHoCH := true
switch
not CHoCH =>
blalert.swingbos := true
txt := "BOS"
icss := s_ms_up_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS
, txt
, true
)
CHoCH =>
if sdn.l.first() > sdn.l.get(1)
blalert.chochplusswing := true
else
blalert.chochswing := true
txt := sdn.l.first() > sdn.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_up_BOS.darkcss(0.25, true)
if (sdn.l.first() > sdn.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sup.n.first()
, sup.p.first()
, s_ms_up_BOS.darkcss(0.25, true)
, txt
, true
)
if mtf == false
switch
ob_filter == "None" => s_bull_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bull_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bull_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bull_ob := true
trend := 1
sup.n.clear()
sup.p.clear()
// SWING BEARISH STRUCTURE
if sdn.p.size() > 0 and sup.l.size() > 1
if ta.crossunder(b.c, sdn.p.first())
bool CHoCH = na
string txt = na
if trend > 0
CHoCH := true
switch
not CHoCH =>
bralert.swingbos := true
txt := "BOS"
icss := s_ms_dn_BOS
if boolean.get(s_BOS) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS
, txt
, false
)
CHoCH =>
if sup.l.first() < sup.l.get(1)
bralert.chochplusswing := true
else
bralert.chochswing := true
txt := sup.l.first() < sup.l.get(1) ? "CHoCH+" : "CHoCH"
icss := s_ms_dn_BOS.darkcss(0.25, false)
if (sup.l.first() < sup.l.get(1) ? boolean.get(s_CHoCHP) : boolean.get(s_CHoCH)) and mtf == false and na(drw)
isdrwS := true
drw := msDraw.new(
sdn.n.first()
, sdn.p.first()
, s_ms_dn_BOS.darkcss(0.25, false)
, txt
, false
)
if mtf == false
switch
ob_filter == "None" => s_bear_ob := true
ob_filter == "BOS" and txt == "BOS" => s_bear_ob := true
ob_filter == "CHoCH" and txt == "CHoCH" => s_bear_ob := true
ob_filter == "CHoCH+" and txt == "CHoCH+" => s_bear_ob := true
trend := -1
sdn.n.clear()
sdn.p.clear()
= structure(false)
if isdrw
f_line(drw, size.small, line.style_dashed)
if isdrwS
f_line(drw, size.small, line.style_solid)
= request.security("", "15" , structure(true))
= request.security("", "60" , structure(true))
= request.security("", "240" , structure(true))
= request.security("", "1440" , structure(true))
if show_mtf_str
var tab = table.new(position = position.top_right, columns = 10, rows = 10, bgcolor = na, frame_color = color.rgb(54, 58, 69, 0), frame_width = 1, border_color = color.rgb(54, 58, 69, 100), border_width = 1)
table.cell(tab, 0, 1, text = "15" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 2, text = "1H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 3, text = "4H" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 0, 4, text = "1D" , text_color = color.silver, text_halign = text.align_center, text_size = size.normal, bgcolor = chart.bg_color, text_font_family = font.family_monospace, width = 2)
table.cell(tab, 1, 1, text = itrend15 == 1 ? "BULLISH" : itrend15 == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend15 == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend15 == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 2, text = itrend1H == 1 ? "BULLISH" : itrend1H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 3, text = itrend4H == 1 ? "BULLISH" : itrend4H == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend4H == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend4H == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 1, 4, text = itrend1D == 1 ? "BULLISH" : itrend1D == -1 ? "BEARISH" : na , text_halign = text.align_center, text_size = size.normal, text_color = itrend1D == 1 ? i_ms_up_BOS.darkcss(-0.25, true) : itrend1D == -1 ? i_ms_dn_BOS.darkcss(0.25, false) : color.gray, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 5, text = "Detected Pattern", text_halign = text.align_center, text_size = size.normal, text_color = color.silver, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.cell(tab, 0, 6, text = p.found, text_halign = text.align_center, text_size = size.normal, text_color = na(p.bull) ? color.white : p.bull ? i_ms_up_BOS.darkcss(-0.25, true) : p.bull == false ? i_ms_dn_BOS.darkcss(0.25, false) : na, bgcolor = chart.bg_color, text_font_family = font.family_monospace)
table.merge_cells(tab, 0, 5, 1, 5)
table.merge_cells(tab, 0, 6, 1, 6)
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Strong/Weak High/Low And Equilibrium }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
var phl = Zphl.new(
na
, na
, label.new(na , na , color = invcol , textcolor = i_ms_dn_BOS , style = label.style_label_down , size = size.tiny , text = "")
, label.new(na , na , color = invcol , textcolor = i_ms_up_BOS , style = label.style_label_up , size = size.tiny , text = "")
, true
, true
, true
, true
, ""
, ""
, 0
, 0
, 0
, 0
, high
, low
, 0
, 0
, 0
, 0
, 0
, 0
, na
, na
)
zhl(len)=>
upper = ta.highest(len)
lower = ta.lowest(len)
var float out = 0
out := b.h > upper ? 0 : b.l < lower ? 1 : out
top = out == 0 and out != 0 ? b.h : 0
btm = out == 1 and out != 1 ? b.l : 0
= zhl(sLen)
= zhl(iLen)
upphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
if top
phl.stopcross := true
phl.txtup := top > phl.topy ? "HH" : "HL"
if show_lbl
topl = label.new(
b.n - swing_r_lookback
, top
, phl.txtup
, color = invcol
, textcolor = toplvl
, style = label.style_label_down
, size = size.small
)
line.delete(phl.top )
phl.top := line.new(
b.n - sLen
, top
, b.n
, top
, color = toplvl)
phl.topy := top
phl.topx := b.n - sLen
phl.tup := top
phl.tupx := b.n - sLen
if itop
phl.itopcross := true
phl.itopy := itop
phl.itopx := b.n - iLen
phl.tup := math.max(high, phl.tup)
phl.tupx := phl.tup == high ? b.n : phl.tupx
phl.uV := phl.tup != phl.tup ? b.v : phl.uV
if barstate.islast
line.set_xy1(
phl.top
, phl.tupx
, phl.tup
)
line.set_xy2(
phl.top
, b.n + 50
, phl.tup
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tup
)
dist = math.abs(phl.uV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend < 0
? "Strong High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak High | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
dnphl(trend) =>
var label lbl = label.new(
na
, na
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
if btm
phl.sbottomcross := true
phl.txtdn := btm > phl.bottomy ? "LH" : "LL"
if show_lbl
btml = label.new(
b.n - swing_r_lookback
, btm, phl.txtdn
, color = invcol
, textcolor = btmlvl
, style = label.style_label_up
, size = size.small
)
line.delete(phl.bottom )
phl.bottom := line.new(
b.n - sLen
, btm
, b.n
, btm
, color = btmlvl
)
phl.bottomy := btm
phl.bottomx := b.n - sLen
phl.tdn := btm
phl.tdnx := b.n - sLen
if ibtm
phl.ibottomcross := true
phl.ibottomy := ibtm
phl.ibottomx := b.n - iLen
phl.tdn := math.min(low, phl.tdn)
phl.tdnx := phl.tdn == low ? b.n : phl.tdnx
phl.dV := phl.tdn != phl.tdn ? b.v : phl.dV
if barstate.islast
line.set_xy1(
phl.bottom
, phl.tdnx
, phl.tdn
)
line.set_xy2(
phl.bottom
, b.n + 50
, phl.tdn
)
label.set_x(
lbl
, b.n + 50
)
label.set_y(
lbl
, phl.tdn
)
dist = math.abs(phl.dV / (phl.uV + phl.dV)) * 100
label.set_text (lbl, trend > 0
? "Strong Low | " + str.tostring(phl.dV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)"
: "Weak Low | " + str.tostring(phl.uV, format.volume) + " (" + str.tostring(math.round(dist,0)) + "%)")
midphl() =>
avg = math.avg(phl.bottom.get_y2(), phl.top.get_y2())
var line l = line.new(
y1 = avg
, y2 = avg
, x1 = b.n - sLen
, x2 = b.n + 50
, color = midlvl
, style = line.style_solid
)
var label lbl = label.new(
x = b.n + 50
, y = avg
, text = "Equilibrium"
, style = label.style_label_left
, color = invcol
, textcolor = midlvl
, size = size.small
)
if barstate.islast
more = (phl.bottom.get_x1() + phl.bottom.get_x2()) > (phl.top.get_x1() + phl.top.get_x2()) ? phl.top.get_x1() : phl.bottom.get_x1()
line.set_xy1(l , more , avg)
line.set_xy2(l , b.n + 50, avg)
label.set_x (lbl , b.n + 50 )
label.set_y (lbl , avg )
dist = math.abs((l.get_y2() - close) / close) * 100
label.set_text (lbl, "Equilibrium (" + str.tostring(math.round(dist,0)) + "%)")
hqlzone() =>
if barstate.islast
var hqlzone dZone = hqlzone.new(
box.new(
na
, na
, na
, na
, bgcolor = color.new(toplvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(midlvl, 70)
, border_color = na
)
, box.new(
na
, na
, na
, na
, bgcolor = color.new(btmlvl, 70)
, border_color = na
)
, label.new(na, na, text = "Premium" , color = invcol, textcolor = toplvl, style = label.style_label_down, size = size.small)
, label.new(na, na, text = "Equilibrium", color = invcol, textcolor = midlvl, style = label.style_label_left, size = size.small)
, label.new(na, na, text = "Discount" , color = invcol, textcolor = btmlvl, style = label.style_label_up , size = size.small)
)
dZone.pbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)) , phl.tup)
dZone.pbx.set_rightbottom(b.n + 50 , 0.95 * phl.tup + 0.05 * phl.tdn)
dZone.ebx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.525 * phl.tup + 0.475 * phl.tdn)
dZone.ebx.set_rightbottom(b.n + 50 , 0.525 * phl.tdn + 0.475 * phl.tup)
dZone.lbx.set_lefttop(int(math.max(phl.topx, phl.bottomx)), 0.95 * phl.tdn + 0.05 * phl.tup)
dZone.lbx.set_rightbottom(b.n + 50 , phl.tdn)
dZone.plb.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tup)
dZone.elb.set_xy( int(b.n + 50) , math.avg(phl.tup, phl.tdn))
dZone.lbl.set_xy( int(math.avg(math.max(phl.topx, phl.bottomx), int(b.n + 50))) , phl.tdn)
if show_mtb
upphl (trend)
dnphl (trend)
hqlzone()
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - Volumetric Order Block }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
method eB(box b, bool ext, color css, bool swing) =>
b.unshift(
box.new(
na
, na
, na
, na
, xloc = xloc.bar_time
, text_font_family = font.family_monospace
, extend = ext ? extend.right : extend.none
, border_color = swing ? color.new(css, 0) : color.new(color.white,100)
, bgcolor = css
, border_width = 1
)
)
method eL(line l, bool ext, bool solid, color css) =>
l.unshift(
line.new(
na
, na
, na
, na
, width = 1
, color = css
, xloc = xloc.bar_time
, extend = ext ? extend.right : extend.none
, style = solid ? line.style_solid : line.style_dashed
)
)
method drawVOB(bool cdn, bool bull, color css, int loc, bool swing) =>
= request.security(
syminfo.tickerid
, ""
,
, lookahead = barmerge.lookahead_off
)
var obC obj = obC.new(
array.new()
, array.new()
, array.new< int >()
, array.new()
, array.new()
, array.new()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new< int >()
, array.new()
, array.new()
, array.new< int >()
)
var obD draw = obD.new(
array.new()
, array.new()
, array.new()
, array.new()
, array.new()
)
if barstate.isfirst
for i = 0 to ob_num - 1
draw.mL .eL(false, false, use_grayscale ? color.new(color.gray, 0) : color.new(css,0))
draw.ob .eB(false, use_grayscale ? color.new(color.gray, 90) : css, swing)
draw.blB.eB(false, css_metric_up , swing)
draw.brB.eB(false, css_metric_dn , swing)
draw.eOB.eB(true , use_grayscale ? color.new(color.gray, 90) : css, swing)
float pos = ob_pos == "Full"
? (bull ? high : low)
: ob_pos == "Middle"
? ohlc4
: ob_pos == "Accurate"
? hl2
: hl2
if cdn
obj.h.clear()
obj.l.clear()
obj.n.clear()
for i = 0 to math.abs((loc - b.n)) - 1
obj.h.push(hH )
obj.l.push(lL )
obj.n.push(b.t )
// obj.h.reverse()
// obj.l.reverse()
int iU = obj.l.indexof(obj.l.min()) + 1
int iD = obj.h.indexof(obj.h.max()) + 1
obj.dir.unshift(
bull
? (b.c > b.o ? 1 : -1)
: (b.c > b.o ? 1 : -1)
)
obj.top.unshift(
bull
? pos
: obj.h.max()
)
obj.btm.unshift(
bull
? obj.l.min()
: pos
)
obj.left.unshift(
bull
? obj.n.get(obj.l.indexof(obj.l.min()))
: obj.n.get(obj.h.indexof(obj.h.max()))
)
obj.avg.unshift(
math.avg(obj.top.first(), obj.btm.first())
)
obj.cV.unshift(
bull
? b.v
: b.v
)
if ob_pos == "Precise"
switch bull
true =>
if obj.avg.get(0) < (b.c < b.o ? b.c : b.o ) and obj.top.get(0) > hlcc4
obj.top.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
false =>
if obj.avg.get(0) > (b.c < b.o ? b.o : b.c ) and obj.btm.get(0) < hlcc4
obj.btm.set(0, obj.avg.get(0))
obj.avg.set(0, math.avg(obj.top.first(), obj.btm.first()))
obj.blVP.unshift ( 0 )
obj.brVP.unshift ( 0 )
obj.wM .unshift ( 1 )
if use_overlap
int rmP = use_overlap_method == "Recent" ? 1 : 0
if obj.avg.size() > 1
if bull
? obj.btm.first() < obj.top.get(1)
: obj.top.first() > obj.btm.get(1)
obj.wM .remove(rmP)
obj.cV .remove(rmP)
obj.dir .remove(rmP)
obj.top .remove(rmP)
obj.avg .remove(rmP)
obj.btm .remove(rmP)
obj.left .remove(rmP)
obj.blVP .remove(rmP)
obj.brVP .remove(rmP)
if barstate.isconfirmed
for x = 0 to ob_num - 1
tg = switch ob_mitigation
"Middle" => obj.avg
"Absolute" => bull ? obj.btm : obj.top
for in tg
if (bull ? cC < pt : cC > pt)
obj.wM .remove(idx)
obj.cV .remove(idx)
obj.dir .remove(idx)
obj.top .remove(idx)
obj.avg .remove(idx)
obj.btm .remove(idx)
obj.left .remove(idx)
obj.blVP .remove(idx)
obj.brVP .remove(idx)
if barstate.islast
if obj.avg.size() > 0
// Alert
if bull
? ta.crossunder(low , obj.top.get(0))
: ta.crossover (high, obj.btm.get(0))
switch bull
true => blalert.obtouch := true
false => bralert.obtouch := true
float tV = 0
obj.dV.clear()
seq = math.min(ob_num - 1, obj.avg.size() - 1)
for j = 0 to seq
tV += obj.cV.get(j)
if j == seq
for y = 0 to seq
obj.dV.unshift(
math.floor(
(obj.cV.get(y) / tV) * 100)
)
obj.dV.reverse()
for i = 0 to math.min(ob_num - 1, obj.avg.size() - 1)
dmL = draw.mL .get(i)
dOB = draw.ob .get(i)
dblB = draw.blB.get(i)
dbrB = draw.brB.get(i)
deOB = draw.eOB.get(i)
dOB.set_lefttop (obj.left .get(i) , obj.top.get(i))
deOB.set_lefttop (b.t , obj.top.get(i))
dOB.set_rightbottom (b.t , obj.btm.get(i))
deOB.set_rightbottom(b.t + (b.t - b.t ) * 100 , obj.btm.get(i))
if use_middle_line
dmL.set_xy1(obj.left.get(i), obj.avg.get(i))
dmL.set_xy2(b.t , obj.avg.get(i))
if ob_metrics_show
dblB.set_lefttop (obj.left.get(i), obj.top.get(i))
dbrB.set_lefttop (obj.left.get(i), obj.avg.get(i))
dblB.set_rightbottom(obj.left.get(i), obj.avg.get(i))
dbrB.set_rightbottom(obj.left.get(i), obj.btm.get(i))
rpBL = dblB.get_right()
rpBR = dbrB.get_right()
dbrB.set_right(rpBR + (b.t - b.t ) * obj.brVP.get(i))
dblB.set_right(rpBL + (b.t - b.t ) * obj.blVP.get(i))
if use_show_metric
txt = switch
obj.cV.get(i) >= 1000000000 => str.tostring(math.round(obj.cV.get(i) / 1000000000,3)) + "B"
obj.cV.get(i) >= 1000000 => str.tostring(math.round(obj.cV.get(i) / 1000000,3)) + "M"
obj.cV.get(i) >= 1000 => str.tostring(math.round(obj.cV.get(i) / 1000,3)) + "K"
obj.cV.get(i) < 1000 => str.tostring(math.round(obj.cV.get(i)))
deOB.set_text(
str.tostring(
txt + " (" + str.tostring(obj.dV.get(i)) + "%)")
)
deOB.set_text_size (size.auto)
deOB.set_text_halign(text.align_left)
deOB.set_text_color (use_grayscale ? color.silver : color.new(css, 0))
if ob_metrics_show and barstate.isconfirmed
if obj.wM.size() > 0
for i = 0 to obj.avg.size() - 1
switch obj.dir.get(i)
1 =>
switch obj.wM.get(i)
1 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 1)
-1 =>
switch obj.wM.get(i)
1 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 2)
2 => obj.brVP.set(i, obj.brVP.get(i) + 1), obj.wM.set(i, 3)
3 => obj.blVP.set(i, obj.blVP.get(i) + 1), obj.wM.set(i, 1)
var hN = array.new(1, b.n)
var lN = array.new(1, b.n)
var hS = array.new(1, b.n)
var lS = array.new(1, b.n)
if iH
hN.pop()
hN.unshift(int(b.n ))
if iL
lN.pop()
lN.unshift(int(b.n ))
if sH
hS.pop()
hS.unshift(int(b.n ))
if sL
lS.pop()
lS.unshift(int(b.n ))
if ob_show
bull_ob.drawVOB(true , ob_bull_css, hN.first(), false)
bear_ob.drawVOB(false, ob_bear_css, lN.first(), false)
if ob_swings
s_bull_ob.drawVOB(true , css_swing_up, hS.first(), true)
s_bear_ob.drawVOB(false, css_swing_dn, lS.first(), true)
if bull_ob
blalert.ob := true
if bear_ob
bralert.ob := true
if s_bull_ob
blalert.swingob := true
if s_bear_ob
blalert.swingob := true
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - End }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{ - FVG | VI | OG }
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
//{----------------------------------------------------------------------------------------------------------------------------------------------}
ghl() => request.security(syminfo.tickerid, fvg_tf, [high , low , close , open ])
tfG() => request.security(syminfo.tickerid, fvg_tf, )
cG(bool bull) =>
= ghl()
= tfG()
var FVG draw = FVG.new(
array.new()
, array.new()
)
var FVG cords = array.new()
float pup = na
float pdn = na
bool cdn = na
int pos = 2
cc = timeframe.change(fvg_tf)
if barstate.isfirst
for i = 0 to fvg_num - 1
draw.box.unshift(box.new (na, na, na, na, border_color = color.new(color.white, 100), xloc = xloc.bar_time))
draw.ln.unshift (line.new(na, na, na, na, xloc = xloc.bar_time, width = 1, style = line.style_solid))
switch what_fvg
"FVG" =>
pup := bull ? gl : l
pdn := bull ? h : gh
cdn := bull ? gl > h and cc : gh < l and cc
pos := 2
"VI" =>
pup := bull
? (gc > go
? go
: gc)
: (gc > go
? go
: gc )
pdn := bull
? (gc > go
? gc
: go )
: (gc > go
? gc
: go)
cdn := bull
? go > gc and gh > gl and gc > gc and go > go and gh < math.min(gc, go) and cc
: go < gc and gl < gh and gc < gc and go < go and gl > math.max(gc, go) and cc
pos := 1
"OG" =>
pup := bull ? b.l : gl
p
Probability Density Function (rus)KZ Indicator (Probability Density Function)
KZ estimates price move probabilities using a normal distribution model. It automatically detects trend direction, volatility level, and strength, then visualizes the likelihood of reaching an upside or downside target.
✅ Auto-adjusts for different timeframes
✅ Plots green (long) and red (short) probability zones
✅ Shows suggested target, stop-loss, and limit order
✅ Ideal for identifying high-probability entry zones
Advanced Version Available
An advanced version of the KZ script is available with:
🎯 Precise entry/exit signals
🕵️ Liquidity zone detection
🔄 Multi-timeframe signal confirmation
🛑 Dynamic stop-loss based on volatility
🔔 Built-in alerts for signal triggers
📩 DM me to get access to the advanced script version.
✅ Автоматически адаптируется под таймфрейм
✅ Показывает зелёную (лонг) и красную (шорт) области вероятности
✅ Отображает рекомендуемые цель, стоп-лосс и лимитный ордер
✅ Отлично подходит для поиска точек входа с высокой вероятностью
Доступна продвинутая версия скрипта KZ, включающая:
🎯 Точные сигналы входа/выхода
🕵️ Обнаружение зон ликвидности
🔄 Подтверждение сигналов с других таймфреймов
🛑 Динамический стоп-лосс на основе волатильности
🔔 Алерты на сигналы
Heavy Buy/Sell + Traps + FVG (Options) – Cleanthis script under testing stage so it is not accurate so please make buy & sell decision wisely
Expected Value Monte CarloI created this indicator after noticing that there was no Expected Value indicator here on TradingView.
The EVMC provides statistical Expected Value to what might happen in the future regarding the asset you are analyzing.
It uses 2 quantitative methods:
Historical Backtest to ground your analysis in long-term, factual data.
Monte Carlo Simulation to project a cone of probable future outcomes based on recent market behavior.
This gives you a data-driven edge to quantify risk, and make more informed trading decisions.
The indicator includes:
Dual analysis: Combines historical probability with forward-looking simulation.
Quantified projections: Provides the Expected Value ($ and %), Win Rate, and Sharpe Ratio for both methods.
Asset-aware: Automatically adjusts its calculations for Stocks (252 trading days) and Crypto (365 days) for mathematical accuracy.
The projection cone shows the mean expected path and the +/- 1 standard deviation range of outcomes.
No repainting
Calculation:
1. Historical Expected Value:
This is a systematic backtest over thousands of bars. It calculates the return Rᵢ for N past trades (buy-and-hold). The Historical EV is the simple average of these returns, giving a baseline performance measure.
Historical EV % = (Σ Rᵢ) / N
2. Monte Carlo Projection:
This projection uses the Geometric Brownian Motion (GBM) model to simulate thousands of future price paths based on the market's recent behavior.
It first measures the drift (μ), or recent trend, and volatility (σ), or recent risk, from the Projection Lookback period. It then projects a final return for each simulation using the core GBM formula:
Projected Return = exp( (μ - σ²/2)T + σ√T * Z ) - 1
(Where T is the time horizon and Z is a random variable for the simulation.)
The purple line on the chart is the average of all simulated outcomes (the Monte Carlo EV). The cone represents one standard deviation of those outcomes.
The dashed lines represent one standard deviation (+/- 1σ) from the average, forming a cone of probable outcomes. Roughly 68% of the simulated paths ended within this cone.
This projection answers the question: "If the recent trend and volatility continue, where is the price most likely to go?"
Here's how to read the indicator
Expected Value ($/%): Is my average trade profitable?
Win Rate: How often can I expect to be right?
Sharpe Ratio: Am I being adequately compensated for the risk I'm taking?
User Guide
Max trade duration (bars): This is your analysis timeframe. Are you interested in the probable outcome over the next month (21 bars), quarter (63 bars), or year (252 bars)?
Position size ($): Set this to your typical trade size to see the Expected Value in real dollar terms.
Projection lookback (bars): This is the most important input for the Monte Carlo model. A short lookback (e.g., 50) makes the projection highly sensitive to recent momentum. Use this to identify potential recency bias. A long lookback (e.g., 252) provides a more stable, long-term projection of trend and volatility.
Historical Lookback (bars): For the historical backtest, more data is always better. Use the maximum that your TradingView plan allows for the most statistically significant results.
Use TP/SL for Historical EV: Check this box to see how the historical performance would have changed if you had used a simple Take Profit and Stop Loss, rather than just holding for the full duration.
I hope you find this indicator useful and please let me know if you have any suggestions. 😊
High/Low Targets - Abu Aydسكربت
//@version=5
indicator("High/Low Targets - Abu Ayd", overlay = true, max_lines_count = 200, ع")
widthLow = input.int(2, "سماكة خط القاع", minval=1, maxval=5)
colorHigh = input.color(color.purple, "لون خط القمة")
widthHigh = input.int(2, "سماكة خط القمة", minval=1, maxval=5)
colorUp = input.color(color.green, "لون أهداف الصعود")
widthUp = input.int(1, "سماكة أهداف الصعود", minval=1, maxval=5)
colorDown = input.color(color.red, "لون أهداف الهبوط")
widthDown = input.int(1, "سماكة أهداف الهبوط", minval=1, maxval=5)
//========= مكان كتابة الأهداف =========//
labelPosition = input.string("يمين", "مكان كتابة الأهداف", options= )
offsetBars = input.int(5, "المسافة أفقياً للكتابة", minval=1, maxval=50)
//========= عدد الأهداف =========//
targetsUpNum = input.int(5, "عدد أهداف الصعود", minval=1, maxval=20)
targetsDownNum = input.int(5, "عدد أهداف الهبوط", minval=1, maxval=20)
//========= حساب القاع والقمة =========//
srcLow = request.security(syminfo.tickerid, tf == "" ? timeframe.period : tf, ta.lowest(low, lookback))
srcHigh = request.security(syminfo.tickerid, tf == "" ? timeframe.period : tf, ta.highest(high, lookback))
// قاع أمس
yLow = request.security(syminfo.tickerid, "D", low )
yHigh = request.security(syminfo.tickerid, "D", high )
yOpen = request.security(syminfo.tickerid, "D", open )
yClose = request.security(syminfo.tickerid, "D", close )
yBodyLow = math.min(yOpen, yClose)
yLowerWick = yBodyLow - yLow
yRange = yHigh - yLow
isValidYesterdayLow = yLowerWick > yRange * wickRatio
// اختيار القاع
lowPoint =
mode == "Manual" ? manualLow :
(mode == "Auto" and useYesterdayLow and isValidYesterdayLow) ? yLow :
srcLow
// اختيار القمة
highPoint = mode == "Auto" ? srcHigh : manualHigh
//========= دالة لحساب مكان الليبل =========//
f_getXoffset(_pos) =>
_pos == "يمين" ? bar_index + offsetBars : _pos == "يسار" ? bar_index - offsetBars : bar_index
//========= أهداف القاع =========//
if mode == "Manual" or (mode == "Auto" and showLowAuto and not na(lowPoint))
// أهداف فوق القاع
for i = 1 to targetsUpNum
levelUp = lowPoint + stepUp * i
line.new(bar_index, levelUp, bar_index+1, levelUp, color=colorUp, width=widthUp, extend=extend.right)
if barstate.islast
label.new(f_getXoffset(labelPosition), levelUp, "🎯 " + str.tostring(levelUp),
textcolor=color.white, color=colorUp, style=label.style_label_left,
xloc=xloc.bar_index, yloc=yloc.price)
// أهداف تحت القاع إذا اخترنا "فوق وتحت"
if lowTargetsMode == "فوق وتحت"
for i = 1 to targetsDownNum
levelDownFromLow = lowPoint - stepDown * i
line.new(bar_index, levelDownFromLow, bar_index+1, levelDownFromLow, color=colorDown, width=widthDown, extend=extend.right)
if barstate.islast
label.new(f_getXoffset(labelPosition), levelDownFromLow, "🎯 " + str.tostring(levelDownFromLow),
textcolor=color.white, color=colorDown, style=label.style_label_left,
xloc=xloc.bar_index, yloc=yloc.price)
//========= أهداف القمة =========//
if mode == "Manual" or (mode == "Auto" and showHighAuto)