Ox_kali

Machine Learning: kNN sentiment Anomaly detector [Ox_kali]

Ox_kali Mis à jour   
Introduction:
This script represents a methodical integration of advanced machine learning techniques into financial market analysis. Utilizing the k-Nearest Neighbors (kNN) algorithm, a supervised learning method, the script systematically processes historical price data to detect anomalies in investor sentiment. By analyzing divergences between normalized investor satisfaction and actual asset prices, it offers a data-driven approach to identifying potential market inflection points.

Key Points:
  • Integration of the kNN machine learning algorithm to spotlight trading anomalies.
  • Incorporation of user-defined parameters, granting enhanced flexibility tailored to diverse trading strategies.
  • Deployment of normalization techniques, rendering a consistent perspective on average investor satisfaction.

Trading Application:
At its core, the script holds the capability to generate buy and sell signals derived from the detected anomalies, with a particular emphasis on those originating from divergences. Visual markers, represented by green and red backgrounds, provide an objective visualization of potential points of interest for traders.

Important Note:
This algorithm is an experimental embodiment of the kNN machine learning method. The parameters have not been fully optimized, and given the algorithm’s intricate nature and the high values set for kNN parameters, users might experience a slight delay during loading. On a personal note, it appears that this algorithm can detect shifts in trends on higher time frames, with the green and red color cues serving as key indicators. It also demonstrates promising performance on shorter time frames

Feedback Welcome:
Any feedback or suggestions on parameter settings are appreciated. Feel free to share your experiences in the comments.

Please note that the Machine Learning: kNN Investor sentiment Anomaly detector is provided for educational purposes only and is not meant to constitute financial advice. This indicator is not a guarantee of future market performance and should be used in conjunction with proper risk management. Always ensure that you have a thorough understanding of the indicator’s methodology and its limitations before making any investment decisions. Additionally, past performance is not indicative of future results.
Notes de version:
Release Note:
- Parameter Update for Script:

Number of nearest neighbors (n2):
- Previous Value: 126
- New Default Value: 90
- Note: While the ideal value for this parameter seems to be 126, the loading time and the ability for it to display on TradingView may vary depending on the server load allowance. Additionally, the base script, even before the implementation of kNN, already takes time to load, further limiting the number of nearest neighbors. I will be working on an optimization soon. In the meantime, adjusting these parameters can lead to faster display times or even meet the expected load times on TradingView.

Script protégé
Ce script est publié en code source fermé et vous pouvez l'utiliser librement. Vous pouvez le préférer pour l'utiliser sur un graphique. Vous ne pouvez pas visualiser ou modifier son code source.
Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.

Vous voulez utiliser ce script sur un graphique ?