Pine Version: v6 · License: MIT · Author: WavesUnchained
A collection of custom TradingView indicators built around composable analysis — market structure, trend, momentum, and confluence scoring.
- Open any
.pinefile and copy its contents - In TradingView: Pine Script Editor → Paste → Add to Chart
Scripts marked [RTA] require the RTA libraries to be published to your TradingView account first — see Libraries.
A set of composable indicators — the core three cover trend, pullback, and exhaustion and are designed to be read together. The remaining scripts are more specialized: focused on commodity futures (primarily NatGas 4H), execution timing, and research tooling.
Core
| Script | Focus |
|---|---|
vein_trend.pine |
Trend phase scoring — EMA structure, ADX, regime, composite score |
vein_pullback.pine |
Pullback quality — Fibonacci depth, volume, EMA proximity, micro BOS |
vein_exhaustion.pine |
Exhaustion detection — candle pressure, volume absorption, momentum streaks |
Commodity / NatGas focused
| Script | Focus |
|---|---|
vein_accumulation_phase.pine |
4H bottom formation and accumulation phase detection — 5-component process state |
vein_reversal_score.pine |
Two-layer reversal scoring (setup conditions + structural confirmation) |
vein_structure_zones.pine |
Swing detection, BOS, spring/upthrust, auto S/R zones with lifecycle tracking |
vein_execution.pine |
15m entry timing overlay — micro BOS, sweeps, rejection candles, follow-through |
vein_spread_context.pine |
Commodity futures calendar spread context — bias and momentum modifier, not a signal |
Research / utility
| Script | Focus |
|---|---|
vein_feature_exporter.pine |
Bar-level feature calculation for reversal research — trend, momentum, volume, candle structure |
vein_reversal_labeler.pine |
Historical reversal labeling with forward-looking ATR rules — research and ML labeling only |
→ indicators/trend_direction/vein/README.md — full documentation and layered reading guide
| Script | What it does |
|---|---|
market_structure_advanced.pine |
Swing pivot classification (HH/HL/LH/LL) mapped to a bounded score oscillator — continuous structural bias reading without chart labels |
smc_structure_expectation.pine |
BOS, CHoCH, order blocks, fair value gaps |
wyckoff_schematics.pine |
Wyckoff phases and events — accumulation, distribution, spring, UTAD |
modern_wyckoff_state_machine_visual.pine |
Modern Wyckoff State Machine Lite — locked range, range-bounded A-E phase zones, cause score, quality-graded events and dashboard |
sr_zones_mtf_v2.pine |
Multi-timeframe support and resistance zones |
market_structure_pivot_map.pine |
HTF pivot/CPR/projection map with cross-timeframe confluence zones and nearest-S/R readout — a location tool, not a signal generator |
tweezer_kangaroo_zones.pine |
Tweezer tops/bottoms and kangaroo tails mapped to supply/demand zones |
jma_struct.pine |
JMA entry clusters with Wyckoff and SMC structure context |
time_to_react_volatility_time.pine |
BOS and sweep timing with volatility-adjusted candle coloring |
coilforge_zones_v1.pine |
Compression zone detection with multi-module scoring and post-zone breakout watch |
reversal_engine_score_v1.pine |
Score-based liquidity sweep reversal signals with HTF trend filter and configurable evidence threshold |
reversal_type_classifier_v1.pine |
Ex-post diagnostic: classifies confirmed pivot reversals as Snapback / Grind / Fake / Chop with WT context and R-outcome scoring |
structure_break_risk.pine |
How close the prevailing trend's structure is to breaking, and against which level — an RSI pane with momentum-divergence lines drawn on the RSI (the earliest crack, shown where it is readable), plus a break-level line, a shaded risk zone, a trend-context EMA and word event labels on the price chart, with the 0–100 risk magnitude in a compact, mobile-friendly info label; symmetric top-/bottom-break scoring from five weighted sensors (near level, confirmed BOS, failed breakout, structure erosion, pivot divergence); companion to Trend Persistence Score |
trading_range_state_machine.pine |
Pivot-cluster range detection with an 8-factor weighted range score, driving an Inactive/Building/Confirmed/Mature/Breaking state machine — range lines, midline, touch markers, background heat, ribbon and dashboard |
market_tradability_engine.pine |
Market-quality/no-trade filter — Tradability/Balance/Compression/Direction scores driving a No Trade/Balance/Compression/Ready/Breakout/Trend/Aftermath/Exhaustion state machine; dual-window efficiency, balance boundaries, transition markers, dashboard, and Pine-Log calibration logging for offline threshold tuning |
commodity_heat_reversal.pine |
Score-based mean-reversion reversal signals for commodity futures — ATR distance, expansion, RSI extreme, wick pressure, BB breach |
exhaustion_scanner.pine |
Role-separated overextension context (0–100): Stretch + Exhaustion + Reaction scores, volatility as multiplier, regime classifier framing each signal as Continuation Risk / Trend Exhaustion / Range Fade; per-market presets |
| Script | What it does |
|---|---|
adx_advanced.pine |
ADX with DI± display, pluggable signal smoothing, 4-state histogram, gradient line, and DI crossover / threshold alerts |
regime_classifier.pine |
Stage-1 reversal-pipeline filter — fuses Fractal Dimension, Kaufman Efficiency Ratio and Choppiness into a Trend / Range / Chaos classification with hysteresis, symmetric reversal/trend permission outputs (no triggers) and an optional HTF regime line |
trend_persistence_score.pine |
Graded 0–100 trend-strength oscillator — fuses Regression R², Kaufman Efficiency Ratio, ADX strength+slope and Fractal Dimension into one persistence axis with a Strong/Healthy/Transition/Weak/Dead state, hysteresis, calibration-anchor inputs and visual-only directional context |
bayesian_trend_factor.pine |
Bayesian-inspired trend-quality filter — fuses regression direction, gated ADX/ER/R² strength, aged swing structure and exhaustion risk into a signed −100..+100 Trend Factor plus separate Confidence; volatility is quality-only; trend-state hysteresis, PB/CONT labels with hover explanations and HAMA-style smoothed Trend Candles |
markov_state_engine.pine |
Six-state regime resolution map with an exit-conditional Markov model ("when this regime breaks, where did similar states resolve?") — extremes-first debounced classification, a robust Timing axis (Persistence + coiled-spring Maturity) split from the thin Direction axis, a net resolution line whose fill encodes Reliability, a hysteresis Bias and Reversal/Breakout/Continuation-typed edges |
market_memory_decay_oscillator.pine |
Signed Carry/Decay oscillator fusing autocorrelation half-life, Hurst exponent approximation, path efficiency and range expansion/decay into one read on how long the current impulse is likely to persist before mean-reverting |
regime_transition_engine.pine |
Seven-state regime classifier (Noise/Compression/Expansion/Trend Up/Down/Exhaustion/Reversion) with dwell+hysteresis debouncing and a directional Transition Pressure oscillator reading how close the active state is to flipping into its natural successor |
predictability_regime_index.pine |
Signed −100..+100 index fusing Variance Ratio, return autocorrelation, Hurst exponent approximation and fractal efficiency into a Momentum / Reversion / Noise / Mixed regime read, with a Confidence output combining reading strength and sensor agreement |
market_state_engine.pine |
Score-arbitrated context engine with orthogonal structure/energy/location axes, efficient impulse memory, four-level directional context, Auction Pressure, and acceptance-based Balance/Compression zone breakouts |
commodity_pulse_matrix_v3.pine |
Multi-timeframe confluence scoring matrix across instruments — published on TradingView |
signal_quality_engine.pine |
Range-fade signal engine — fades exhausted range edges (long the lows, short the highs) via a Distance+Structure+Momentum exhaustion score, with an Edge → Setup → Watch → Trigger read and candle-rejection confirmation |
regime_detector.pine |
MA-zone based trend regime overlay |
ma_regime_bands.pine |
Moving average regime classification bands |
relative_leg_efficiency.pine |
Efficiency ratio per price leg — how directional each move is |
auto_trendlines.pine |
Combinatorial trendline detection with OLS refinement, quality scoring, and greedy selection |
chandelier_flip_radar.pine |
ATR trailing stop with five-level trend state — progressive bar coloring, trap markers, body-filtered flips, optional MTF confluence |
smooth_trend_radar.pine |
Double-smoothed Supertrend baseline — auto-scaled per timeframe, ATR-scaled slope trend detection with hysteresis, live baseline rejections in both regimes, statistical overextension via candle coloring, automatic SL/TP setup on flips |
adaptive_arithmetic_candles.pine |
Efficiency-adaptive candle transform with a regression-anchored body boost and a 0-100 Trend Quality Score; flips are early warnings, Long/Short signals require a strong-state breakout of the prior N bars' high/low |
modern_trend_regime.pine |
Trend / Range / Transition regime — both sides scored via factors (not AND-chains) from ADX, efficiency ratio, DI, line stack, price and structure compression, with immediate transition on structure loss; trend confirmation fires on the regime change itself (not the raw crossover), plus a frozen swing-based range structure (one-shot breakouts, debounced reactions) and a time-aligned "price vs. structure preview" breakout marker; six tuned presets plus manual mode |
| Script | What it does |
|---|---|
atr_advanced.pine |
ATR in four display modes (Raw, ATR%, Normalized, Percentile Rank) with pluggable smoothing, gradient visualization, and expansion/contraction signals |
compression_fractal_release.pine |
Detects a compressed corrective coil inside an HTF trend and trades its release; band break is the trigger, coil strength + release dynamics are scored, choppiness vetoes low-quality breaks; classifies Release (with trend) vs Base Break (against trend) |
williams_vix_fix_advanced.pine |
Synthetic fear gauge (Williams VIX Fix) — mirrored Bull/Bear WVF, StdDev/percentile spike bands, per-side stall/absorption, Spike Quality, Reclaim signal, Sentiment Bar dominance score, gradient coloring |
| Script | What it does |
|---|---|
cci_advanced.pine |
CCI with pluggable smoothing, three scale modes, OB/OS extreme-zone filter, gradient line, shadow fills, and Sentiment Bar/Signal Quality scoring |
fisher_transform_advanced.pine |
Fisher Transform with reversal-heavy extreme reads, trend context, stall/absorption markers, cross conviction, divergence wedge, and Sentiment Bar/Signal Quality scoring |
roc_advanced.pine |
Percentage Rate of Change with momentum-stretch zones, trend context, stall/absorption markers, cross conviction, divergence wedge, and Sentiment Bar/Signal Quality scoring |
rsi_advanced.pine |
RSI with smoothed signal, trend context, stall/absorption markers, cross conviction, divergence wedge, long/short directional coloring, and Sentiment Bar/Signal Quality scoring |
stoch_rsi_advanced.pine |
Stoch RSI K/D with trend context, stall/absorption markers, cross conviction, divergence wedge, long/short directional coloring, and Sentiment Bar/Signal Quality scoring |
tsi_advanced.pine |
True Strength Index with clean signal crosses, trend context, stall/absorption markers, cross conviction, divergence wedge, and Sentiment Bar/Signal Quality scoring |
wavetrend.pine |
WaveTrend oscillator — cross signals, divergence, overextension duration, slope quality filter, zone persistence |
wavetrend_advanced_smoothing.pine |
WaveTrend with 8 pluggable smoothing kernels, gradient line coloring, shadow fills, 4-state histogram, configurable scale modes, and a Sentiment Bar |
williams_r_advanced.pine |
Williams %R normalized to 0-100 with fast extreme reads, trend context, stall/absorption markers, cross conviction, divergence wedge, and Sentiment Bar/Signal Quality scoring |
commodity_flow_trend.pine |
MFI + CCI composite oscillator for commodities — 4-state flow background, extreme-zone reversal signals, optional CCI gate, normalized CCI overlay |
mtf_wavetrend_opportunity_hunter.pine |
MTF confluence pane — net score histogram + heat ribbons per layer, RRG-style rotation map, Ehlers Ultimate Smoother core, entropy noise floor, persistent TP/SL zones on the price chart |
mtf_wavetrend_confluence.pine |
Tide / Wave / Ripple — WaveTrend across three fixed horizons; the Ripple cross on your chart TF is the signal, graded 0–5 by extreme depth + Wave/Tide/Stoch agreement (never gated), with Reversal/Continuation read and two-tier Watch→Signal alerts |
market_stress_oscillator.pine |
Composite stress index — WVF with JMA and ADX filters |
market_exhaustion.pine |
Exhaustion signals via MFI and StochRSI with divergence detection |
oscillator_divergence_zones.pine |
Oscillator divergence zones — RSI, CCI, MFI, Fisher, TSI, STC, DPO, Roofing, Cyber Cycle; regular + hidden; ATR-wide zones with retest counter |
market_pressure_scale.pine |
Dual-component oscillator — Setup Pressure (coiling) vs Impulse Pressure (expansion), Range Chop Filter, Move Strength gauge, DMI-free Reversal signal, phase labels and Action-readout dashboard |
mtf_stochrsi_pair_score.pine |
Multi-timeframe StochRSI confluence scorer — pair-weighted with sync bonus and conflict penalty, weighted total, Bias/Quality/Timing state-engine readout, signal markers |
| Script | What it does |
|---|---|
volume_strata.pine |
Fixed-range volume profile — right-anchored bars, POC, VAH/VAL, HVN/LVN zones, naked POC tracking |
money_flow_delta_profile.pine |
Center-out diverging profile — green (right) = net buying, red (left) = net selling at each price level; POC, Value Area, optional recency weighting |
mfi_advanced.pine |
MFI with smoothed signal, no-volume fallback, trend context, stall/absorption markers, divergence wedge, long/short directional coloring, and Sentiment Bar/Signal Quality scoring |
vwap_cross_visuals.pine |
VWAP with multi-band deviation analysis |
anchored_vwap.pine |
Stage-4 fair-value location sensor — VWAP anchored to swing pivot / session / period / manual date, volume-weighted σ bands, distance-from-value in σ as a symmetric Location output (no triggers) |
midas_curves.pine |
MIDAS 2.0 — anchored MIDAS support/resistance curve (launch-anchored VWAP) plus a true topfinder/bottomfinder accelerated curve with closed-form auto-fit that forecasts trend exhaustion (d/D progress); Location + Exhaustion sensor, context markers not entries |
liquidity_hunter.pine |
Ranked equal highs/lows — quality-scored BSL/SSL levels, sweep markers, reclaim detection with event scoring |
| Script | What it does |
|---|---|
zigzag_patterns_framework.pine |
ZigZag-based pattern detection — ABC, triangles, Wolfe waves |
zigzag_fibo_pullback_map.pine |
Confirmed ZigZag pivots with pullback-to-Fibonacci labeling and active fib fan |
elliott_wave_radar.pine |
Rule-validated Elliott Wave counting — labels impulses/ABC only when hard EW rules hold, Fib-scored, with target projections and invalidation watch |
wolfe_wave_scanner_pro.pine |
Dedicated 5-point Wolfe Wave scanner — best-of-window swing search, weighted 0-100 score, EPA target from the true 1-3/2-4 apex, multi-pattern tracking, live invalidation tracking, score-breakdown debug table |
triangle_compression_scanner_pro.pine |
Sliding-window triangle scanner (symmetric/ascending/descending) — boundary lines fit to a swing window, weighted 0-100 score, multi-pattern tracking, live breakout resolution |
broadening_wedge_scanner_pro.pine |
Sliding-window broadening wedge scanner (descending/ascending/symmetric broadening) — expansion-based sibling to the triangle scanner, weighted 0-100 score, multi-pattern tracking, live breakout resolution |
| Script | What it does |
|---|---|
relative_strength_line.pine |
RS vs. a benchmark (SPY/QQQ) — Mansfield RS oscillator or raw RS line, with the IBD leadership signal (RS new high before price). See MOMENTUM_EQUITIES.md for the equities roadmap |
Most strategy files are auto-generated from indicator source files via scripts/build_strategies.py — do not edit those directly. The WaveTrend v4 strategy is standalone and maintained by hand. Each strategy adds a trade direction filter, confirmed-bar gate, cooldown, and optional break-even stop on top of the indicator logic.
python3 scripts/build_strategies.py # rebuild all
python3 scripts/build_strategies.py indicators/trend_direction/chandelier_flip_radar/| Strategy | Based on | SL type | Backtest rating |
|---|---|---|---|
chandelier_flip_radar_strategy.pine |
Chandelier Flip Radar | Trailing | Promising (PF 1.60, NatGas 4H) |
oscillator_divergence_zones_strategy.pine |
Oscillator Divergence Zones | Pivot ATR | Promising (PF 1.14, NatGas 4H) |
smooth_trend_radar_strategy.pine |
Smooth Trend Radar | Fixed TP | Promising (PF 1.71 Long, NatGas 4H) |
wavetrend_v4_strategy.pine |
WaveTrend v4 | Trailing | Promising (PF 3.07, NatGas 1D — best in repo) |
Full backtest results and parameter notes: strategies/<name>/<name>_strategy_assessment.md. Schema: strategies/ASSESSMENT_SCHEMA.md.
A serious attempt at a reusable Pine Script foundation for MTF analysis, market structure, and strategy execution. The architecture is solid but the project was not completed. Kept here for reference; not actively maintained.
To use [RTA]-tagged scripts, publish each library via Pine Script Editor → Publish Script → Library using the exact name from the library() declaration.
| Library | Covers |
|---|---|
RTAFramework.pine |
Core MTF framework, signal engine, risk management |
RTAMarketStructure.pine |
Volume profile, VWAP, zones, SMC concepts |
RTAAdvanced.pine |
Divergence, Fibonacci, pattern geometry |
RTAStrategy.pine |
Strategy execution, position sizing, analytics |
RTALiquidity.pine |
Liquidity mapping, order flow, Wyckoff |
RTAMonitoring.pine |
Debug utilities, metrics, health monitoring |
These scripts are for educational and informational purposes only. Not financial advice. Trading involves substantial risk of loss.