Skip to main content
Trading Module

See on TradingView

Open the Trading Module on TradingView. Current version: v2.0.1.

What This Script Is

The Trading Module is a single overlay that bundles the components of a real discretionary process: a directional bias filter, a timing engine, a risk framework, a multi-symbol watchlist, and a price-action layer. Every module is independently switchable, so you can run it as a clean trend-follower, a structure-driven execution chart, or a watchlist scanner - without juggling multiple scripts. It is intentionally not a “buy/sell arrow” tool. The script’s job is to keep five questions answered at all times:
  1. What direction am I biased toward? (Trend)
  2. Is now a moment worth engaging? (Impulse)
  3. Where is the idea wrong? (Stop Loss)
  4. What else in my universe is doing the same thing? (Screener)
  5. Where on the chart actually matters? (Structure, FVGs, Order Blocks, S/R)

Module Map

Trend Model

Direction filter - 5 selectable engines from a composite multi-factor model down to a simple EMA cross.

Impulse Model

Timing engine - flags expansion / pressure events with 𝕃 (engage) and (cash) labels.

Stop Loss

Three structural risk frameworks - volatility, fixed-percent, or bar-to-bar invalidation.

RSI Screener

10-slot multi-symbol multi-timeframe RSI watchlist, gradient-colored by strength.

Market Structure

Independent swing and internal pivot tracking with BOS / MSB / MSB+ tagging.

Volumetric Order Blocks

Pivot-anchored OB zones with internal buy/sell volume split and relevance %.

Fair Value Gaps

Multi-timeframe imbalance boxes with mid-line and right-extension.

Volumetric S/R

High-volume pivot-based support/resistance with touch counting and auto-cleanup on break.

Reversal Bands (NEW)

Volatility-and-percentile bands for top finding, dip hunting, and exhaustion detection.

Trend Models

The Trend Model is your bias filter. The script ships five engines so you can pick the one whose behavior matches the asset and timeframe you trade. Only one is active at a time.
Treat the trend model as a regime filter, not a signal. Long bias = filter shorts, look for impulse longs. Short bias = the inverse.

Impulse Models

Impulse is the timing layer. It is decoupled from trend on purpose - a market can be trending without currently impulsing, and impulses can occur counter-trend (where they’re useful as warnings rather than entries). Both impulse engines share the same scoring core: a current oscillator value is compared against many of its own historical bars at once and counted into a single score. The score crosses a long threshold to print 𝕃, and crosses a short threshold to print (cash). This makes them more selective than a raw oscillator cross. Labels you’ll see:
  • 𝕃 (long) - the impulse score flipped above the long threshold.
  • (cash) - the impulse score crossed under the short threshold; treat as exit / stand-aside, not necessarily an active short.
Counter-trend impulses are not invalid signals - they’re early-warning events. Use them to take profits or tighten stops, not to fight the trend model.

Stop Loss Frameworks

Three independent risk-overlay styles. None of them are “the” stop - they’re visual frameworks for structuring invalidation.
Stops belong where the trade idea is wrong, not where you start to feel pain. If you take entries from impulses, your stop has to be wide enough to survive impulse-volatility, not just last-bar noise.

RSI Screener

A built-in multi-symbol, multi-timeframe RSI watchlist that draws as a stacked overlay on the right side of your chart - no extra panes, no second tab. What you control:
  • 10 symbol slots with sensible crypto majors as defaults; each slot can be swapped to any TradingView ticker.
  • Per-slot timeframe (empty = current chart timeframe). Mix HTF and LTF reads in the same screener.
  • RSI length and a configurable midline threshold (default 50) used as the bull/bear divider.
  • Gradient coloring: when enabled, each row interpolates between long and short colors based on its RSI value (20 → 80 range), so you read strength by hue rather than just reading numbers.
  • Label size and X/Y offsets for fitting the screener cleanly into your layout.
How to read it:
  • Read the midline crosses, not the OB/OS extremes - RSI > midline = bull regime, < midline = bear regime.
  • Stack a higher-timeframe slot on top for regime, lower-timeframe slots below for timing within that regime.
  • Use the screener as context, not a trade trigger.
Each slot is a request.security() call. Heavy use on lower-end machines may impact load time - disable slots you don’t actively watch.

Market Structure

Tracks pivots and prints structural events as labels on the chart. Two independent layers: Swing (slower, macro) and Internal (faster, intra-trend). Each has its own lookback. Events plotted: Configurable per layer:
  • Display mode: All / MSB / MSB+ / BOS / None - show only what you care about.
  • Independent lookback: swing default 50, internal default 5.
  • Independent bull/bear colors and line styles (Solid / Dashed / Dotted).
Use it for:
  • Swing layer → confirm the larger regime (does the trend model align with structural reality?).
  • Internal layer → time entries inside the swing regime.

Volumetric Order Blocks

Order Blocks (OBs) are pivot-anchored zones that mark where the last opposite-direction candle pushed the move that created a structural pivot. The Trading Module’s OB engine adds volume context so you can tell apart “a textbook OB” from “an OB the market actually traded heavily through.” Anatomy of each OB box: Detection & filtering:
  • Filtering - restrict OB creation to break events of a specific type (None, BOS, MSB, MSB+).
  • Mitigation - choose how an OB gets considered “used up”: Absolute (full body breach) or Middle (mid-line breach).
  • Hide Overlap - when two OBs overlap, the engine keeps either the more recent or earlier one (default: keep previous), so the chart doesn’t clutter with stacked duplicates.
  • OB count - how many active OBs to keep on chart at once.
  • Swing OBs - optional separate set of OBs anchored to swing structure rather than internal structure.
  • Grayscale mode - desaturate the OBs if you’d rather use color for other modules.
An OB with a high relevance % and an internal metric that agrees with the OB direction (buy metric dominant inside a bull OB) is doing real work. An OB whose internal metric disagrees with its direction is already losing its edge before price even returns.

Fair Value Gaps (FVGs)

Three-bar imbalance boxes - places where price moved fast enough that the candle in the middle did not overlap with its neighbors. The script draws them as zones and adds a mid-line for partial fills. Controls:
  • Enable - toggle FVGs on/off (off by default).
  • Show Last - cap of how many recent FVGs to display (default 5).
  • Timeframe - detect FVGs on a different timeframe than your chart (e.g. mark 1H FVGs on a 5m chart). Empty = chart timeframe.
  • Extend - how many bars to project the FVG box into the future.
  • Bull/Bear color - both default to a soft tint of your long color so the chart doesn’t fight your other modules; you can override.
Interpretation:
  • An FVG is an area of interest, not a trade by itself. Many traders use them as targets (price likes to revisit unfilled imbalances) or as decision zones for entry/rejection.
  • The engine auto-removes an FVG once price closes through it from the wrong side - so what’s on the chart is always still active.

Volumetric Support & Resistance

A pivot-based S/R engine that only respects pivots confirmed by elevated volume. Plain pivots are ignored - the level has to be earned. Detection logic: What each box shows:
  • A box around the level with thickness scaled to ATR (so the zone is visually proportionate to volatility).
  • Border thickness - high-volume levels get a thicker border, so the chart highlights the zones built on the most participation.
  • Touch counter - every time price comes back into the zone, the touch count goes up. Repeat tests are more meaningful than one-and-done levels.
  • Volume text - optionally displayed inside the box (or beside it).
  • Right-extend - toggle whether levels project into future bars.
Pair volumetric S/R with the impulse model: an 𝕃 printing at a high-volume support that has multiple touches is much higher quality than the same 𝕃 printing in open air.

Reversal Bands

NEW in v2.0.1
A volatility-aware band system designed for top finding, dip hunting, and local exhaustion. It combines two ideas:
  1. A percentile envelope - the script tracks where the source has historically traded within a configurable lookback (default 200 bars, 95th percentile) and uses that as a “stretched” anchor.
  2. A volatility-multiplied deviation band - built off a baseline length (default 50) and a volatility length (default 53), then scaled by a multiplier (default 3.1×).
Together, they highlight price behaving extremely relative to its own recent regime - not just “above an SMA.” Inputs you’ll touch most: How to read it:
  • Price tagging the upper band in conditions of strong trend = late-cycle caution / take-profit zone, not a blind short.
  • Price tagging the lower band with weakening down-impulse = high-quality dip-hunt context.
  • Use it as a filter on top of impulse signals: an near the upper band is more meaningful than an mid-range.

Core Philosophy

This indicator is not “one model to rule them all.” It exists to let you build a process where each layer answers exactly one question: If you only use one layer, you’re discarding most of the edge the script is designed to build. The strength is in confluence and filtering - multiple modules agreeing on the same idea at the same place.

Suggested Presets

Preset A - Clean Trend Following

  • Trend: Universal Trend+ or DEMA ATR
  • Impulse: BBPct FL or DM Enhanced
  • Stop Loss: Dynamic
  • Structure / FVG / OB: Off
  • Screener: On (high TF)

Preset B - Execution & Structure

  • Trend: Hull Trend or Universal Trend+
  • Impulse: On
  • Market Structure: Swing + Internal
  • FVG + Volumetric Order Blocks: On
  • Stop Loss: Dynamic or Bar-to-Bar

Preset C - Watchlist Scanner

  • Screener: On (10 slots, mixed TFs)
  • Minimal chart overlays
  • Reversal Bands: On for context
  • Drill into individual charts when alignment shows up

Quick Input Map

Version History

v2.0.1 - Latest

  • Added Reversal Bands with volatility-adjusted percentile calculations.
  • New reversal signals (Green for Dip, Red for Top).
  • 7 new inputs for band sensitivity calibration.
  • Bug fixes for calculation errors.
  • Larger lookback without losing calculation time.

v1.1.0

  • Added Hull Trend model.
  • Static screener color option (inverse of chart background).
  • Volumetric S/R on/off toggle.
  • Improved Market Structure inputs.
  • Enhanced Order Block plotting with internal buy/sell volume metric.
  • Significant runtime improvement.
  • Temporary removal of alerts().

Final Notes

This is a full visual decision-support overlay for discretionary traders who want trend, timing, structure, and watchlist scanning in one place. Use it to build a repeatable process, then validate that process with proper testing and journaling before risking real capital.
This is a heavy script when many modules are enabled - it draws live objects and requests multiple symbols. Not every combination is optimal for every market or timeframe; the modules are deliberately independent so you can disable what you’re not using.