INVITE-ONLY SCRIPT

eFkolos Tech Indicator

23
Machine learning-enhanced SuperTrend indicator that uses k-means clustering to adaptively optimize SuperTrend parameters based on historical performance. Let me break down what makes this unique:
Key Innovation
Instead of using a single fixed SuperTrend factor, this indicator:

Calculates multiple SuperTrends simultaneously (with factors from 1 to 5 by default, stepped at 0.5)
Tracks performance of each variant using exponential smoothing
Clusters them into 3 groups (Best/Average/Worst) using k-means algorithm
Adapts by selecting the average factor from your chosen cluster

Clever Technical Aspects
Performance Metric: Uses a smart approach where performance = EMA of (price_change × signal_direction), giving positive values when the SuperTrend correctly predicts direction.
K-means Implementation: Properly initializes centroids using quartiles and iterates until convergence - this is solid unsupervised learning.
Adaptive MA Layer: The perf_ama that adapts faster when the performance index is high (more confidence) and slower when low.
Memory Management: Uses UDTs (User Defined Types) efficiently with arrays to handle multiple SuperTrend instances.

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。