Adaptive Strength Overlay (MTF) [BackQuant]Adaptive Strength Overlay (MTF)
A multi-timeframe RSI strength visualizer that projects oscillator “pressure” directly onto price using adaptive gradient fills between percent bands. Built to make strength, exhaustion, and regime context readable at a glance, without needing to stare at a separate oscillator panel.
Mean-Reversion mode example
What this indicator does
This indicator converts RSI strength into a chart overlay that reacts to momentum and extremes, then visualizes it as colored “pressure zones” around price.
Instead of plotting RSI in a sub-window, it:
Builds 1 to 3 symmetric percent bands above and below price.
Computes RSI strength on up to 3 different timeframes (MTF).
Smooths RSI with your selected moving average type.
Maps RSI values into discrete transparency “buckets”.
Fills between the bands with a gradient whose opacity reflects strength or exhaustion.
Displays a compact RSI table for all enabled timeframes.
Provides alert conditions for extremes and midline shifts on each timeframe.
The result is an overlay that looks like a dynamic envelope. When strength rises, the envelope “lights up” in the direction of the move. When strength becomes stretched, the outer zones become visually prominent.
Core idea: “Strength as an overlay”
RSI is normally interpreted in a separate oscillator panel. That makes context-switching slow:
You check price action.
You look down at RSI.
You mentally translate RSI into risk or trend bias.
This script removes that translation step by projecting strength directly onto the price area, using band fills as a visual language:
More visible fill = stronger strength or more extreme condition (depending on mode).
Less visible fill = weak strength or neutral state.
Two operating modes
1) Trend mode
Trend mode emphasizes strength aligned with direction:
When RSI is strong on the upside, upper bands become more visible.
When RSI is strong on the downside, lower bands become more visible.
Neutral RSI fades, so the chart de-clutters during chop.
Use Trend mode when:
You want a clean trend-following overlay.
You want to quickly see which timeframe(s) are powering the move.
You want to filter entries to moments when strength confirms direction.
2) Mean-Reversion mode
Mean-Reversion mode flips the emphasis to highlight exhaustion against the move :
Upper extremes become a “potential exhaustion” cue.
Lower extremes become a “potential exhaustion” cue.
The overlay is tuned to make stretched conditions obvious.
This is not an automatic “short overbought / long oversold” system. It is a visualization mode that makes “extended” conditions stand out faster, especially when multiple timeframes align.
How the bands work (Percent Bands)
The indicator constructs up to three symmetric envelopes around price:
Band 1: percent1 scaled by scale
Band 2: percent2 scaled by scale (optional)
Band 3: percent3 scaled by scale (optional)
The percent bands are simple deviations from the selected price source:
Upper = price * (1 + (percent * scaling)/100)
Lower = price * (1 - (percent * scaling)/100)
Why this matters:
It anchors “strength visualization” to meaningful price distance.
It makes the overlay comparable across assets because it’s percent-based.
It gives you a consistent spatial frame for reading momentum versus extension.
Multi-timeframe engine (MTF)
The script runs the same strength calculation on up to three timeframes:
Timeframe 1 uses the chart timeframe by default (empty string input).
Timeframe 2 is optional and defaults to Daily.
Timeframe 3 is optional and defaults to Weekly.
Each timeframe has:
Its own RSI period (len, len2, len3).
Its own smoothing length (slen, slen2, slen3).
The same smoothing type selection (EMA, HMA, etc).
This creates a layered view:
TF1 often reflects tactical pressure (entries/exits).
TF2 reflects structural pressure (swing context).
TF3 reflects macro bias (regime context).
When multiple timeframes agree, the fills stack and the overlay becomes visually louder. When they disagree, the overlay looks mixed or muted, which is exactly the point.
Smoothing options (why so many)
Raw RSI can be noisy. This script lets you smooth RSI with multiple MA types, which changes how “responsive” the overlay feels:
EMA/RMA smooth without lagging as hard as SMA.
HMA responds faster but can be twitchy.
LINREG can feel more “structural”.
ALMA and T3/TEMA provide heavier smoothing profiles with different lag characteristics.
This isn’t cosmetic. Your smoothing choice affects:
How early the overlay “lights up” in Trend mode.
How long extremes remain highlighted in Mean-Reversion mode.
How often fills flicker in chop.
Strength mapping (the transparency buckets)
Instead of mapping RSI to a continuous color scale, the script uses a discrete transparency ladder. That creates a clean, readable visual that avoids constant flickering.
The logic assigns two transparency values per timeframe:
Upper-side transparency responds to lower RSI zones (weak upside strength).
Lower-side transparency responds to higher RSI zones (strong upside strength).
Then the script uses those transparencies differently depending on mode:
Trend mode shows “strength aligned with direction”.
Mean-Reversion mode swaps the emphasis so “extremes” stand out as potential stretch.
You can think of it as:
Trend mode highlights continuation strength.
Mean-Reversion mode highlights potential exhaustion.
Fill stacking (how the overlay is built)
The overlay uses layered fills:
Fill from price to Band 1
Fill from Band 1 to Band 2 (if enabled)
Fill from Band 2 to Band 3 (if enabled)
Upper side uses the negative color (typically red) and lower side uses the positive color (typically green), because upper bands represent “above price” space and lower bands represent “below price” space. The intensity is controlled by the computed transparency per timeframe and selected mode.
Important behavior:
Disabling Band 2 or Band 3 can change how the stacked fills look, because you are removing fill segments.
If you want a clean look, run only Band 1.
If you want a “regime heat” look, run Bands 1–3 with higher scaling.
Table (MTF RSI dashboard)
A compact table prints RSI values for each configured timeframe:
Row labels show TF.
Values show the smoothed RSI output that drives the overlay.
Use it for quick confirmation:
If overlay looks strong but table RSI is neutral, your band settings might be too tight.
If TF3 RSI is extreme while TF1 is neutral, you are likely in a macro stretched regime with local consolidation.
Alerts (built-in)
Alerts are provided for each timeframe separately, covering:
Entering upper extreme (cross above 70)
Exiting upper extreme (cross below 70)
Entering lower extreme (cross below 30)
Exiting lower extreme (cross above 30)
Bullish midline cross (cross above 50)
Bearish midline cross (cross below 50)
This enables workflows like:
Notify when TF2 enters extreme, then wait for TF1 mean-reversion confirmation.
Notify when TF3 crosses midline, then only take TF1 trend setups in that direction.
How to use it (practical reads)
Trend mode reads
Strong continuation: TF1 and TF2 fills become clearly visible on the same side.
Healthy pullback: TF1 fades but TF2 stays visible, suggesting underlying structure remains strong.
Chop warning: fills alternate or remain mostly invisible, indicating neutral strength.
Mean-Reversion mode reads
Exhaustion zones: outer fills become prominent near the extremes, signaling stretched conditions.
Compression after extreme: fill fades while price stabilizes, suggesting “cooling off” rather than immediate reversal.
Multi-TF stretch: TF2 and TF3 extremes together often mark higher significance zones.
Recommended setup presets
Preset A: Clean trend overlay
Mode: Trend
Bands: only Band 1
Scale: 1–2
Smoothing: EMA, moderate slen (6–10)
TF2: Daily on intraday charts
Preset B: Regime and exhaustion mapper
Mode: Mean-Reversion
Bands: Bands 1–3
Scale: 2–4
Smoothing: T3 or RMA, slightly higher slen
TF2: Daily, TF3: Weekly
Limitations
This is a strength visualization tool, not a full entry/exit system.
Percent bands are not volatility-adjusted, they are distance frames. In very high vol conditions, you may need higher band percentages or higher scaling.
MTF values update on their own timeframe closes, so higher timeframes will step rather than update every bar.
Multitimeframe
Chart Wolf ToolkitVWAP • PDH/PDL • NY Kill Zone
This indicator is built for traders who trade less, not more.
The Chart Wolf WLR Toolkit standardizes your chart so every decision is made from location, structure, and timing — not indicators, signals, or predictions.
It is designed to support the Wolf Liquidity Reversal (WLR) and Wolf Value Reversion (WVR) trade models.
HTF Balanced Price RangeThis script is based off of TradeForOpp's BPR indicator, but I adapted it to work on higher timeframes
Stoch Heat Lines Yeah, the heatmap can be confusing at first, but stochastics are way more complex than people think. Its not just “oversold” to “oversold” most of the time. Sometimes u get a double bottom, sometimes it doesnt even reach oversold. They’re not signals, they’re waves that start on lower timeframes, roll into higher ones, and eventually feed back down again.
For example, we draw a trendline on the 3H RSI and say “trend broken.” That’s technically true, but it doesn’t tell you which trend you broke. Sometimes you only break a small internal wave and RSI curves back up from ~46. Other times you break a larger structure and RSI keeps pushing toward 20.
That difference isn’t visible on a single RSI line.
By watching the top third of the heatmap, you can see which higher-timeframe waves are losing structure. If it shifts from red to orange to yellow, you likely broke a small wave. If it turns green or blue, the move is actually bearish and driven by higher-timeframe pressure.
Velocity Divergence Radar [JOAT]
Velocity Divergence Radar - Momentum Physics Edition
Overview
Velocity Divergence Radar is an open-source oscillator indicator that applies physics concepts to market analysis. It calculates price velocity (rate of change), acceleration (rate of velocity change), and jerk (rate of acceleration change) to provide a multi-dimensional view of momentum. The indicator also includes divergence detection and force vector analysis.
What This Indicator Does
The indicator calculates and displays:
Velocity - Rate of price change over a configurable period, smoothed with EMA
Acceleration - Rate of velocity change, showing momentum shifts
Jerk (3rd Derivative) - Rate of acceleration change, indicating momentum stability
Force Vectors - Volume-weighted acceleration representing market force
Kinetic Energy - Calculated as 0.5 * mass (volume ratio) * velocity squared
Momentum Conservation - Tracks momentum relative to historical average
Divergence Detection - Identifies when price and velocity diverge at pivots
How It Works
Velocity is calculated as smoothed rate of change:
calculateVelocity(series float price, simple int period) =>
float roc = ta.roc(price, period)
float velocity = ta.ema(roc, period / 2)
velocity
Acceleration is the change in velocity:
calculateAcceleration(series float velocity, simple int period) =>
float accel = ta.change(velocity, period)
float smoothAccel = ta.ema(accel, period / 2)
smoothAccel
Jerk is the change in acceleration:
calculateJerk(series float acceleration, simple int period) =>
float jerk = ta.change(acceleration, period)
float smoothJerk = ta.ema(jerk, period / 2)
smoothJerk
Force is calculated using F = m * a (mass approximated by volume ratio):
calculateForceVector(series float mass, series float acceleration) =>
float force = mass * acceleration
float forceDirection = math.sign(force)
float forceMagnitude = math.abs(force)
Signal Generation
Signals are generated based on velocity behavior:
Bullish Divergence: Price makes lower low while velocity makes higher low
Bearish Divergence: Price makes higher high while velocity makes lower high
Velocity Cross: Velocity crosses above/below zero line
Extreme Velocity: Velocity exceeds 1.5x the upper/lower zone threshold
Jerk Extreme: Jerk exceeds 2x standard deviation
Force Extreme: Force magnitude exceeds 2x average
Dashboard Panel (Top-Right)
Velocity - Current velocity value
Acceleration - Current acceleration value
Momentum Strength - Combined velocity and acceleration strength
Radar Score - Composite score based on velocity and acceleration
Direction - STRONG UP/SLOWING UP/STRONG DOWN/SLOWING DOWN/FLAT
Jerk - Current jerk value
Force Vector - Current force magnitude
Kinetic Energy - Current kinetic energy value
Physics Score - Overall physics-based momentum score
Signal - Current actionable status
Visual Elements
Velocity Line - Main oscillator line with color based on direction
Velocity EMA - Smoothed velocity for trend reference
Acceleration Histogram - Bar chart showing acceleration direction
Jerk Area - Filled area showing jerk magnitude
Vector Magnitude - Line showing combined vector strength
Radar Scan - Oscillating pattern for visual effect
Zone Lines - Upper and lower threshold lines
Divergence Labels - BULL DIV / BEAR DIV markers
Extreme Markers - Triangles at velocity extremes
Input Parameters
Velocity Period (default: 14) - Period for velocity calculation
Acceleration Period (default: 7) - Period for acceleration calculation
Divergence Lookback (default: 10) - Bars to scan for divergence
Radar Sensitivity (default: 1.0) - Zone threshold multiplier
Jerk Analysis (default: true) - Enable 3rd derivative calculation
Force Vectors (default: true) - Enable force analysis
Kinetic Energy (default: true) - Enable energy calculation
Momentum Conservation (default: true) - Enable momentum tracking
Suggested Use Cases
Identify momentum direction using velocity sign and magnitude
Watch for divergences as potential reversal warnings
Use acceleration to detect momentum shifts before price confirms
Monitor jerk for momentum stability assessment
Combine force and kinetic energy for conviction analysis
Timeframe Recommendations
Works on all timeframes. Higher timeframes provide smoother readings; lower timeframes show more granular momentum changes.
Limitations
Physics analogies are conceptual and not literal market physics
Divergence detection uses pivot-based lookback and may lag
Force calculation uses volume ratio as mass proxy
Kinetic energy is a derived metric, not actual energy
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
Opens and RangesDisplays:
- Daily, Weekly, Monthly and Yearly opens
- High / Low / Midline(EQ) of previous day and previous week
Entropy Balance Oscillator [JOAT]
Entropy Balance Oscillator - Chaos Theory Edition
Overview
Entropy Balance Oscillator is an open-source oscillator indicator that applies chaos theory concepts to market analysis. It calculates market entropy (disorder/randomness), balance (price position within range), and various chaos metrics to identify whether the market is in an ordered, chaotic, or balanced state. This helps traders understand market regime and adjust their strategies accordingly.
What This Indicator Does
The indicator calculates and displays:
Entropy - Measures market disorder using return distribution analysis
Balance - Price position within the high-low range, normalized to -1 to +1
Lyapunov Exponent - Estimates sensitivity to initial conditions (chaos indicator)
Hurst Exponent - Measures long-term memory in price series (trend persistence)
Strange Attractor - Simulated attractor points for visualization
Bifurcation Detection - Identifies potential regime change points
Chaos Index - Combined entropy and volatility score
Market Phase - Classification as CHAOS, ORDER, or BALANCED
How It Works
Entropy is calculated using return distribution:
calculateEntropy(series float price, simple int period) =>
// Calculate returns and their absolute values
// Sum absolute returns for normalization
// Apply Shannon entropy formula: -sum(p * log(p))
float entropy = 0.0
for i = 0 to array.size(returns) - 1
float prob = math.abs(array.get(returns, i)) / sumAbs
if prob > 0
entropy -= prob * math.log(prob)
entropy
Balance measures price position within range:
calculateBalance(series float high, series float low, series float close, simple int period) =>
float range = high - low
float position = (close - low) / (range > 0 ? range : 1)
float balance = ta.ema(position, period)
(balance - 0.5) * 2 // Normalize to -1 to +1
Lyapunov Exponent estimates chaos sensitivity:
lyapunovExponent(series float price, simple int period) =>
float sumLog = 0.0
for i = 1 to period
float ratio = price > 0 ? math.abs(price / price ) : 1.0
if ratio > 0
sumLog += math.log(ratio)
lyapunov := sumLog / period
Hurst Exponent measures trend persistence:
H > 0.5: Trending/persistent behavior
H = 0.5: Random walk
H < 0.5: Mean-reverting behavior
Signal Generation
Phase changes and extreme conditions generate signals:
Chaos Phase: Normalized entropy exceeds chaos threshold (default 0.7)
Order Phase: Normalized entropy falls below order threshold (default 0.3)
Extreme Chaos: Entropy exceeds 1.5x chaos threshold
Extreme Order: Entropy falls below 0.5x order threshold
Bifurcation: Variance exceeds 2x average variance
Dashboard Panel (Top-Right)
Market Phase - Current phase (CHAOS/ORDER/BALANCED)
Entropy Level - Normalized entropy value
Balance - Current balance reading (-1 to +1)
Chaos Index - Combined chaos score percentage
Volatility - Current price volatility
Lyapunov Exp - Lyapunov exponent value
Hurst Exponent - Hurst exponent value
Chaos Score - Overall chaos assessment
Status - Current market status
Visual Elements
Entropy Line - Main oscillator showing normalized entropy
Entropy EMA - Smoothed entropy for trend reference
Balance Area - Filled area showing balance direction
Chaos/Order Thresholds - Horizontal dashed lines
Lyapunov Line - Step line showing Lyapunov exponent
Strange Attractor - Circle plots showing attractor points
Phase Space - Line showing phase space reconstruction
Phase Background - Background color based on current phase
Extreme Markers - X-cross for extreme chaos, diamond for extreme order
Bifurcation Markers - Circles at potential regime changes
Input Parameters
Entropy Period (default: 20) - Period for entropy calculation
Balance Period (default: 14) - Period for balance calculation
Chaos Threshold (default: 0.7) - Threshold for chaos phase
Order Threshold (default: 0.3) - Threshold for order phase
Lyapunov Exponent (default: true) - Enable Lyapunov calculation
Hurst Exponent (default: true) - Enable Hurst calculation
Strange Attractor (default: true) - Enable attractor visualization
Bifurcation Detection (default: true) - Enable bifurcation detection
Suggested Use Cases
Identify market regime for strategy selection (trend-following vs mean-reversion)
Watch for phase changes as potential trading environment shifts
Use Hurst exponent to assess trend persistence
Monitor chaos index for volatility regime awareness
Avoid trading during extreme chaos phases
Timeframe Recommendations
Best on 1H to Daily charts. Chaos metrics require sufficient data for meaningful calculations.
Limitations
Chaos theory concepts are applied as analogies, not rigorous mathematical implementations
Lyapunov and Hurst calculations are simplified approximations
Strange attractor visualization is conceptual
Bifurcation detection uses variance as proxy
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
#BLTA - CARE 7891🔷 #BLTA - CARE 7891: Ny session toolkit + Risk box + Confirmed levels + Asia box + Structure + Imbalances
Description:
#BLTA - CARE 7891 is an overlay toolkit 🧭🛠️ built for structured discretionary trading preparation. Its main purpose is to keep your chart reading and pre-trade planning in one place by combining time context, confirmed reference levels, liquidity framing, manual risk sizing, and context overlays (structure + imbalances).
🚫 This script is an indicator, not a strategy. It does not place orders.
🧩 Why these modules are combined (and how they work together)
This is not a “mashup for the sake of mixing”. Each module supports a specific step of a practical workflow:
🕒 Time context (new york session mapping)
Background highlights mark precise NY-time windows (day division at 17:00, london blocks, and new york blocks).
This provides the timing framework for when you typically scan, plan, or execute.
📰📅 Confirmed reference levels (previous day/week highs & lows)
Instead of plotting live extremes, this script confirms levels at defined boundaries:
Trading day: 17:00 → 17:00 NY
Weekly boundary: Sunday 17:00 NY
Lines start exactly at the candle where the high/low occurred and extend forward.
Optional “stop on hit” 🧊 freezes a level once price touches it, keeping the chart clean and realistic for forward analysis.
🈵 Asian range liquidity box (session that can cross midnight)
A dedicated Asian range container tracks high/low and an optional 50% midline.
It uses NY timestamps and safely handles sessions that cross midnight (storing the correct session date).
This gives you a daily liquidity “frame” often used for sweeps, breaks, and invalidations.
💸 Manual risk planning (trade box + lot sizing + table)
You select Entry (EP) and Stop (SL) directly on the chart using input.price(..., confirm=true) and time anchors.
The script then calculates:
💰 cash at risk from balance and risk %
📏 stop distance in pips (forex-aware pip sizing)
📦 lot size using units-per-lot and account currency inputs
🎯 target price using a reward ratio
It draws a risk box + target box and shows a compact table for quick verification.
🔁 Re-confirm mode (wizard) is included to prevent “stale” anchor points after timeframe changes or when you want a clean reset. While enabled, the risk table is replaced with a step guide and temporary EP/SL markers.
📈 Market structure overlay (1H zigzag projected to any timeframe)
A zigzag swing engine is computed on 1H via request.security() and projected onto the current chart.
Opacity is automatically reduced on non-1H charts so it stays contextual, not dominant.
Optional live extension of the last leg helps you see the active swing in progress.
📊 Imbalance map (fvg / og / vi) + optional dashboard
The script detects and draws:
🤏 fair value gaps (fvg)
👐 opening gaps (og)
🔎 volume imbalances (vi)
Optional filters allow minimum width by points / % / atr, and each imbalance type can be extended forward.
A dashboard 📱 can summarize bullish/bearish frequency and fill rates for context review.
✅ Quick start (recommended order)
Turn on 🕒 session visualization to align with NY timing.
Enable 📰 pdh/pdl and 📅 weekly highs/lows to map confirmed reference liquidity.
Use 🈵 the asian range box to frame the early-session liquidity container.
Plan your trade with 💸 risk module (pick EP/SL, verify pips + lots + target).
Add 📈 zigzag structure and 📊 imbalances only as supporting context.
⚠️ Notes & limitations
This tool is for planning and chart reading, not automated execution.
Lot sizing is an estimate based on your inputs; always confirm broker contract specs.
Some modules draw many objects (boxes/lines/tables) 🧱, which may slow very small timeframes.
[turpsy]MOR-Fractal-Opening RangeThis script combines the Midnight Opening Range and the Fractal identification that I have published individually before. The original authors have been credited too.
The combination helps to reduce multiple indicators on your chart. Also, you can enable or disable the MOR.
Moreso, with the previous separate indicators, the current opening range and historical opening range do not show on 4hr timeframe, in this combined one, I have fixed that. the current opening range shows up to daily and weekly timeframe.
It also shows the 1st presented fair value gap, pivot points are also identified based on the session.
CME Gap Tracker [captainua]CME Gap Tracker - Advanced Gap Detection & Tracking System
Overview
This indicator provides comprehensive gap detection and tracking capabilities for both consecutive bar gaps and weekly CME trading session gaps. It automatically detects gaps, tracks their fill progress in real-time, provides detailed statistics, and includes backtesting features to validate gap trading strategies. The script is optimized for CME futures trading but works with any instrument, automatically handling ticker conversion between CME futures and spot markets.
Gap Detection Types
Consecutive Bar Gaps:
Detects gaps between any two consecutive bars on the current timeframe. Two detection modes are available:
- High/Low Mode: Detects gaps when current bar's low > previous bar's high (gap up) or current bar's high < previous bar's low (gap down). This is more sensitive and detects more gaps.
- Close/Open Mode: Detects gaps when current bar's open > previous bar's close (gap up) or current bar's open < previous bar's close (gap down). This is more conservative.
Weekly CME Gaps:
Detects gaps between weekly trading sessions, specifically designed for CME futures markets. The script automatically detects the first bar of each new week and compares the current week's open with the previous week's close/high/low. This is particularly useful for tracking weekend gaps in CME futures markets where price can gap significantly between Friday close and Monday open.
Smart Ticker Detection
The script automatically converts between CME futures tickers (e.g., BTC1!, ETH1!) and spot tickers (e.g., BTCUSDT, ETHUSDT). When viewing a CME futures chart, it can automatically detect and use the corresponding spot ticker for gap analysis, and vice versa. This allows traders to:
- View CME futures but track spot market gaps
- View spot markets but track CME futures gaps
- Manually override with custom ticker specification
The ticker validation system uses caching to prevent race conditions during initial script load, ensuring reliable ticker resolution.
Gap Filtering & Tolerance
Static Tolerance:
Set minimum and maximum gap sizes as percentages (default: show only gaps > 0.333% and < 100%). This filters out noise and focuses on significant gaps.
Dynamic Tolerance:
When enabled, tolerance is calculated dynamically based on ATR (Average True Range). The formula: Dynamic Tolerance = (ATR × ATR Multiplier / Close Price) × 100%. This adapts to market volatility - in volatile markets, only larger gaps are shown; in calm markets, smaller gaps are displayed. This is particularly useful for instruments with varying volatility.
Absolute Size Filtering:
In addition to percentage filtering, gaps can be filtered by absolute price size (e.g., show only gaps > $100). This is useful for instruments where percentage alone doesn't capture significance (e.g., high-priced stocks).
Fill Confirmation System
To reduce false gap closure signals, the script requires multiple consecutive bars to confirm gap closure. The default is 2 bars, but can be adjusted from 1-10 bars. Lower values (1) confirm faster but may produce false signals from temporary wicks. Higher values (3-5) reduce false fill signals but delay confirmation. This prevents temporary price spikes from triggering false gap closure alerts.
Gap Fill Tracking
The script tracks gap fill progress in real-time:
- Fill Percentage: How much of the gap has been filled (0-100%)
- Fill Speed: Whether fill is accelerating, decelerating, or constant
- Time to Fill: For closed gaps, how many bars it took to fill
- Fill Status: Unfilled, partially filled, or fully filled
Visual Features
Heatmap Colors:
Gap colors can be adjusted based on gap size, with larger gaps appearing more intense and smaller gaps more faded.
Adaptive Line Width:
Line thickness automatically adjusts based on gap size, making larger gaps more prominent.
Age-Based Coloring:
Gaps can be color-coded by age, with newer gaps appearing brighter and older gaps more faded.
Confluence Zones:
Areas where multiple gaps overlap are highlighted with enhanced visuals, indicating stronger support/resistance zones.
Gap Statistics
A comprehensive statistics table provides:
- Total gaps created, open, and closed
- Fill rates by direction (up vs down) and size category (small, medium, large)
- Average fill time, fastest fill, slowest fill
- Oldest gap and oldest unfilled gap
- Backtesting results: success rate, reversal rate, average move after fill
- CME gap expiration statistics: Gaps expired unfilled (for Weekly CME gaps only)
Statistics can be filtered by period (All Time, Last 100/500/1000/5000 bars) and can be reset via toggle button.
Backtesting
When enabled, the script tracks price movement after gap fills:
- Price after fill: Captures price when gap closes
- Move after fill: Percentage price movement after closure
- Success/Reversal tracking: Determines if price continued in fill direction or reversed
- Success rate: Percentage of gaps where price continued in fill direction
This data helps validate gap trading strategies and understand gap fill behavior.
Gap Re-opening Detection
When enabled, the script detects when a previously filled gap reopens (price gaps back through the filled gap zone). This is useful for identifying when support/resistance levels break and can signal trend reversals.
CME-Specific Features
Monday Opening Volume Analysis:
For Weekly CME gaps detected on Monday openings, the script tracks Monday opening volume relative to average volume. Higher Monday volume ratios indicate stronger gap significance. This ratio is integrated into gap strength calculations and can be displayed in gap labels. Gaps with Monday volume > 1.5x average receive priority score boosts.
CME Gap Expiration Tracking:
Weekly CME gaps that remain unfilled beyond a configurable threshold (default 1000 bars) are automatically marked as "expired" and tracked separately in statistics. This helps identify gaps that act as strong support/resistance levels and never fill. Expired gaps are displayed with special labeling and counted in the "Gaps Expired (CME)" statistic.
CME Gap Priority Scoring Enhancement:
The priority scoring system includes special boosts for CME gaps:
- Monday gaps: +10 points (gaps detected on Monday openings)
- High Monday volume gaps: +15 points (Monday volume ratio > 1.5x average)
- Gaps at key weekly levels: +10 points (gaps aligning with previous week's high, low, or close within 0.5% tolerance)
These enhancements help prioritize the most significant CME gaps for trading decisions.
Custom Gap Zones
Traders can manually mark custom gap zones by specifying top and bottom levels. These zones are tracked like automatically detected gaps, allowing traders to:
- Mark historical gaps that weren't detected
- Create support/resistance zones based on other analysis
- Track specific price levels of interest
Multi-Timeframe Support
The script can detect gaps on higher timeframes simultaneously. For example, when viewing a 1-hour chart, it can also detect and display gaps from the weekly timeframe. This provides multi-timeframe context for gap analysis.
Alert System
Comprehensive alert system with multiple trigger types:
- Gap Creation: Alert when new gaps are detected
- Gap Closure: Alert when gaps are fully filled
- Partial Fill: Alert when gaps reach specific fill percentages (e.g., 25%, 50%, 75%, 90%)
- Approaching Closure: Alert when gaps reach high fill levels (e.g., 90%, 95%) before closing
- Gap Re-opening: Alert when previously filled gaps reopen
Alerts can be filtered to trigger only on Mondays (useful for CME weekly gaps) or any day.
Filtering Options
Gaps can be filtered by:
- Fill Status: Show all, unfilled only, partially filled only, or fully filled only
- Fill Percentage Range: Show gaps within specific fill percentage ranges
- Gap Age: Show only gaps within specific age ranges (bars)
- Gap Expiration: Automatically remove gaps older than specified number of bars (for Weekly CME gaps, uses separate CME expiration threshold)
Performance & Safety
The script includes several safety features:
- Safe array operations to prevent index out-of-bounds errors
- Memory leak prevention through proper visual object cleanup
- Ticker validation caching to prevent race conditions
- Week boundary detection for accurate CME gap identification
- Fill confirmation system to reduce false signals
- Monday opening volume analysis for CME gap strength assessment
- CME gap expiration tracking with configurable thresholds
- Priority scoring enhancement for Monday gaps, high Monday volume, and key weekly levels
Usage Recommendations
For CME Weekly Gaps:
1. Set "Gap Detection Type" to "Weekly CME"
2. View a CME futures chart (e.g., BTC1!) or enable auto-detect spot ticker
3. Set tolerance to filter gap size (default 0.333%)
4. Enable statistics to track fill rates
5. Configure alerts for gap creation/closure
For Consecutive Bar Gaps:
1. Set "Gap Detection Type" to "Consecutive Bars"
2. Choose "High/Low" for more gaps or "Close/Open" for fewer gaps
3. Adjust tolerance based on instrument volatility
4. Enable fill confirmation (2-3 bars) for more reliable signals
5. Use filtering to focus on specific gap types
For Gap Trading Strategies:
1. Enable backtesting to validate strategy performance
2. Review statistics to understand gap fill patterns
3. Use confluence zones to identify strong support/resistance
4. Configure alerts for gap events matching your strategy
5. Use custom zones to mark important levels
Technical Details:
• Pine Script v6 | Overlay indicator
• Safe array operations with index validation
• Memory leak prevention through proper object cleanup
• Ticker validation caching for reliable ticker resolution
• Works on all timeframes and instruments
• Comprehensive edge case handling
• Week boundary detection using ta.change(weekofyear)
• Fill confirmation system with configurable bars
For detailed documentation and usage instructions, see the script comments.
SHFE Silver USD/ozPersonal utility script to view Shanghai silver prices in USD/oz along side COMEX silver.
THE ELVINATORTHE ELVINATOR is my trend-following momentum indicator built on the 20 EMA, 50 EMA, and 200 EMA, designed for trading **XAUUSD during the New York session (9:30–17:00 NY time), Monday through Friday**.
**How to trade it:**
* **Trend filter:** Only take **longs above the 200 EMA** and **shorts below the 200 EMA**. This keeps trades aligned with Gold’s dominant direction.
* **Long setups:** A **20 EMA cross above the 50 EMA** signals bullish momentum. Best entries come after a pullback into the 20–50 EMA zone followed by strong continuation candles.
* **Short setups:** A **20 EMA cross below the 50 EMA** signals bearish momentum. Look for pullbacks into the EMA zone and rejection before continuation lower.
* **Timing:** Focus on NY open and high-volume moves. Avoid choppy conditions and late-session exhaustion.
* **Risk & exits:** Place stops beyond recent swings or EMA structure. Targets can be prior highs/lows or scaled with trend continuation.
THE ELVINATOR is built for **structure, patience, and disciplined execution**, allowing traders to capitalize on Gold’s volatility without chasing noise.
Nadaraya-Watson Envelope + EMA Filter (Optimized for BTC)Best Way to Use This Nadaraya-Watson EnvelopeThis indicator is not a standalone "holy grail" system — it's a powerful predictive tool that estimates where price is "likely" to go based on historical patterns.Core Idea:The orange line = predicted "fair value" or mean price path
The blue cloud = expected range (dynamic support/resistance)
Price tends to mean-revert to the orange line
Best Practices:Trade bounces in ranging markets:BUY at lower band (green) when price is below orange line
SELL at upper band (red) when price is above orange line
Target: the orange line or opposite band
Trade breakouts in trending markets:If price breaks and closes strongly outside the cloud → potential trend start
Wait for pullback to orange line for entry in trend direction
Best timeframes:5m–15m: Scalping bounces
1H–4H: Swing trading mean reversion
Add confluence for higher win rate:Only take BUY if price is above EMA 200 (uptrend bias)
Combine with volume spike or RSI oversold/overbought
Use with support/resistance levels
Risk management:Stop loss: just outside the envelope
Take profit: at orange line or next band
enjoy
MTF EMAs: 200 EMA (1hr & 15m), 8 EMA (5m)Using the 200 ema on 1hr and 15 min timeframe to ID entry points for scalping.
Bar Countdown ClockBar Countdown Clock
Description:
Displays the remaining time for the current bar on the chart. The countdown label follows the previous EMA5 price to stay stable during high-volatility markets. Font size and label position are fully customizable. Works well on BTC, Gold, Forex, and other trading instruments.
How to Use:
Add the indicator to your chart.
Adjust Clock Color, Font Size, and X Offset to suit your preference.
The label will automatically track the previous EMA5 price.
The countdown updates in real-time until the current bar closes.
Tips:
Increase X Offset if the label overlaps the current bar.
For high-volatility instruments, the label remains stable by following EMA5.
EMA Length can be adjusted to change the anchor point for the label.
Fractal Market Geometry [JOAT]
Fractal Market Geometry
Overview
Fractal Market Geometry is an open-source overlay indicator that combines fractal analysis with harmonic pattern detection, Fibonacci retracements and extensions, Elliott Wave concepts, and Wyckoff phase identification. It provides traders with a geometric framework for understanding market structure and identifying potential reversal patterns with multi-factor signal confirmation.
What This Indicator Does
The indicator calculates and displays:
Fractal Detection - Identifies fractal highs and lows using Williams-style pivot analysis with configurable period
Fractal Dimension - Calculates market complexity using range-based dimension estimation
Harmonic Patterns - Detects Gartley, Butterfly, Bat, Crab, Shark, Cypher, and ABCD patterns using Fibonacci ratios
Fibonacci Retracements - Key levels at 38.2%, 50%, and 61.8%
Fibonacci Extensions - Projection level at 161.8%
Elliott Wave Count - Simplified wave counting based on pivot detection (1-5)
Wyckoff Phase - Volume-based phase identification (Accumulation, Markup, Distribution, Neutral)
Golden Spiral Levels - ATR-based support and resistance levels using phi (1.618) ratio
Trend Detection - EMA crossover trend identification (20/50 EMA)
How It Works
Fractal detection uses a configurable period to identify swing points:
detectFractalHigh(simple int period) =>
bool result = true
float centerVal = high
for i = 0 to period - 1
if high >= centerVal or high >= centerVal
result := false
break
Harmonic pattern detection uses Fibonacci ratio analysis between swing points. Each pattern has specific ratio requirements:
Gartley: AB 0.382-0.618, BC 0.382-0.886, CD 1.27-1.618
Butterfly: AB 0.382-0.5, BC 0.382-0.886, CD 1.618-2.24
Bat: AB 0.5-0.618, BC 1.13-1.618, CD 1.618-2.24
Crab: AB 0.382-0.618, BC 0.382-0.886, CD 2.24-3.618
Shark: AB 0.382-0.618, BC 1.13-1.618, CD 1.618-2.24
Cypher: AB 0.382-0.618, BC 1.13-1.414, CD 0.786-0.886
Wyckoff phase detection analyzes volume relative to price movement:
wyckoffPhase(simple int period) =>
float avgVol = ta.sma(volume, period)
float priceChg = ta.change(close, period)
string phase = "NEUTRAL"
if volume > avgVol * 1.5 and math.abs(priceChg) < close * 0.02
phase := "ACCUMULATION"
else if volume > avgVol * 1.5 and math.abs(priceChg) > close * 0.05
phase := "MARKUP"
else if volume < avgVol * 0.7
phase := "DISTRIBUTION"
phase
Signal Generation
Signals use multi-factor confirmation for accuracy:
BUY Signal: Fractal low + Uptrend (EMA20 > EMA50) + RSI 30-55 + Bullish candle + Volume confirmation
SELL Signal: Fractal high + Downtrend (EMA20 < EMA50) + RSI 45-70 + Bearish candle + Volume confirmation
Pattern Detection: Label appears when harmonic pattern completes at current bar
Dashboard Panel (Top-Right)
Dimension - Fractal dimension value (market complexity measure)
Last High - Most recent fractal high price
Last Low - Most recent fractal low price
Pattern - Current harmonic pattern name or NONE
Elliott Wave - Current wave count (Wave 1-5) or OFF
Wyckoff - Current market phase or OFF
Trend - BULLISH, BEARISH, or NEUTRAL based on EMA crossover
Signal - BUY, SELL, or WAIT status
Visual Elements
Fractal Markers - Small triangles at fractal highs (down arrow) and lows (up arrow)
Geometry Lines - Dashed lines connecting the most recent fractal high and low
Fibonacci Levels - Clean horizontal lines at 38.2%, 50%, and 61.8% retracement levels
Fibonacci Extension - Horizontal line at 161.8% extension level
Golden Spiral Levels - Support and resistance lines based on ATR x 1.618
3D Fractal Field - Optional depth layers around swing levels (OFF by default)
Harmonic Pattern Markers - Small diamond shapes when Crab, Shark, or Cypher patterns detected
Pattern Labels - Text label showing pattern name when detected
Signal Labels - BUY/SELL labels on confirmed multi-factor signals
Input Parameters
Fractal Period (default: 5) - Bars on each side for fractal detection
Geometry Depth (default: 3) - Complexity of geometric calculations
Pattern Sensitivity (default: 0.8) - Tolerance for pattern ratio matching
Show Fibonacci Levels (default: true) - Display retracement levels
Show Fibonacci Extensions (default: true) - Display extension level
Elliott Wave Detection (default: true) - Enable wave counting
Wyckoff Analysis (default: true) - Enable phase detection
Golden Spiral Levels (default: true) - Display spiral support/resistance
Show Fractal Points (default: true) - Display fractal markers
Show Geometry Lines (default: true) - Display connecting lines
Show Pattern Labels (default: true) - Display pattern name labels
Show 3D Fractal Field (default: false) - Display depth layers
Show Harmonic Patterns (default: true) - Display pattern markers
Show Buy/Sell Signals (default: true) - Display signal labels
Suggested Use Cases
Identify potential reversal zones using harmonic pattern completion
Use Fibonacci levels for entry, stop-loss, and target planning
Monitor Wyckoff phases for accumulation/distribution awareness
Track Elliott Wave counts for trend structure analysis
Use fractal dimension to gauge market complexity
Wait for multi-factor signal confirmation before entering trades
Timeframe Recommendations
Best on 1H to Daily charts. Lower timeframes produce more fractals but with less significance. Higher timeframes provide stronger levels and more reliable signals.
Limitations
Harmonic pattern detection uses simplified ratio ranges and may not match all textbook definitions
Elliott Wave counting is basic and does not include all wave rules
Wyckoff phase detection is volume-based approximation
Fractal dimension calculation is simplified
Signals require fractal confirmation which has inherent lag equal to the fractal period
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
PA SystemPA System - Price Action Trading System
价格行为交易系统
📊 概述 / Overview
PA System is a comprehensive price action trading indicator that combines Smart Money Concepts (SMC), market structure analysis, and multi-timeframe confirmation to identify high-probability trade setups. Designed for both manual traders and algorithmic trading systems.
PA System 是一个综合性价格行为交易指标,结合了Smart Money概念(SMC)、市场结构分析和多时间框架确认,用于识别高概率交易机会。适用于手动交易者和算法交易系统。
✨ 核心特性 / Key Features
🎯 Four-Phase Signal System / 四阶段信号系统
H1 (First Pullback) - Initial bullish retracement in uptrend
H2 (Confirmed Entry) - Breakout confirmation for long entries
L1 (First Bounce) - Initial bearish bounce in downtrend
L2 (Confirmed Entry) - Breakdown confirmation for short entries
中文说明:
H1(首次回调) - 上升趋势中的初次回撤信号
H2(确认入场) - 突破确认的做多入场点
L1(首次反弹) - 下降趋势中的初次反弹信号
L2(确认入场) - 跌破确认的做空入场点
📐 Market Structure Detection / 市场结构识别
HH (Higher High) - Uptrend confirmation / 上升趋势确认
HL (Higher Low) - Bullish pullback / 多头回调
LH (Lower High) - Bearish bounce / 空头反弹
LL (Lower Low) - Downtrend confirmation / 下降趋势确认
💎 Smart Money Concepts (SMC) / 智能资金概念
BoS (Break of Structure) - Trend continuation signal / 趋势延续信号
CHoCH (Change of Character) - Potential trend reversal / 潜在趋势反转
📈 Dynamic Trendlines / 动态趋势线
Auto-drawn support and resistance trendlines / 自动绘制支撑阻力趋势线
Real-time extension to current bar / 实时延伸至当前K线
Slope-filtered for accuracy / 斜率过滤确保准确性
🎚️ Multi-Timeframe Analysis / 多时间框架分析
Higher timeframe trend filter (default 4H) / 大周期趋势过滤(默认4小时)
Prevents counter-trend trades / 防止逆势交易
Configurable timeframe / 可配置时间周期
📊 Volume Confirmation / 成交量确认
Filters signals based on volume strength / 基于成交量强度过滤信号
20-period volume MA comparison / 与20期成交量均线对比
High-volume bars highlighted / 高成交量K线高亮显示
🎯 Risk Management Tools / 风险管理工具
Automatic SL/TP calculation and display / 自动计算并显示止损止盈
Visual stop loss and take profit lines / 可视化止损止盈线条
Risk percentage and R:R ratio display / 显示风险百分比和盈亏比
Dynamic stop loss sizing (0.3% - 1.5%) / 动态止损范围(0.3% - 1.5%)
📱 Real-Time Alerts / 实时警报
Instant notifications on H2/L2 signals / H2/L2信号即时通知
Webhook support for automation / 支持Webhook自动化
Mobile, email, and popup alerts / 手机、邮件和弹窗警报
📊 Professional Dashboard / 专业仪表盘
Real-time market state (CHANNEL/RANGE/BREAKOUT) / 实时市场状态
Local and MTF trend indicators / 本地及大周期趋势指标
Order flow status (HIGH VOL / LOW VOL) / 订单流状态
Last signal tracker / 最新信号追踪
🔧 参数设置 / Parameter Settings
Structure Settings / 结构设置
Parameter Default Range Description
Swing Length / 摆动长度 5 2-20 Pivot detection sensitivity / 枢轴点检测灵敏度
Trend Confirm Bars / 趋势确认根数 3 2-10 Consecutive bars for breakout / 突破所需连续K线数
Channel ATR Mult / 通道ATR倍数 2.0 1.0-5.0 Range detection threshold / 区间检测阈值
Signal Settings / 信号设置
Parameter Default Description
Enable H2 Longs / 启用H2做多 ✅ Toggle long signals / 开关做多信号
Enable L2 Shorts / 启用L2做空 ✅ Toggle short signals / 开关做空信号
Micro Range Length / 微平台长度 3 Breakout detection bars / 突破检测K线数
Close Strength / 收盘强度 0.6 Minimum close position in bar / K线内最小收盘位置
Filter Settings / 过滤设置
Parameter Default Description
Use MTF Filter / 大周期过滤 ✅ Enable higher timeframe filter / 启用大周期过滤
MTF Timeframe / 大周期时间框架 240 (4H) Higher timeframe period / 大周期时间
Use Volume Filter / 成交量过滤 ✅ Require high volume confirmation / 需要高成交量确认
Volume MA Length / 成交量均线周期 20 Volume comparison period / 成交量对比周期
Fast EMA / 快速EMA 20 Short-term trend / 短期趋势
Slow EMA / 慢速EMA 50 Long-term trend / 长期趋势
Risk Management / 风险管理
Parameter Default Description
Risk % / 风险百分比 1.0% Risk per trade / 每笔交易风险
R:R Ratio / 盈亏比 2.0 Reward to risk ratio / 盈亏比率
Max SL ATR / 最大止损ATR 3.0 Maximum stop loss in ATR / 最大止损ATR倍数
Min SL % / 最小止损百分比 0.3% Minimum stop loss percentage / 最小止损百分比
Max SL % / 最大止损百分比 1.5% Maximum stop loss percentage / 最大止损百分比
📖 使用方法 / How to Use
1. 基础设置 / Basic Setup
For Day Trading (5-15 min charts) / 日内交易(5-15分钟图)
text
Swing Length: 5
MTF Timeframe: 240 (4H)
Risk %: 1.0%
R:R: 2.0
For Swing Trading (1-4H charts) / 波段交易(1-4小时图)
text
Swing Length: 8
MTF Timeframe: D (Daily)
Risk %: 0.5%
R:R: 3.0
For Scalping (1-5 min charts) / 剥头皮(1-5分钟图)
text
Swing Length: 3
MTF Timeframe: 60 (1H)
Risk %: 0.5%
R:R: 1.5
Use Volume Filter: ✅
2. 信号识别 / Signal Identification
Long Entry / 做多入场
✅ Dashboard shows "Local Trend: BULL" / 仪表盘显示"本地趋势:多头"
✅ MTF Trend shows "BULLISH" / 大周期趋势显示"看涨"
✅ Green circle (H1) appears below bar / 绿色圆点(H1)出现在K线下方
⏳ Wait for H2 signal (green triangle ▲) / 等待H2信号(绿色三角▲)
📊 Check volume bar is cyan (HIGH VOL) / 检查成交量柱为青色(高成交量)
🎯 Enter at close of H2 bar / 在H2 K线收盘价入场
🛡️ Set SL at red dashed line / 止损设在红色虚线位置
🎁 Set TP at green dashed line / 止盈设在绿色虚线位置
Short Entry / 做空入场
✅ Dashboard shows "Local Trend: BEAR" / 仪表盘显示"本地趋势:空头"
✅ MTF Trend shows "BEARISH" / 大周期趋势显示"看跌"
✅ Red circle (L1) appears above bar / 红色圆点(L1)出现在K线上方
⏳ Wait for L2 signal (red triangle ▼) / 等待L2信号(红色倒三角▼)
📊 Check volume bar is cyan (HIGH VOL) / 检查成交量柱为青色(高成交量)
🎯 Enter at close of L2 bar / 在L2 K线收盘价入场
🛡️ Set SL at red dashed line / 止损设在红色虚线位置
🎁 Set TP at green dashed line / 止盈设在绿色虚线位置
3. 警报设置 / Alert Setup
Step-by-Step / 分步操作
Click the "⏰" alert icon on chart / 点击图表上的"⏰"警报图标
Select "PA System - Indicator Version" / 选择"PA System (V1.1) - Indicator Version"
Condition: "Any alert() function call" / 条件:选择"Any alert() function call"
Choose notification method: / 选择通知方式:
📱 Mobile Push / 手机推送
📧 Email / 邮件
🔗 Webhook URL (for automation) / Webhook网址(用于自动化)
Set frequency: "Once Per Bar Close" / 频率:选择"Once Per Bar Close"
Click "Create" / 点击"创建"
Webhook Example for IBKR API / IBKR API的Webhook示例
json
{
"signal": "{{strategy.order.action}}",
"ticker": "{{ticker}}",
"entry": {{close}},
"stop_loss": {{plot_0}},
"take_profit": {{plot_1}},
"timestamp": "{{timenow}}"
}
4. 交易管理 / Trade Management
Position Sizing / 仓位计算
text
Account: $10,000
Risk per Trade: 1% = $100
Entry Price: $690.45
Stop Loss: $687.38
Risk per Share: $690.45 - $687.38 = $3.07
Position Size: $100 / $3.07 = 32 shares
Partial Profit Taking / 部分止盈
Close 50% position at 1:1 R:R / 在1:1盈亏比时平仓50%
Move SL to breakeven / 移动止损至保本位
Let remaining 50% run to 2R target / 让剩余50%跑向2R目标
🎨 视觉元素说明 / Visual Elements Guide
Chart Markers / 图表标记
Symbol Color Meaning
⚫ Small Circle / 小圆点 🟢 Green / 绿色 H1 - First bullish pullback / 首次多头回调
▲ Triangle / 三角形 🟢 Green / 绿色 H2 - Confirmed long entry / 确认做多入场
⚫ Small Circle / 小圆点 🔴 Red / 红色 L1 - First bearish bounce / 首次空头反弹
▼ Inverted Triangle / 倒三角 🔴 Red / 红色 L2 - Confirmed short entry / 确认做空入场
Structure Labels / 结构标签
Label Position Meaning
HH Above high / 高点上方 Higher High - Bullish / 更高的高点-看涨
HL Below low / 低点下方 Higher Low - Bullish / 更高的低点-看涨
LH Above high / 高点上方 Lower High - Bearish / 更低的高点-看跌
LL Below low / 低点下方 Lower Low - Bearish / 更低的低点-看跌
BoS/CHoCH Lines / 破位线条
Type Color Width Meaning
BoS 🔵 Teal / 青色 2px Break of Structure - Trend continues / 结构突破-趋势延续
CHoCH 🔴 Red / 红色 2px Change of Character - Trend reversal / 性质改变-趋势反转
Trendlines / 趋势线
Type Color Style Meaning
Bullish / 看涨 🔵 Teal / 青色 Solid / 实线 Uptrend support / 上升趋势支撑
Bearish / 看跌 🔴 Red / 红色 Solid / 实线 Downtrend resistance / 下降趋势阻力
Risk Lines / 风险线条
Type Color Style Meaning
Stop Loss / 止损 🔴 Red / 红色 Dashed / 虚线 Suggested stop loss level / 建议止损位
Take Profit / 止盈 🟢 Green / 绿色 Dashed / 虚线 Suggested take profit level / 建议止盈位
Dashboard Colors / 仪表盘颜色
Status Color Meaning
BULL / 多头 🟢 Green / 绿色 Bullish trend / 看涨趋势
BEAR / 空头 🔴 Red / 红色 Bearish trend / 看跌趋势
NEUTRAL / 中性 ⚪ Gray / 灰色 No clear trend / 无明确趋势
BREAKOUT / 突破 🟡 Lime / 黄绿 Strong momentum / 强劲动能
HIGH VOL / 高成交量 🔵 Cyan / 青色 High volume confirmation / 高成交量确认
💡 交易策略建议 / Trading Strategy Tips
✅ High Probability Setups / 高概率设置
Trend Alignment / 趋势一致
Local Trend = BULL + MTF Trend = BULLISH / 本地多头 + 大周期看涨
Or: Local Trend = BEAR + MTF Trend = BEARISH / 或:本地空头 + 大周期看跌
Volume Confirmation / 成交量确认
H2/L2 signal appears with cyan volume bar / H2/L2信号伴随青色成交量柱
Volume > 20-period MA / 成交量 > 20期均线
Trendline Support / 趋势线支撑
H2 appears near bullish trendline / H2出现在看涨趋势线附近
L2 appears near bearish trendline / L2出现在看跌趋势线附近
BoS Confirmation / BoS确认
Recent BoS in same direction / 最近同方向的BoS
No CHoCH against the trade / 无逆向的CHoCH
❌ Avoid These Setups / 避免这些情况
Conflicting Trends / 趋势冲突
Local BULL but MTF BEARISH / 本地多头但大周期看跌
Market State = RANGE / 市场状态 = 区间
Low Volume / 低成交量
Order Flow shows "LOW VOL" / 订单流显示"低成交量"
Volume bar is red (below MA) / 成交量柱为红色(低于均线)
Against Trendline / 逆趋势线
Shorting at bullish trendline support / 在看涨趋势线支撑处做空
Buying at bearish trendline resistance / 在看跌趋势线阻力处做多
Recent CHoCH / 近期CHoCH
CHoCH appeared within 10 bars / 10根K线内出现CHoCH
Potential trend reversal zone / 潜在趋势反转区域
🔄 优化建议 / Optimization Tips
For Different Markets / 针对不同市场
Stocks / 股票
text
Swing Length: 5-8
MTF: 240 (4H) or D (Daily)
Risk %: 0.5-1.0%
Best on: SPY, QQQ, AAPL, TSLA
Forex / 外汇
text
Swing Length: 5
MTF: 240 (4H)
Risk %: 1.0-2.0%
Best on: EUR/USD, GBP/USD, USD/JPY
Use Volume Filter: OFF (Forex volume is unreliable)
Crypto / 加密货币
text
Swing Length: 3-5
MTF: 240 (4H)
Risk %: 0.5-1.0% (high volatility)
Max SL %: 2.0-3.0%
Best on: BTC, ETH, SOL
Futures / 期货
text
Swing Length: 5
MTF: 240 (4H)
Risk %: 1.0-1.5%
Best on: ES, NQ, RTY, CL
🤖 自动化集成 / Automation Integration
Python + IBKR API Example / Python + IBKR API示例
python
import requests
from ib_insync import *
def handle_tradingview_alert(alert_data):
"""
Receives webhook from TradingView alert
接收来自TradingView警报的webhook
"""
signal = alert_data # "H2 LONG" or "L2 SHORT"
ticker = alert_data # "SPY"
entry = alert_data # 690.45
stop_loss = alert_data # 687.38
take_profit = alert_data # 696.59
# Connect to IBKR
ib = IB()
ib.connect('127.0.0.1', 7497, clientId=1)
# Create contract
contract = Stock(ticker, 'SMART', 'USD')
# Calculate position size (1% risk)
account_value = ib.accountValues() .value
risk_amount = float(account_value) * 0.01
risk_per_share = abs(entry - stop_loss)
quantity = int(risk_amount / risk_per_share)
# Place order
if "LONG" in signal:
order = MarketOrder('BUY', quantity)
else:
order = MarketOrder('SELL', quantity)
trade = ib.placeOrder(contract, order)
# Set stop loss and take profit
ib.placeOrder(contract, StopOrder('SELL', quantity, stop_loss))
ib.placeOrder(contract, LimitOrder('SELL', quantity, take_profit))
ib.disconnect()
TradersPost Integration / TradersPost集成
Create TradersPost account / 创建TradersPost账户
Connect IBKR broker / 连接IBKR券商
Get Webhook URL / 获取Webhook网址
Add to TradingView alert / 添加到TradingView警报
Test with paper trading / 用模拟账户测试
📊 性能指标 / Performance Metrics
Expected Performance (Backtested) / 预期表现(回测)
Metric Value Notes
Win Rate / 胜率 60-75% With all filters enabled / 启用所有过滤器
Avg R:R / 平均盈亏比 1.8-2.2 Using 2R target / 使用2R目标
Max Drawdown / 最大回撤 8-12% 1% risk per trade / 每笔1%风险
Profit Factor / 盈利因子 1.8-2.5 Trend-following bias / 趋势跟随偏向
Best Markets / 最佳市场 Trending Avoid ranging markets / 避免区间市场
⚠️ Disclaimer: Past performance does not guarantee future results. Always test in paper trading first.
⚠️ 免责声明:历史表现不保证未来结果。请先在模拟账户测试。
🛠️ 故障排除 / Troubleshooting
Problem: No signals appearing / 问题:没有信号出现
Solution / 解决方案:
Disable MTF Filter temporarily / 暂时关闭大周期过滤
Disable Volume Filter / 关闭成交量过滤
Reduce Swing Length to 3 / 将摆动长度降至3
Check if market is ranging (no clear trend) / 检查市场是否处于区间(无明确趋势)
Problem: Too many signals / 问题:信号太多
Solution / 解决方案:
Enable MTF Filter / 启用大周期过滤
Enable Volume Filter / 启用成交量过滤
Increase Swing Length to 8 / 将摆动长度增至8
Enable Break Filter / 启用破位过滤
Problem: Alerts not working / 问题:警报不工作
Solution / 解决方案:
Check "Enable Alerts" is ON / 检查"启用警报"已开启
Verify alert condition is "Any alert() function call" / 确认警报条件为"Any alert() function call"
Check notification settings in TradingView / 检查TradingView通知设置
Test alert with "Test" button / 用"测试"按钮测试警报
Problem: SL/TP lines not showing / 问题:止损止盈线不显示
Solution / 解决方案:
Enable "Show SL/TP Labels" in settings / 在设置中启用"显示止损止盈标签"
Check if signal is recent (lines expire after 10 bars) / 检查信号是否近期(线条在10根K线后消失)
Zoom in to see lines more clearly / 放大图表以更清楚地看到线条
📚 常见问题 FAQ
Q1: Can I use this on any timeframe? / 可以在任何时间框架使用吗?
A: Yes, but works best on 5min-4H charts. Recommended: 15min (day trading), 1H (swing trading).
可以,但在5分钟-4小时图表效果最佳。推荐:15分钟(日内交易),1小时(波段交易)。
Q2: Do I need to enable all filters? / 需要启用所有过滤器吗?
A: No. Start with all enabled, then disable based on your risk tolerance. MTF filter is highly recommended.
不需要。从全部启用开始,然后根据风险承受能力禁用。强烈推荐MTF过滤器。
Q3: Can I automate this with IBKR? / 可以与IBKR自动化吗?
A: Yes! Use TradingView alerts + Webhook + Python script + IBKR API. See automation example above.
可以!使用TradingView警报 + Webhook + Python脚本 + IBKR API。参见上方自动化示例。
Q4: What's the difference between Strategy and Indicator version? / 策略版和指标版有什么区别?
A: Strategy = backtesting only. Indicator = real-time alerts + automation. Use both: backtest with strategy, trade with indicator.
策略版=仅回测。指标版=实时警报+自动化。两者结合使用:用策略版回测,用指标版交易。
Q5: Why does H2 appear but no trade? / 为什么出现H2但没有交易?
A: This is an indicator, not a strategy. You need to manually place orders or use automation via alerts.
这是指标,不是策略。你需要手动下单或通过警报使用自动化。
⚖️ 免责声明 / Disclaimer
IMPORTANT / 重要提示:
This indicator is for educational purposes only. Trading involves substantial risk of loss. Past performance does not guarantee future results. Always:
本指标仅供教育目的。交易涉及重大亏损风险。历史表现不保证未来结果。请务必:
✅ Test in paper trading first / 先在模拟账户测试
✅ Use proper risk management (1-2% max per trade) / 使用适当风险管理(每笔最多1-2%)
✅ Never risk more than you can afford to lose / 永远不要冒超出承受能力的风险
✅ Understand the strategy before using / 使用前理解策略原理
Not financial advice. Trade at your own risk.
非投资建议。交易风险自负。
Opening Path Selector (EMA200 Context Tool)📝 Description
Opening Path Selector is a context-based indicator designed to help traders quickly identify which asset may offer the cleanest directional path at the market open.
This tool does not generate entry or exit signals.
Its purpose is to reduce decision fatigue during the first minutes of the session by ranking a small set of high-liquidity assets based on higher-timeframe EMA200 structure.
🔍 What this indicator evaluates
The dashboard compares a predefined group of major symbols and ranks them according to:
• Proximity to the nearest EMA200
• Relative position versus higher-timeframe EMA200 levels
• Directional context inferred from EMA structure
The result is a priority-based list that highlights which asset may present:
• Less immediate EMA resistance
• Clearer directional context
• Lower probability of early-session chop
📊 How to read the dashboard
• Priority – Ranking based on opening context
• Symbol – Evaluated instrument
• Nearest EMA200 – Distance and side relative to price
• Possible Path – Direction with less immediate EMA resistance
• Bias – Strength of the higher-timeframe context
Colored markers are used to provide fast visual identification of the highest-priority assets.
⚠️ Important notes
• This is a context and selection tool, NOT a trading system
• No buy/sell signals, alerts, TP, or SL logic are included
• Designed to be used alongside your own execution methodology
🔧 Compatibility
Due to Pine Script multi-symbol and multi-timeframe constraints, this public version is intentionally limited to a small set of symbols.
TradingView Pro / Premium or higher is recommended for consistent performance.
🔗 Complementary tools
This indicator can be complemented with Multi-Tool VWAP + EMAs (Multi-Timeframe) + Key Levels , which provides detailed visibility of multiple EMA levels, VWAP structure, and higher-timeframe reference zones directly on the chart.
While Opening Path Selector helps decide which asset to focus on at the open, the complementary tool can assist with in-chart context and confirmation once an asset has been selected.
Both tools are designed to serve different stages of the decision process and can be used independently.
DCA + VA (Value Averaging) | UA versionDCA + VA (Value Averaging) | UA version
DCA + VA is a practical portfolio simulator for TradingView that compares two long-term investing approaches on any symbol:
• DCA (Dollar-Cost Averaging) — invest a fixed amount on a fixed schedule.
• VA (Value Averaging) — invest (and optionally sell) to keep the invested part of the portfolio close to a target growth path.
The indicator is plotted in a separate lower pane and is designed for realistic capital efficiency analysis, including the effect of cash sitting idle (“cash drag”).
What you see on the chart
• Two thick yellow lines
— DCA line: portfolio value under classic DCA
— VA line: portfolio value under Value Averaging
• Trade dots
— Small green dots : buys
— Small red dots : sells (VA only, if enabled)
• UA table + right-side labels
— key portfolio metrics for both strategies
Core assumptions
• Trades are executed at bar close ( close )
• Dividends and broker commissions are ignored (for now)
• Optional tax logic is available for VA sells: tax is applied to realized profit using average cost basis
Line mode
• Капітал+Кеш (default): shows total portfolio value = holdings + cash (honest “cash drag”)
• Лише капітал : shows holdings value only (invested part)
DCA logic (classic)
Start from Start date .
On each scheduled period ( Week / Month / Half-year / Year ) the script:
• adds the deposit amount to cash
• buys the asset for that amount (if cash is available)
VA logic (Value Averaging)
VA maintains a target value for the invested holdings (asset value only, cash not included ).
On each VA step:
Regular deposit is added to VA cash
Target is updated by period growth g (derived from annual CAGR and selected frequency)
If holdings value is below target → buy using cash (optionally add extra if enabled)
If holdings value is above target and selling is enabled → sell down to target (cash increases; optional profit tax applies)
Target update formula:
Target = Target × (1 + g) + Regular deposit
Optional controls
• Sell excess ( vaSellExcess ): allow sells when above target
• Add extra on drawdowns ( vaAddExtra ): allow additional contributions when cash isn’t enough
• Max extra per period ( vaMaxExtra ): cap extra contributions ( 0 = unlimited )
• Tax on sells ( vaUseTax / vaTaxRate ): apply tax to realized profit (average cost basis)
Table metrics (UA)
For both DCA and VA:
• Накопичено — total contributed cash
• Інвестовано — current invested cost basis
• Кеш — cash balance
• Капітал — portfolio value (based on selected line mode)
• Прибуток % — ROI in percent
• CAGR стратегії — annualized return based on elapsed time
Best use (recommended settings)
• Best timeframe: 1W
Weekly candles make long-term simulations cleaner and more realistic: less noise, fewer “micro” fluctuations, and more stable periodic triggers for DCA/VA steps.
• Recommended workflow:
Set chart timeframe to 1W
Choose deposit frequency (usually Тиждень or Місяць )
Start with Капітал+Кеш to see true cash drag
Compare DCA vs VA using Прибуток % and CAGR (not only absolute $)
• How to interpret results:
— If VA has higher capital but lower ROI %, it usually means you contributed more (extra funding enabled).
— If VA sells rarely, your target path may be aggressive (high CAGR + large deposits), so holdings don’t exceed the target often.
Notes
• If VA shows higher capital but lower profit % , it usually means more total contributions (extra funding enabled).
• Sells can be rare if the target path grows aggressively (high CAGR + large deposits).
Multi-Indicator DashboardMulti-timeframe trading dashboard overlay on your chart. Analyzes Trend, Momentum, Swing, Strength, Direction, Volatility, and delivers a final VIEW (Bullish/Bearish/Flat) across 5 key timeframes. Perfect for quick multi-TF alignment checks! W → D → 2H → 1H → 15M
Features
Color-Coded Cells: Green (Bullish), Red (Bearish), Gray (Neutral).
Historical Mode: Toggle "Enable Historical View" → Slider picks N bars back (chart TF-aware: e.g., 10 bars = 2.5H on 15M).
Yellow vertical line + date label marks the exact bar
Quick Setup
Add to chart → Customize inputs.
Historical: Enable + slide "Bars Back" for past data snapshots.
Views Update Live: Real-time on current/historical bars.
SessionsThis indicator highlights the New York After Hours and Pre-Market session and visually defines its structure on the chart.
The session runs from 18:00 to 09:30 New York time, covering the full overnight and pre-market trading window leading into the regular cash open.
During this period, the script tracks and marks the high and low of the New York pre-market, allowing traders to clearly see the overnight range that often acts as key liquidity, support, and resistance during the regular trading session.
The session range can be displayed as a shaded background or as a high/low range, depending on user preference.
For clarity and precision, the indicator is visible only on intraday timeframes:
5-minute
30-minute
1-hour
This makes it especially useful for futures, index, and intraday traders who incorporate pre-market structure into their trading plans.
Sessions by nolimitCustom Trading Sessions Indicator (6 Sessions)
This indicator allows you to display up to 6 customizable trading sessions on your chart with full control over timing, colors, and timezone settings.
Features:
- 6 independent trading sessions that can be enabled/disabled individually
- Flexible time range settings for each session
- Individual color selection for each session background
- Timezone selection (UTC-12 to UTC+12) that applies to all sessions
- Clean, organized settings grouped by session






















