OPEN-SOURCE SCRIPT
Transformer Flux Dashboard

Here’s a practical guide to what your Transformer Flux Dashboard does and how to use it.
What it is
A compact, two-column trading dashboard + signal pack that blends trend, MACD, and OBV into one view (“Flux Score”) and adds session awareness (pre-sessions and main sessions in Eastern time). It’s designed for regular candles by default and avoids repaint by letting you confirm on bar close.
Core pieces it calculates
Moving Averages
Two MAs: Fast (HMA/EMA) and Slow (HMA/EMA).
You choose length, line width, color, and transparency.
Trend engine (Strict/Lenient)
Uses the relation between Fast/Slow MA and a debounced fast-MA slope filter (slope > ATR×buffer).
Strict: requires fast>slow and slow rising (or the inverse for down).
Lenient: fast>slow or slow rising (or the inverse).
A confirmation window (bars) must hold true before trend flips. That window can be auto-tuned by session (Asia/London/NY) or set globally.
OBV confirmation (optional)
OBV smoothed by SMA; needs to be rising/falling for N bars (also session-aware if you enable presets).
MACD
Standard MACD Fast/Slow/Signal; the dashboard shows Bull ▲, Bear ▼ or Flat based on line vs signal.
Flux Score (top row)
A composite, smoothed gauge from 0–100:
40% Trend, 30% MACD, 30% OBV → EMA(3) smoothed.
Labels: Bullish ≥ 70, Bearish ≤ 30, otherwise Neutral.
Summary line explains why (e.g., “MACD↑, OBV↑, Trend up”).
Sessions & zones (Eastern/NY time)
Recognizes Asia / London / New York main sessions and pre-sessions using your chart’s Eastern time.
Session label (top of chart): text is white; background auto-matches the current session color (or your manual color).
Zone backgrounds (optional): off by default; when on, default transparency ≈ 95% (very light), with separate colors for each session and pre-session. A toggle lets you draw pre-session on top or beneath main sessions.
Signals & markers
Two strength tiers: Strong (Trend + OBV + MACD aligned) and Weak (2 of the 3 agree).
To reduce clutter, markers only appear on direction shifts (from last visible direction to a new one), and you can enforce a minimum bar gap.
Marker style:
Default Icons with LabelUp/LabelDown (tiny).
Colors: strong long = bright white by default; others configurable.
Weak markers are slightly offset from price using ATR so they don’t overlap wicks.
Dashboard (2-column)
Left column = label, right column = value:
Flux Score: numeric + Bullish/Neutral/Bearish tag.
Summary: short reason of the score.
Trend: UP / DOWN / FLAT (cell tinted green/red/gray).
MACD: Bull ▲ / Bear ▼ / Flat (tinted).
Signal: last printed signal + bar age (fresh signals get a lighter tint).
MA: slow MA type/length and up/down arrow.
Sess: current session label (e.g., “Pre-London”, “New York”).
VIX / VXN (optional): shows current value.
Auto tint: based on calm/watch/elevated thresholds (you control levels and colors).
Manual tint: fixed BG color if you prefer consistency.
Params: “P”=trend bars, “O”=OBV bars, mode (Strict/Lenient), and “Candles”.
You can set a global Default Transparency for the dashboard cells.
Key settings to know
Confirm On Close: when on (default), trend/OBV/MACD states use the last confirmed bar; this avoids mid-bar flicker and reduces repaint risk.
Session presets: when enabled, the number of bars required for confirmations tightens/loosens per session (e.g., Asia uses more bars than NY).
Colors & Opacity:
MA lines have their own transparency (default 0 = fully opaque).
Dashboard cells use a single global transparency (default 40%).
Session zones default to very light (95%) and are off by default.
VIX/VXN cells can auto-color by regime or use a manual background.
Markers:
“Icons” vs “Ticks.” Default is Icons with tiny labels up/down.
“Shift only” display reduces noise; you can also set min bar spacing.
How to read it (quick workflow)
Flux Score row: a fast “risk-on/off” gauge.
≥70 with green Trend/MACD cells → higher-conviction long context.
≤30 with red Trend/MACD cells → higher-conviction short context.
Summary explains why the score is what it is.
Signal row: tells you the last official signal and how many bars ago it fired. Fresh signals tint lighter.
MA row: aligns your slow baseline; arrow helps spot slow-turns early.
Sess row + label: know which market is active; behavior and your confirmation bars adapt by session if presets are on.
VIX/VXN (if enabled): extra context for risk regime (values and color band).
Good practices & caveats
It’s confirmation-based to reduce false flips; you’ll get signals slightly later, by design.
All signals are informational; there’s no position management or stops in this build (we removed the stop visuals by request).
If you switch to exotic chart types or extreme resolutions, re-tune lengths and confirmation bars (and potentially disable session presets).
For scalping, consider reducing confirmation bars and OBV smoothing; for higher timeframes, increase them.
Quick customization ideas
Want faster flips? Lower confirmBars and obvBars, increase slope buffer a bit to retain quality.
Want fewer weak signals? Show only strong markers (toggle off weak via colors/visibility or increase min bar gap).
Prefer EMA stacking? Set both Fast/Slow to EMA.
Don’t care about OBV? Turn OBV confirm off; Trend + MACD will drive
What it is
A compact, two-column trading dashboard + signal pack that blends trend, MACD, and OBV into one view (“Flux Score”) and adds session awareness (pre-sessions and main sessions in Eastern time). It’s designed for regular candles by default and avoids repaint by letting you confirm on bar close.
Core pieces it calculates
Moving Averages
Two MAs: Fast (HMA/EMA) and Slow (HMA/EMA).
You choose length, line width, color, and transparency.
Trend engine (Strict/Lenient)
Uses the relation between Fast/Slow MA and a debounced fast-MA slope filter (slope > ATR×buffer).
Strict: requires fast>slow and slow rising (or the inverse for down).
Lenient: fast>slow or slow rising (or the inverse).
A confirmation window (bars) must hold true before trend flips. That window can be auto-tuned by session (Asia/London/NY) or set globally.
OBV confirmation (optional)
OBV smoothed by SMA; needs to be rising/falling for N bars (also session-aware if you enable presets).
MACD
Standard MACD Fast/Slow/Signal; the dashboard shows Bull ▲, Bear ▼ or Flat based on line vs signal.
Flux Score (top row)
A composite, smoothed gauge from 0–100:
40% Trend, 30% MACD, 30% OBV → EMA(3) smoothed.
Labels: Bullish ≥ 70, Bearish ≤ 30, otherwise Neutral.
Summary line explains why (e.g., “MACD↑, OBV↑, Trend up”).
Sessions & zones (Eastern/NY time)
Recognizes Asia / London / New York main sessions and pre-sessions using your chart’s Eastern time.
Session label (top of chart): text is white; background auto-matches the current session color (or your manual color).
Zone backgrounds (optional): off by default; when on, default transparency ≈ 95% (very light), with separate colors for each session and pre-session. A toggle lets you draw pre-session on top or beneath main sessions.
Signals & markers
Two strength tiers: Strong (Trend + OBV + MACD aligned) and Weak (2 of the 3 agree).
To reduce clutter, markers only appear on direction shifts (from last visible direction to a new one), and you can enforce a minimum bar gap.
Marker style:
Default Icons with LabelUp/LabelDown (tiny).
Colors: strong long = bright white by default; others configurable.
Weak markers are slightly offset from price using ATR so they don’t overlap wicks.
Dashboard (2-column)
Left column = label, right column = value:
Flux Score: numeric + Bullish/Neutral/Bearish tag.
Summary: short reason of the score.
Trend: UP / DOWN / FLAT (cell tinted green/red/gray).
MACD: Bull ▲ / Bear ▼ / Flat (tinted).
Signal: last printed signal + bar age (fresh signals get a lighter tint).
MA: slow MA type/length and up/down arrow.
Sess: current session label (e.g., “Pre-London”, “New York”).
VIX / VXN (optional): shows current value.
Auto tint: based on calm/watch/elevated thresholds (you control levels and colors).
Manual tint: fixed BG color if you prefer consistency.
Params: “P”=trend bars, “O”=OBV bars, mode (Strict/Lenient), and “Candles”.
You can set a global Default Transparency for the dashboard cells.
Key settings to know
Confirm On Close: when on (default), trend/OBV/MACD states use the last confirmed bar; this avoids mid-bar flicker and reduces repaint risk.
Session presets: when enabled, the number of bars required for confirmations tightens/loosens per session (e.g., Asia uses more bars than NY).
Colors & Opacity:
MA lines have their own transparency (default 0 = fully opaque).
Dashboard cells use a single global transparency (default 40%).
Session zones default to very light (95%) and are off by default.
VIX/VXN cells can auto-color by regime or use a manual background.
Markers:
“Icons” vs “Ticks.” Default is Icons with tiny labels up/down.
“Shift only” display reduces noise; you can also set min bar spacing.
How to read it (quick workflow)
Flux Score row: a fast “risk-on/off” gauge.
≥70 with green Trend/MACD cells → higher-conviction long context.
≤30 with red Trend/MACD cells → higher-conviction short context.
Summary explains why the score is what it is.
Signal row: tells you the last official signal and how many bars ago it fired. Fresh signals tint lighter.
MA row: aligns your slow baseline; arrow helps spot slow-turns early.
Sess row + label: know which market is active; behavior and your confirmation bars adapt by session if presets are on.
VIX/VXN (if enabled): extra context for risk regime (values and color band).
Good practices & caveats
It’s confirmation-based to reduce false flips; you’ll get signals slightly later, by design.
All signals are informational; there’s no position management or stops in this build (we removed the stop visuals by request).
If you switch to exotic chart types or extreme resolutions, re-tune lengths and confirmation bars (and potentially disable session presets).
For scalping, consider reducing confirmation bars and OBV smoothing; for higher timeframes, increase them.
Quick customization ideas
Want faster flips? Lower confirmBars and obvBars, increase slope buffer a bit to retain quality.
Want fewer weak signals? Show only strong markers (toggle off weak via colors/visibility or increase min bar gap).
Prefer EMA stacking? Set both Fast/Slow to EMA.
Don’t care about OBV? Turn OBV confirm off; Trend + MACD will drive
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.