OPEN-SOURCE SCRIPT

AetherEdge - OneButton Trend Master

443
🖊️ Overview

AE-1BTN is a one-click trend tool stripped to ultimate simplicity. The chart background paints in three colors — green (buy), red (sell), grey (wait) — telling you the regime at a glance. Inside, a two-layer engine (EMA stack + KNN pattern match) decides, but the only user setting is sensitivity. For traders who don't want to fiddle with parameters and just want the verdict.

🔶 Key Features

3-color background: intuitive green / red / grey visualization
Two-layer engine: signal only when EMA stack and KNN match agree
Near-zero parameters: pick one of Conservative / Balanced / Aggressive
BUY/SELL labels on candles at trend flips
Internal complexity fully hidden — beginner-ready
Integrated HUD shows both layers and the final verdict
Built-in alerts

🧠 Technical Architecture

Layer one is the classic EMA stack — short/mid/long EMAs whose ordering gives a bullish/bearish/mixed verdict. Layer two is a genuine KNN (k-nearest-neighbors) algorithm: the current feature vector (return, momentum, volatility) is matched against feature vectors from each of the past 250 bars via Euclidean distance, picking the 7 nearest neighbors. Each neighbor votes by the actual 8-bar move that followed it, and the average becomes the predicted direction. Future leakage is structurally excluded — each neighbor's outcome uses only past data. The final verdict requires both layers to agree; disagreement defaults to WAIT, structurally suppressing noise signals.

⚙️ Recommended Settings & Tuning Guide

Just pick Sensitivity. For intraday or short swings, choose Balanced; for noise-heavy or ranging conditions, Conservative; to catch strong trends fast, Aggressive. All other parameters are pre-tuned internally and need no adjustment.

💡 How to Use in Practice

The simplest workflow is to follow the background. Hold longs while green, consider closing/flipping when it turns red, and stand aside on grey. The BUY/SELL labels mark trend-flip moments — useful as entry references. Combining with structure tools (support/resistance, key levels) and confirming the signal coincides with a relevant level raises conviction.

⚠️ Important Notes

Designed for trend-following, signals can flip frequently in ranges; frequent color changes can themselves be read as an "unstable regime" cue. The KNN layer runs only on the last bar for compute reasons, and historical background coloring uses the EMA stack alone — a design constraint, not repainting.

🚨 Disclaimer

This indicator is provided for educational and informational purposes only and does not constitute financial or investment advice. No signal guarantees future profit, and past performance does not indicate future results. All trading decisions are made at your own risk.

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน