OPEN-SOURCE SCRIPT

AetherEdge - Self-Evolving RL Dashboard Lite

436
🖊️ Overview

A streamlined self-evolving agent built on a lightweight Actor-Critic core with prioritized experience, learning by pitting multiple specialist RL heads against each other. Internally, three heads — TREND-FOLLOWING, MEAN-REVERSION, and BREAKOUT — each propose a directional view from their own lens, while a meta-selector tracks each head's recent reward performance and re-allocates trust toward whichever is working now. As the market's character shifts, the agent automatically moves its weight toward the style that's paying off. Visualization is intentionally minimal: one main signal arrow, one prediction line, a small composite score, and a "Learning Progress" label that makes the evolution visible.

🔶 Key Features

Competing RL heads — trend / mean-reversion / breakout specialists run in parallel; the best drives the unified call
Dynamic trust re-allocation — softmax trust weights adapt to each head's reward-performance score
Lightweight Actor-Critic — each head has an Actor (policy) and Critic (state value), learning via advantage
Prioritized experience replay — high-reward transitions re-learned preferentially
Style-specific reward shaping — each head is rewarded more in its specialty regime, differentiating behavior
Ultra-minimal visuals — just one main arrow + one prediction line + a small composite score
Learning Progress label — visualizes agent maturity (bars trained, buffer fill, trust concentration) as a bar
Exploration vs. exploitation — ε-greedy exploration

🧠 Technical Architecture

The agent perceives the market as a four-dimensional state vector (momentum spread, RSI deviation, Bollinger position, position-within-range — all z-normalized). The core is three independent Actor-Critic heads, each producing Actor logits (3 actions → softmax policy) and a Critic value from a compact shared trunk (tanh).
Heads differentiate via style-specific reward shaping. From a common directional return (ATR-normalized), the trend head amplifies reward in strong trends (large |momentum|), the mean-reversion head when stretched from the mean (large |BB position|), and the breakout head near range edges. The three thus learn distinct behaviors from the same price data.
Learning is standard Actor-Critic. Each head's Critic computes the TD target r + γV(s′), the advantage A = TD target − V(s) drives the Actor's advantage-weighted policy gradient, and the Critic regresses via squared error — all from a prioritized replay buffer (|reward|^exponent). In meta-selection, each head's performance score is EMA-smoothed and turned into trust weights via softmax. The final policy blends the three heads' policies by trust and picks the max-value action. The composite score is the decisiveness of the blended policy; learning progress combines training maturity, buffer fill, and trust concentration.

⚙️ Recommended Settings & Tuning Guide

BTC (1H–4H): Training Horizon 800–1500, γ 0.93, Head Trust Adapt 0.05, Min Score 0.35. Standard settings fit well
ETH (1H–4H): As BTC, with Reward Lookahead 5–8
SOL (15m–1H): High volatility favors Head Trust Adapt ≈ 0.08 to switch styles quickly, Min Score 0.4 to be selective
XRP (1H–4H): Spike-prone; Priority Exponent ≈ 2.0 to learn hard from big experiences, shorter Prediction Length
Head Trust Adapt Rate: higher switches to the winning style faster but less stably; lower is stable but slower
Head Score Smoothing: higher (0.9–0.95) smooths performance assessment; lower is sensitive to recent results
Min Score to Signal: higher makes arrows more selective — tune to your trade frequency
Prediction Length: the projection distance of the line; a higher score steepens its slope

💡 How to Use in Practice

Reacting to the main arrow: an arrow is the "final verdict" where the trust-weighted consensus of all three heads clears the score gate — a core basis for trend-following entries
Using the prediction line: one line whose slope scales with score; steeper means a more confident directional view
Reading the composite score: a higher score % in the small label means clearer cross-head consensus; low means a balanced call (stand aside)
Using the Learning Progress label: as the "LEARNING" bar fills and the best head stabilizes, the policy is maturing; treat signals as indicative while progress is low
Watching the best head: the current leading head (TREND / MEAN-REV / BREAKOUT) in the progress label reveals how the agent reads the present market
Multi-timeframe usage: confirm the best head and direction on the higher timeframe (4H), then refine timing on arrows on the lower one (15m–1H)

⚠️ Important Notes

Initial learning period: right after launch the buffer is nearly empty and the heads are immature; treat signals as low-confidence until the Learning Progress bar fills (several hundred bars)
Learning resets: changing parameters, switching symbol/timeframe, or recompiling reinitializes all head weights, trust weights, and the buffer, restarting learning from zero
Nature of the Lite build: this distills the multi-head internals into ultra-simple output, omitting detailed internal-state visualization
On forward-looking reward: rewards use closed-bar forward returns (a standard RL training construct); current-bar decisions are on confirmed values, but as with any adaptive system, historical and live behavior can differ — always forward-test
Constraints: this is a lightweight implementation operating within Pine's compute budget

🚨 Disclaimer

This indicator is an analytical and educational visualization tool. The Actor-Critic, competing RL heads, prioritized experience replay, reward shaping, composite score, and prediction are quantitative heuristics computed on-chart from price data — they are not financial advice, buy/sell signals, or any guarantee of future performance. Reinforcement-learning agents can and do make wrong calls. Always combine any tool with your own analysis and disciplined risk management.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.