INVITE-ONLY SCRIPT

Nexus Drift | Oquant

67
Overview
Nexus Drift is a multi-layered trend-following tool, designed to capture market trends across different markets and timeframes. By blending adaptive moving averages, volatility-adjusted bands, momentum oscillators, and directional filters into an ensemble scoring system, it generates clear long (bullish allocation) or cash (bearish) signals, while dynamically tracking performance metrics such as drawdown, risk-adjusted returns, and trade profitability. It includes visual overlays for price action coloring, optional equity curve plotting, and customizable tables for real-time strategy and buy-and-hold comparisons, making it a comprehensive tool for trend followers.

Key Factors/Components
The indicator's strength lies in its diversified ensemble of seven core components:
Adaptive Linear Regression and Median Filter: Uses a least-squares moving average (LSMA) smoothed by a median to identify baseline trends, with volatility bands based on mean absolute deviation (MAD) for entry thresholds.
TEMA with Standard Deviation Bands: Applies TEMA for responsive trend smoothing, combined with standard deviation envelopes to filter noise and highlight breakouts.
Z-Score Normalized Arnaud Legoux Moving Average (ALMA): Employs ALMA for lag-reduced trend approximation, normalized via z-score to gauge deviations from the mean, focusing on statistical deviation in price action.
Exponential Moving Average (EMA) Crossover: A classic dual-EMA system (fast/slow) to confirm directional bias, providing a simple yet robust trend alignment check.
RSI Moving Average Filter: Smooths the Relative Strength Index (RSI) with a simple moving average to assess long/short signals.
SMA-Based SuperTrend with Standard Deviation: A volatility-adapted SuperTrend derived from simple moving average (SMA) and standard deviation, which dynamically flips direction based on price closes relative to trailing bands.
Weighted Moving Average (WMA) with MAD Bands: Leverages WMA for price-weighted trend emphasis, augmented by MAD-derived upper/lower bands with asymmetric multipliers to account for trend asymmetry (e.g., sharper downside risks).

These components feed into a unified scoring mechanism, augmented by backtesting metrics (e.g., Sharpe ratio, Sortino ratio, Omega ratio, profit factor, max drawdown) and visual tables for performance transparency.

How It Works
At its core, Nexus Drift operates as an ensemble voting system that aggregates signals from the seven components to compute a composite score, ensuring decisions are robust and less prone to noise. Each component evaluates price relative to its trend baseline and volatility envelope (e.g., crossing above an upper band signals bullish bias, below a lower band signals bearish). Bullish conditions from a component assign a +1 vote, bearish a -1. The average score across all votes determines the overall signal: a score of 0.5 or higher triggers a long allocation (full exposure to the asset), while 0 or lower shifts to cash (zero exposure, avoiding drawdowns). Signals only activate after a user-defined start date and on confirmed bars to prevent repainting. The system then simulates a simple long-only equity curve by compounding daily returns during long periods, while tracking intra-trade drawdowns and overall portfolio metrics. Visually, bars color green for longs and purple for cash, with optional equity plotting for curve analysis. Optional alerts fire on signal transitions, enabling automated notifications for trend entries/exits.

For Who Is Best/Recommended Use Cases
This indicator is ideal for trend followers, swing traders, and portfolio managers who prioritize directional conviction over frequent trading, particularly in trending environments. It's best suited for: Trend-Focused Traders: Those hunting multi-day to multi-week trends.
Multi-Timeframe Analysts: Users applying it on higher timeframes, or lower ones.
Risk-Aware Investors: Quantitative hobbyists or systematic traders monitoring metrics tables to compare strategy performance against buy-and-hold, optimizing for drawdown control.

Avoid using it on sideways markets since it most likely won't perform well there.

Settings and Default Settings
Nexus Drift offers intuitive inputs grouped for ease of customization, with defaults optimized for broad applicability for trending assets:
Strategy Start Date: Sets the backtest initiation (default: January 1, 2018).
Tables: Show Strategy Metrics Table (default: true) – Displays real-time stats like max drawdown, Sharpe/Sortino/Omega ratios, % profitable trades, profit factor, total trades, net profit, and current allocation.
Show Buy & Hold Table (default: true) – Compares asset's raw performance (max DD, Sharpe, etc.) side-by-side for benchmarking.
Equity Curve: Plot Equity Curve (default: false) – Toggles visualization of the simulated long-only equity line for performance visualization.

Conclusion
Nexus Drift offers a structured way to gauge trend consensus through diversified components, providing actionable allocations and transparent metrics to support informed decision-making. By focusing on agreement across methods, it seeks to enhance trend detection while highlighting key performance metrics.

⚠️ Disclaimer: This indicator is intended for educational and informational purposes only. Trading/investing involves risk, and past performance does not guarantee future results. Always test and evaluate indicators/strategies before applying them in live markets. Use at your own risk.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.