OPEN-SOURCE SCRIPT

LEGEND IsoPulse Fusion • Universal Volume Trend Buy Sell Radar

166
LEGEND IsoPulse Fusion • Universal Volume Trend Buy Sell Radar


One line summary
LEGEND IsoPulse Fusion reads intent from price and volume together, learns which features matter most on your symbol, blends them into a single signed Fusion line in a stable unit range, and emits clear Buy Sell Close events with a structure gate and a liquidity safety gate so you act only when the tape is favorable.

What this script is and why it exists
Many traders keep separate windows for trend, volume, volatility, and regime filters. The result can feel fragmented. This script merges two complementary engines into one consistent view that is easy to read and simple to act on.

  • LEGEND Tensor estimates directional quality from five causally computed features that are normalized for stationarity. The features are Flow, Tail Pressure with Volume Mix, Path Curvature, Streak Persistence, and Entropy Order.
  • IsoPulse transforms raw volume into two decaying reservoirs for buy effort and sell effort using body location and wick geometry, then measures price travel per unit volume for efficiency, and detects volume bursts with a recency memory.


Both engines are mapped into the same unit range and fused by a regime aware mixer. When the tape is orderly the mixer leans toward trend features. When the tape is messy but a true push appears in volume efficiency with bursts the mixer allows IsoPulse to speak louder. The outcome is a single Fusion line that lives in a familiar range with calm behavior in quiet periods and expressive pushes when energy concentrates.

What makes it original and useful

  • Two reservoir volume split. The script assigns a portion of the bar volume to up effort and down effort using body location and wick geometry together. Effort decays through time using a forgetting factor so memory is present without becoming sticky.
  • Efficiency of move. Price travel per unit volume is often more informative than raw volume or raw range. The script normalizes both sides and centers the efficiency so it becomes signed fuel when multiplied by flow skew.
  • Burst detection with recency memory. Percent rank of volume highlights bursts. An exponential memory of how recently bursts clustered converts isolated blips into useful context.
  • Causal adaptive weighting. The LEGEND features do not receive static weights. The script learns, causally, which features have correlated with future returns on your symbol over a rolling window. Only positive contributions are allowed and weights are normalized for interpretability.
  • Regime aware fusion. Entropy based order and persistence create a mixer that blends IsoPulse with LEGEND. You see a single line rather than two competing panels, which reduces decision conflict.


How to read the screen in seconds

  • Fusion area. The pane fills above and below zero with a soft gradient. Deeper fill means stronger conviction. The white Fusion line sits on top for precise crossings.
  • Entry guides and exit guides. Two entry guides draw symmetrically at the active fused entry level. Two exit guides sit inside at a fraction of the entry. Think of them as an adaptive envelope.
  • Letters. B prints once when the script flips from flat to long. S prints once when the script flips from flat to short. C prints when a held position ends on the appropriate side. T prints when the structure gate first opens. A prints when the liquidity safety flag first appears.
  • Price bar paint. Bars tint green while long and red while short on the chart to mirror your virtual position.
  • HUD. A compact dashboard in the corner shows Fusion, IsoPulse, LEGEND, active entry and exit levels, regime status, current virtual position, and the vacuum z value with its avoid threshold.


What signals actually mean

  • Buy. A Buy prints when the Fusion line crosses above the active entry level while gates are open and the previous state was flat.
  • Sell. A Sell prints when the Fusion line crosses below the negative entry level while gates are open and the previous state was flat.
  • Close. A Close prints when Fusion cools back inside the exit envelope or when an opposite cross would occur or when a gate forces a stop, and the previous state was a hold.
  • Gates. The Trend gate requires sufficient entropy order or significant persistence. The Avoid gate uses a liquidity vacuum z score. Gates exist to protect you from weak tape and poor liquidity.


Inputs and practical tuning
Every input has a tooltip in the script. This section provides a concise reference that you can keep in mind while you work.

Setup
  • Core window. Controls statistics across features. Scalping often prefers the thirties or low fifties. Intraday often prefers the fifties to eighties. Swing often prefers the eighties to low hundreds. Smaller responds faster with more noise. Larger is calmer.
  • Smoothing. Short EMA on noisy features. A small value catches micro shifts. A larger value reduces whipsaw.


Fusion and thresholds
  • Weight lookback. Sample size for weight learning. Use at least five times the horizon. Larger is slower and more confident. Smaller is nimble and more reactive.
  • Weight horizon. How far ahead return is measured to assess feature value. Smaller favors quick reversion impulses. Larger favors continuation.
  • Adaptive thresholds. Entry and exit levels from rolling percentiles of the absolute LEGEND score. This self scales across assets and timeframes.
  • Entry percentile. Eighty selects the top quintile of pushes. Lower to seventy five for more signals. Raise for cleanliness.
  • Exit percentile. Mid fifties keeps trades honest without overstaying. Sixty holds longer with wider give back.
  • Order threshold. Minimum structure to trade. Zero point fifteen is a reasonable start. Lower to trade more. Raise to filter chop.
  • Avoid if Vac z. Liquidity safety level. One point two five is a good default on liquid markets. Thin markets may prefer a slightly higher setting to avoid permanent avoid mode.


IsoPulse
  • Iso forgetting per bar. Memory for the two reservoirs. Values near zero point nine eight to zero point nine nine five work across many symbols.
  • Wick weight in effort split. Balance between body location and wick geometry. Values near zero point three to zero point six capture useful behavior.
  • Efficiency window. Travel per volume window. Lower for snappy symbols. Higher for stability.
  • Burst percent rank window. Window for percent rank of volume. Around one hundred to three hundred covers most use cases.
  • Burst recency half life. How long burst clusters matter. Lower for quick fades. Higher for cluster memory.
  • IsoPulse gain. Pre compression gain before the atan mapping. Tune until the Fusion line lives inside a calm band most of the time with expressive spikes on true pushes.
  • Continuation and Reversal guides. Visual rails for IsoPulse that help you sense continuation or exhaustion zones. They do not force events.


Entry sensitivity and exit fraction
  • Entry sensitivity. Loose multiplies the fused entry level by a smaller factor which prints more trades. Strict multiplies by a larger factor which selects fewer and cleaner trades. Balanced is neutral.
  • Exit fraction. Exit level relative to the entry level in fused unit space. Values around one half to two thirds fit most symbols.


Visuals and UX
  • Columns and line. Use both to see context and precise crossings. If you present a very clean chart you can turn columns off and keep the line.
  • HUD. Keep it on while you learn the script. It teaches you how the gates and thresholds respond to your market.
  • Letters. B S C T A are informative and compact. For screenshots you can toggle them off.
  • Debug triggers. Show raw crosses even when gates block entries. This is useful when you tune the gates. Turn them off for normal use.


Quick start recipes

Scalping one to five minutes
  1. Core window in the thirties to low fifties.
  2. Horizon around five to eight.
  3. Entry percentile around seventy five.
  4. Exit fraction around zero point five five.
  5. Order threshold around zero point one zero.
  6. Avoid level around one point three zero.
  7. Tune IsoPulse gain until normal Fusion sits inside a calm band and true squeezes push outside.


Intraday five to thirty minutes
  1. Core window around fifty to eighty.
  2. Horizon around ten to twelve.
  3. Entry percentile around eighty.
  4. Exit fraction around zero point five five to zero point six zero.
  5. Order threshold around zero point one five.
  6. Avoid level around one point two five.


Swing one hour to daily
  1. Core window around eighty to one hundred twenty.
  2. Horizon around twelve to twenty.
  3. Entry percentile around eighty to eighty five.
  4. Exit fraction around zero point six zero to zero point seven zero.
  5. Order threshold around zero point two zero.
  6. Avoid level around one point two zero.


How to connect signals to your risk plan
This is an indicator. You remain in control of orders and risk.

  • Stops. A simple choice is an ATR multiple measured on your chart timeframe. Intraday often prefers one point two five to one point five ATR. Swing often prefers one point five to two ATR. Adjust to symbol behavior and personal risk tolerance.
  • Exits. The script already prints a Close when Fusion cools inside the exit envelope. If you prefer targets you can mirror the entry envelope distance and convert that to points or percent in your own plan.
  • Position size. Fixed fractional or fixed risk per trade remains a sound baseline. One percent or less per trade is a common starting point for testing.
  • Sessions and news. Even with self scaling, some traders prefer to skip the first minutes after an open or scheduled news. Gate with your own session logic if needed.


Limitations and honest notes

  • No look ahead. The script is causal. The adaptive learner uses a shifted correlation, crosses are evaluated without peeking into the future, and no lookahead security calls are used. If you enable intrabar calculations a letter may appear then disappear before the close if the condition fails. This is normal for any cross based logic in real time.
  • No performance promises. Markets change. This is a decision aid, not a prediction machine. It will not win every sequence and it cannot guarantee statistical outcomes.
  • No dependence on other indicators. The chart should remain clean. You can add personal tools in private use but publications should keep the example chart readable.
  • Standard candles only for public signals. Non standard chart types can change event timing and produce unrealistic sequences. Use regular candles for demonstrations and publications.



Internal logic walkthrough

LEGEND feature block
  • Flow. Current return normalized by ATR then smoothed by a short EMA. This gives directional intent scaled to recent volatility.
  • Tail pressure with volume mix. The relative sizes of upper and lower wicks inside the high to low range produce a tail asymmetry. A volume based mix can emphasize wick information when volume is meaningful.
  • Path curvature. Second difference of close normalized by ATR and smoothed. This captures changes in impulse shape that can precede pushes or fades.
  • Streak persistence. Up and down close streaks are counted and netted. The result is normalized for the window length to keep behavior stable across symbols.
  • Entropy order. Shannon entropy of the probability of an up close. Lower entropy means more order. The value is oriented by Flow to preserve sign.
  • Causal weights. Each feature becomes a z score. A shifted correlation against future returns over the horizon produces a positive weight per feature. Weights are normalized so they sum to one for clarity. The result is angle mapped into a compact unit.


IsoPulse block
  • Effort split. The script estimates up effort and down effort per bar using both body location and wick geometry. Effort is integrated through time into two reservoirs using a forgetting factor.
  • Skew. The reservoir difference over the sum yields a stable skew in a known range. A short EMA smooths it.
  • Efficiency. Move size divided by average volume produces travel per unit volume. Normalization and centering around zero produce a symmetric measure.
  • Bursts and recency. Percent rank of volume highlights bursts. An exponential function of bars since last burst adds the notion of cluster memory.
  • IsoPulse unit. Skew multiplied by centered efficiency then scaled by the burst factor produces the raw IsoPulse that is angle mapped into the unit range.


Fusion and events
  • Regime factor. Entropy order and streak persistence form a mixer. Low structure favors IsoPulse. Higher structure favors LEGEND. The blend is convex so it remains interpretable.
  • Blended guides. Entry and exit guides are blended in the same way as the line so they stay consistent when regimes change. The envelope does not jump unexpectedly.
  • Virtual position. The script maintains state. Buy and Sell require a cross while flat and gates open. Close requires an exit or force condition while holding. Letters print once at the state change.



Disclosures
This script and description are educational. They do not constitute investment advice. Markets involve risk. You are responsible for your own decisions and for compliance with local rules. The logic is causal and does not look ahead. Signals on non standard chart types can be misleading and are not recommended for publication. When you test a strategy wrapper, use realistic commission and slippage, moderate risk per trade, and enough trades to form a meaningful sample, then document those assumptions if you share results.



Closing thoughts
Clarity builds confidence. The Fusion line gives a single view of intent. The letters communicate action without clutter. The HUD confirms context at a glance. The gates protect you from weak tape and poor liquidity. Tune it to your instrument, observe it across regimes, and use it as a consistent lens rather than a prediction oracle. The goal is not to trade every wiggle. The goal is to pick your spots with a calm process and to stand aside when the tape is not inviting.

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.