OPEN-SOURCE SCRIPT
O'Neill Terminal

The O'Neill Terminal PineScript indicator, designed to overlay on price charts and present market dynamics using a physics-inspired orbital framework combined with a Bloomberg-style terminal interface.
The code is structured into six logical sections:
Bloomberg Design System
The script first defines a color palette that mimics the Bloomberg Terminal aesthetic. It includes amber as the primary highlight color, along with green, red, cyan, dark background, and gray. These colors are later used for chart elements and the on-screen telemetry panel.
Quantitative Engine (Niche Metrics)
This section calculates the core analytical components of the orbital model using a configurable lookback period (default 20).
Central Axis (axis)
A volume-weighted moving average (VWMA) acts as the equilibrium axis. This represents the gravitational center of the system where price tends to stabilize.
Z-Score (z_score)
Measures statistical deviation of price from its mean using standard deviation. It quantifies how far price has moved from equilibrium in sigma units, identifying extreme conditions.
Angular Velocity (velocity)
Calculated as the rate of change (ROC) of price over 5 periods. This represents rotational speed within the orbital framework.
Angular Acceleration (acceleration)
Calculated as the rate of change of velocity. This captures changes in momentum and helps identify divergence between speed and force.
Relative Mass (rel_mass)
The ratio of current volume to its moving average. This models the “mass” of capital entering the system, amplifying movement when elevated.
Kinetic Energy (kinetic)
Derived from ATR relative to price. This measures volatility intensity and represents vibrational energy inside the orbital structure.
Terminal Status Logic
The script assigns a market state based on Z-score thresholds:
Above +2 sigma - OVERBOUGHT
Below -2 sigma - OVERSOLD
Between ±0.5 sigma - EQUILIBRIUM
Otherwise - NEUTRAL
Each state is paired with a corresponding color for visual emphasis in the terminal.
Chart Plots
The indicator plots minimal visual elements:
The central axis (VWMA equilibrium line)
Upper hull boundary at +2 standard deviations
Lower hull boundary at -2 standard deviations
These boundaries represent the structural limits of the orbital system.
Bloomberg UI Helper Function
A reusable function formats rows in a table using monospaced font and aligned columns. This function is used to render the telemetry terminal with consistent styling.
Terminal Rendering
A table is created in the top-right corner of the chart, simulating a live telemetry terminal. It updates on the last bar and displays:
System header and status label
Orbital state (derived from Z-score)
Z-score value
Velocity (price ROC)
Acceleration (momentum change)
Relative mass (volume intensity)
Kinetic energy (ATR-based volatility)
Last price
Countdown timer to next candle close
Hull stability index
The Hull Stability index is calculated as:
stability = 100 − (|Z-Score| × 25)
This provides a percentage-based measure of how stable price is relative to the orbital hull. Lower values indicate structural stress and higher probability of reversal.
Overall, the indicator functions as a physics-inspired telemetry dashboard. It interprets price movement as an object inside a rotating system, where deviation from equilibrium, momentum dynamics, capital mass, and volatility energy combine to define market state and potential turning points. It was fun creating it :)
The code is structured into six logical sections:
Bloomberg Design System
The script first defines a color palette that mimics the Bloomberg Terminal aesthetic. It includes amber as the primary highlight color, along with green, red, cyan, dark background, and gray. These colors are later used for chart elements and the on-screen telemetry panel.
Quantitative Engine (Niche Metrics)
This section calculates the core analytical components of the orbital model using a configurable lookback period (default 20).
Central Axis (axis)
A volume-weighted moving average (VWMA) acts as the equilibrium axis. This represents the gravitational center of the system where price tends to stabilize.
Z-Score (z_score)
Measures statistical deviation of price from its mean using standard deviation. It quantifies how far price has moved from equilibrium in sigma units, identifying extreme conditions.
Angular Velocity (velocity)
Calculated as the rate of change (ROC) of price over 5 periods. This represents rotational speed within the orbital framework.
Angular Acceleration (acceleration)
Calculated as the rate of change of velocity. This captures changes in momentum and helps identify divergence between speed and force.
Relative Mass (rel_mass)
The ratio of current volume to its moving average. This models the “mass” of capital entering the system, amplifying movement when elevated.
Kinetic Energy (kinetic)
Derived from ATR relative to price. This measures volatility intensity and represents vibrational energy inside the orbital structure.
Terminal Status Logic
The script assigns a market state based on Z-score thresholds:
Above +2 sigma - OVERBOUGHT
Below -2 sigma - OVERSOLD
Between ±0.5 sigma - EQUILIBRIUM
Otherwise - NEUTRAL
Each state is paired with a corresponding color for visual emphasis in the terminal.
Chart Plots
The indicator plots minimal visual elements:
The central axis (VWMA equilibrium line)
Upper hull boundary at +2 standard deviations
Lower hull boundary at -2 standard deviations
These boundaries represent the structural limits of the orbital system.
Bloomberg UI Helper Function
A reusable function formats rows in a table using monospaced font and aligned columns. This function is used to render the telemetry terminal with consistent styling.
Terminal Rendering
A table is created in the top-right corner of the chart, simulating a live telemetry terminal. It updates on the last bar and displays:
System header and status label
Orbital state (derived from Z-score)
Z-score value
Velocity (price ROC)
Acceleration (momentum change)
Relative mass (volume intensity)
Kinetic energy (ATR-based volatility)
Last price
Countdown timer to next candle close
Hull stability index
The Hull Stability index is calculated as:
stability = 100 − (|Z-Score| × 25)
This provides a percentage-based measure of how stable price is relative to the orbital hull. Lower values indicate structural stress and higher probability of reversal.
Overall, the indicator functions as a physics-inspired telemetry dashboard. It interprets price movement as an object inside a rotating system, where deviation from equilibrium, momentum dynamics, capital mass, and volatility energy combine to define market state and potential turning points. It was fun creating it :)
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน