OPEN-SOURCE SCRIPT
Aggregated Scores Oscillator [Alpha Extract]

A sophisticated risk-adjusted performance measurement system that combines Omega Ratio and Sortino Ratio methodologies to create a comprehensive market assessment oscillator. Utilizing advanced statistical band calculations with expanding and rolling window analysis, this indicator delivers institutional-grade overbought/oversold detection based on risk-adjusted returns rather than traditional price movements. The system's dual-ratio aggregation approach provides superior signal accuracy by incorporating both upside potential and downside risk metrics with dynamic threshold adaptation for varying market conditions.
🔶 Advanced Statistical Framework
Implements dual statistical methodologies using expanding and rolling window calculations to create adaptive threshold bands that evolve with market conditions. The system calculates cumulative statistics alongside rolling averages to provide both historical context and current market regime sensitivity with configurable window parameters for optimal performance across timeframes.
🔶 Dual Ratio Integration System
Combines Omega Ratio analysis measuring excess returns versus deficit returns with Sortino Ratio calculations focusing on downside deviation for comprehensive risk-adjusted performance assessment. The system applies configurable smoothing to both ratios before aggregation, ensuring stable signal generation while maintaining sensitivity to regime changes.
Pine Script®
🔶 Dynamic Band Calculation Engine
Features sophisticated threshold determination using both expanding historical statistics and rolling window analysis to create adaptive overbought/oversold levels. The system incorporates configurable multipliers and sensitivity adjustments to optimize signal timing across varying market volatility conditions with automatic band convergence logic.
🔶 Signal Generation Framework
Generates overbought conditions when aggregated score exceeds adjusted upper threshold and oversold conditions below lower threshold, with neutral zone identification for range-bound markets. The system provides clear binary signal states with background zone highlighting and dynamic oscillator coloring for intuitive market condition assessment.
🔶 Enhanced Visual Architecture
Provides modern dark theme visualization with neon color scheme, dynamic oscillator line coloring based on signal states, and gradient band fills for comprehensive market condition visualization. The system includes zero-line reference, statistical band plots, and background zone highlighting with configurable transparency levels.
snapshot

🔶 Risk-Adjusted Performance Analysis
Utilizes target return parameters for customizable risk assessment baselines, enabling traders to evaluate performance relative to specific return objectives. The system's focus on downside deviation through Sortino analysis provides superior risk-adjusted signals compared to traditional volatility-based oscillators that treat upside and downside movements equally.
🔶 Multi-Timeframe Adaptability
Features configurable calculation periods and rolling windows to optimize performance across various timeframes from intraday to long-term analysis. The system's statistical foundation ensures consistent signal quality regardless of timeframe selection while maintaining sensitivity to market regime changes through adaptive band calculations.
🔶 Performance Optimization Framework
Implements efficient statistical calculations with optimized variable management and configurable smoothing parameters to balance responsiveness with signal stability. The system includes automatic band adjustment mechanisms and rolling window management for consistent performance across extended analysis periods.
This indicator delivers sophisticated risk-adjusted market analysis by combining proven statistical ratios in a unified oscillator framework. Unlike traditional overbought/oversold indicators that rely solely on price movements, the ASO incorporates risk-adjusted performance metrics to identify genuine market extremes based on return quality rather than price volatility alone. The system's adaptive statistical bands and dual-ratio methodology provide institutional-grade signal accuracy suitable for systematic trading approaches across cryptocurrency, forex, and equity markets with comprehensive visual feedback and configurable risk parameters for optimal strategy integration.
🔶 Advanced Statistical Framework
Implements dual statistical methodologies using expanding and rolling window calculations to create adaptive threshold bands that evolve with market conditions. The system calculates cumulative statistics alongside rolling averages to provide both historical context and current market regime sensitivity with configurable window parameters for optimal performance across timeframes.
🔶 Dual Ratio Integration System
Combines Omega Ratio analysis measuring excess returns versus deficit returns with Sortino Ratio calculations focusing on downside deviation for comprehensive risk-adjusted performance assessment. The system applies configurable smoothing to both ratios before aggregation, ensuring stable signal generation while maintaining sensitivity to regime changes.
// Omega Ratio Calculation
Excess_Return = sum((Daily_Return > Target_Return ? Daily_Return - Target_Return : 0), Period)
Deficit_Return = sum((Daily_Return < Target_Return ? Target_Return - Daily_Return : 0), Period)
Omega_Ratio = Deficit_Return ≠ 0 ? (Excess_Return / Deficit_Return) : na
// Sortino Ratio Framework
Downside_Deviation = sqrt(sum((Daily_Return < Target_Return ? (Daily_Return - Target_Return)² : 0), Period) / Period)
Sortino_Ratio = (Mean_Return / Downside_Deviation) * sqrt(Annualization_Factor)
// Aggregated Score
Aggregated_Score = SMA(Omega_Ratio, Omega_SMA) + SMA(Sortino_Ratio, Sortino_SMA)
🔶 Dynamic Band Calculation Engine
Features sophisticated threshold determination using both expanding historical statistics and rolling window analysis to create adaptive overbought/oversold levels. The system incorporates configurable multipliers and sensitivity adjustments to optimize signal timing across varying market volatility conditions with automatic band convergence logic.
🔶 Signal Generation Framework
Generates overbought conditions when aggregated score exceeds adjusted upper threshold and oversold conditions below lower threshold, with neutral zone identification for range-bound markets. The system provides clear binary signal states with background zone highlighting and dynamic oscillator coloring for intuitive market condition assessment.
🔶 Enhanced Visual Architecture
Provides modern dark theme visualization with neon color scheme, dynamic oscillator line coloring based on signal states, and gradient band fills for comprehensive market condition visualization. The system includes zero-line reference, statistical band plots, and background zone highlighting with configurable transparency levels.
snapshot
🔶 Risk-Adjusted Performance Analysis
Utilizes target return parameters for customizable risk assessment baselines, enabling traders to evaluate performance relative to specific return objectives. The system's focus on downside deviation through Sortino analysis provides superior risk-adjusted signals compared to traditional volatility-based oscillators that treat upside and downside movements equally.
🔶 Multi-Timeframe Adaptability
Features configurable calculation periods and rolling windows to optimize performance across various timeframes from intraday to long-term analysis. The system's statistical foundation ensures consistent signal quality regardless of timeframe selection while maintaining sensitivity to market regime changes through adaptive band calculations.
🔶 Performance Optimization Framework
Implements efficient statistical calculations with optimized variable management and configurable smoothing parameters to balance responsiveness with signal stability. The system includes automatic band adjustment mechanisms and rolling window management for consistent performance across extended analysis periods.
This indicator delivers sophisticated risk-adjusted market analysis by combining proven statistical ratios in a unified oscillator framework. Unlike traditional overbought/oversold indicators that rely solely on price movements, the ASO incorporates risk-adjusted performance metrics to identify genuine market extremes based on return quality rather than price volatility alone. The system's adaptive statistical bands and dual-ratio methodology provide institutional-grade signal accuracy suitable for systematic trading approaches across cryptocurrency, forex, and equity markets with comprehensive visual feedback and configurable risk parameters for optimal strategy integration.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Access more of our systems and insights at alphaextract.xyz
All analysis provided by Alpha Extract is for educational and informational purposes only.
All analysis provided by Alpha Extract is for educational and informational purposes only.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Access more of our systems and insights at alphaextract.xyz
All analysis provided by Alpha Extract is for educational and informational purposes only.
All analysis provided by Alpha Extract is for educational and informational purposes only.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.