Machine Learning : Cosine Similarity & Euclidean DistanceIntroduction:
This script implements a comprehensive trading strategy that adheres to the established rules and guidelines of housing trading. It leverages advanced machine learning techniques and incorporates customised moving averages, including the Conceptive Price Moving Average (CPMA), to provide accurate signals for informed trading decisions in the housing market. Additionally, signal processing techniques such as Lorentzian, Euclidean distance, Cosine similarity, Know sure thing, Rational Quadratic, and sigmoid transformation are utilised to enhance the signal quality and improve trading accuracy.
Features:
Market Analysis: The script utilizes advanced machine learning methods such as Lorentzian, Euclidean distance, and Cosine similarity to analyse market conditions. These techniques measure the similarity and distance between data points, enabling more precise signal identification and enhancing trading decisions.
Cosine similarity:
Cosine similarity is a measure used to determine the similarity between two vectors, typically in a high-dimensional space. It calculates the cosine of the angle between the vectors, indicating the degree of similarity or dissimilarity.
In the context of trading or signal processing, cosine similarity can be employed to compare the similarity between different data points or signals. The vectors in this case represent the numerical representations of the data points or signals.
Cosine similarity ranges from -1 to 1, with 1 indicating perfect similarity, 0 indicating no similarity, and -1 indicating perfect dissimilarity. A higher cosine similarity value suggests a closer match between the vectors, implying that the signals or data points share similar characteristics.
Lorentzian Classification:
Lorentzian classification is a machine learning algorithm used for classification tasks. It is based on the Lorentzian distance metric, which measures the similarity or dissimilarity between two data points. The Lorentzian distance takes into account the shape of the data distribution and can handle outliers better than other distance metrics.
Euclidean Distance:
Euclidean distance is a distance metric widely used in mathematics and machine learning. It calculates the straight-line distance between two points in Euclidean space. In two-dimensional space, the Euclidean distance between two points (x1, y1) and (x2, y2) is calculated using the formula sqrt((x2 - x1)^2 + (y2 - y1)^2).
Dynamic Time Windows: The script incorporates a dynamic time window function that allows users to define specific time ranges for trading. It checks if the current time falls within the specified window to execute the relevant trading signals.
Custom Moving Averages: The script includes the CPMA, a powerful moving average calculation. Unlike traditional moving averages, the CPMA provides improved support and resistance levels by considering multiple price types and employing a combination of Exponential Moving Averages (EMAs) and Simple Moving Averages (SMAs). Its adaptive nature ensures responsiveness to changes in price trends.
Signal Processing Techniques: The script applies signal processing techniques such as Know sure thing, Rational Quadratic, and sigmoid transformation to enhance the quality of the generated signals. These techniques improve the accuracy and reliability of the trading signals, aiding in making well-informed trading decisions.
Trade Statistics and Metrics: The script provides comprehensive trade statistics and metrics, including total wins, losses, win rate, win-loss ratio, and early signal flips. These metrics offer valuable insights into the performance and effectiveness of the trading strategy.
Usage:
Configuring Time Windows: Users can customize the time windows by specifying the start and finish time ranges according to their trading preferences and local market conditions.
Signal Interpretation: The script generates long and short signals based on the analysis, custom moving averages, and signal processing techniques. Users should pay attention to these signals and take appropriate action, such as entering or exiting trades, depending on their trading strategies.
Trade Statistics: The script continuously tracks and updates trade statistics, providing users with a clear overview of their trading performance. These statistics help users assess the effectiveness of the strategy and make informed decisions.
Conclusion:
With its adherence to housing trading rules, advanced machine learning methods, customized moving averages like the CPMA, and signal processing techniques such as Lorentzian, Euclidean distance, Cosine similarity, Know sure thing, Rational Quadratic, and sigmoid transformation, this script offers users a powerful tool for housing market analysis and trading. By leveraging the provided signals, time windows, and trade statistics, users can enhance their trading strategies and improve their overall trading performance.
Disclaimer:
Please note that while this script incorporates established tradingview housing rules, advanced machine learning techniques, customized moving averages, and signal processing techniques, it should be used for informational purposes only. Users are advised to conduct their own analysis and exercise caution when making trading decisions. The script's performance may vary based on market conditions, user settings, and the accuracy of the machine learning methods and signal processing techniques. The trading platform and developers are not responsible for any financial losses incurred while using this script.
By publishing this script on the platform, traders can benefit from its professional presentation, clear instructions, and the utilisation of advanced machine learning techniques, customised moving averages, and signal processing techniques for enhanced trading signals and accuracy.
I extend my gratitude to TradingView, LUX ALGO, and JDEHORTY for their invaluable contributions to the trading community. Their innovative scripts, meticulous coding patterns, and insightful ideas have profoundly enriched traders' strategies, including my own.
Fractional
FRAMA and Candlestick Patterns [CSM]FRAMA (Fractal Adaptive Moving Average) is a technical analysis indicator that adapts its smoothing period according to the market's volatility, allowing it to provide accurate signals in all market conditions. This indicator script plots the FRAMA on a chart and generates buy and sell signals based on the FRAMA and candlestick patterns. It also includes an option to filter signals based on bullish and bearish engulfing patterns.
To detect candlestick patterns, the script imports the "BankNifty_CSM" library from the creator's public library on TradingView. The FRAMA calculation is done using a loop that iterates over the last "length" number of bars, with the smoothing factor adjusted based on the "fracDim" parameter.
The buy and sell signals are generated based on the position of the current price relative to the FRAMA line. If the "engulfing" parameter is set to true, the signals are further filtered based on bullish and bearish engulfing patterns.
Overall, this script combines various technical indicators and candlestick pattern recognition to provide a complete trading strategy. However, as with any trading strategy, it should be thoroughly backtested and evaluated before using it in a live trading environment.
Guerrilla AdvancedThis indicator was designed with people without Pro License in mind (Including many of my close friends).
Basically, you will get a combo of few different tools in one box, with ability to turn them on and off with a single check mark, also, you have total control over the input numbers that was used in calculations if you so want to, for example, sometimes when i see a massive bullish up trend, i reduce the short rally from 12 to 8 even 6 to get faster signal for selling the trend.
So, what will you get in this pack?
1- Ichimoko. Yes, you heard it right, although we have it in the default tools but hey, it will use one indicator slot and if you don't have a pro license, you will use that slot
2- Rally. This is an old yet very powerful system for getting buy or sell signals, basically, you get two lines and for making the life easier i draw a cloud between them. when the trend passes above the cloud and it was bellow it in past, right after the very first candle that gets above the cloud you can put the buy order, and vice versa, the moment a candle body enters the cloud, if you want an aggressive signal, you can sell, if not, you may want to wait to see if the candles drop bellow the cloud or not then decide.
3- Resistance Support Cloud. Most of us always heard about resistance and support "lines" but many of us don't know that, in each trend, the trend line itself is a resistance or support line, and when you are going in a bullish or bearish tunnel, the floor and roof of tunnels are again resistance and supports, using this part of the tool, just like rally, you get a cloud that shows you the resistance / support "zone"
4- William Fractals. To be honest, I got this part of the code from another source available around. Why? looking at those fractal indicators, you can easily eyeball the trend line or existence of a tunnel.
5- Different EMA lines. If you are one of those people that use EMA lines for their trading, have fun with them, there are few different standard ones and even a custom one that you can put your desired number for it.