AetherEdge - Adaptive Trend Bandit
Jun 8, 2026

The AetherEdge - Adaptive Trend Bandit indicator provides an adaptive SuperTrend system that utilizes a learning contextual bandit to automatically select the optimal ATR multiplier based on real-time market volatility regimes. By moving away from fixed multipliers, the tool aims to reduce lag in calm markets and minimize fakeouts during high volatility.
Usage
The Usage section focuses on interpreting the adaptive signals and managing the learning components of the script.
- Trend Following: Users can follow the direction-colored lines and fill (Green for Bullish, Red for Bearish). BUY and SELL signals are generated upon trend flips.
- Volatility Adaptation: The script automatically switches between calm, normal, and volatile regimes. In volatile regimes, the multiplier typically widens to prevent premature stop-outs, while in calm regimes, it tightens to capture emerging moves earlier.
- Dashboard Analysis: The integrated HUD provides real-time data on the current regime, the selected multiplier versus the learned "best" multiplier, and the confidence (pulls) of the bandit model.
- Warmup Period: It is important to allow the script to process the "warmup" number of bars. Signals will not fire until the k-means and bandit logic have gathered enough initial data to categorize volatility and test multipliers.
Details
The script is constructed using two primary machine learning layers:
- Streaming k-means (Unsupervised Learning): The indicator calculates relative volatility as
ATR / SMA(ATR). It uses a competitive learning algorithm to update three centroids representing different market regimes without requiring hard-coded thresholds. - Contextual Multi-Armed Bandit (Reinforcement Learning): Using the Upper Confidence Bound (UCB1) algorithm, the script treats different ATR multipliers as "arms." It rewards multipliers that keep the trend aligned with realized returns. This exploration is deterministic, ensuring that results are consistent across chart reloads and do not repaint.
Settings
The settings are divided into groups to manage the SuperTrend logic, the learning parameters, and the visual output.
SuperTrend & Bandit Settings
- ATR Length: Sets the lookback period for the Average True Range calculation.
- Multiplier Base: The smallest ATR multiplier available for the bandit to choose.
- Multiplier Step: The increment between candidate multipliers.
- Candidate Multipliers: The total number of multipliers (arms) available for the bandit to test.
- UCB Exploration Constant: Controls the balance between exploitation (sticking to the best multiplier) and exploration (trying other multipliers). Higher values increase exploration.
- Warmup Bars: The number of bars required for the model to initialize before firing signals.
Volatility Clustering (k-means)
- Volatility Baseline Length: The lookback used to determine the SMA of ATR for relative volatility calculations.
- Centroid Learning Rate: Determines how quickly the volatility regimes adapt to new data.
Visual & UI
- Shade Trend: Toggles the background fill between the SuperTrend line and the price.
- Show Flip Signals: Toggles BUY/SELL labels on trend changes.
- Show HUD: Enables or disables the information dashboard.
- HUD Size: Adjusts the scale of the dashboard text.
FAQ
How do I interpret the "Best Mult" on the dashboard? The "Best Mult" represents the ATR multiplier that has historically provided the highest reward in the current volatility regime. While the bandit may currently be "exploring" other options, the Best Mult shows what the model has found most effective so far.
Why are there no signals on my chart? The script requires a specific number of "Warmup Bars" (default 120) to learn market regimes. Ensure your chart has enough historical data loaded for the bandit to complete its initial learning phase.
How can I access AetherEdge - Adaptive Trend Bandit? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.