Fractional Accumulation Distribution Strategy🔹 INTRODUCTION:
As traders and investors, we often find ourselves searching for ways to maximize our market positioning—trying to capture the best price, manage risk, and adapt to ever-changing volatility. Through years of working with a variety of traders and investors, a common theme emerged: the most successful market participants were those who accumulated positions strategically over time, rather than relying on one-off, rigid entry points. However, even the best of them struggled to consistently time their entries and exits for optimal results.
That's why I created the Fractional Accumulation/Distribution Strategy (FADS)—an adaptable solution designed to dynamically adjust position sizing and entry points based on changing market conditions, enabling both passive and active market participants to optimize their approach.
The FADS trading strategy combines volatility-based trend detection and adaptive position scaling to maximize profitability across varied market conditions. By using the price ranges from higher timeframes, FADS pinpoints extreme demand and supply zones with a high statistical probability of reversal, making it effective in both high and low volatility environments. By applying adjustable threshold settings, users can focus on meaningful price movements to reduce unnecessary trades. Adaptive position scaling further enhances this approach by adjusting position sizes based on entry level distances, allowing for strategic position building that balances risk and reward in uncertain markets. This systematic scaling begins with smaller positions, expanding as the trend solidifies, creating a refined, robust trading experience.
🔹 FEATURES:
Multi-Timeframe Volatility-Based Trend Detection
Accumulation/Distribution Level Filter
Customizable Period for Highest/Lowest Prices Capture
Adjustable Sensitivity & Frequency in Positioning
Broad control settings of Strategy
Adaptive Position Scaling
🔹 SETTINGS:
Volatility : Determines trading range based on market volatility . Highest range value number of periods.
Factor : Adjusts the width of the Accumulation & Distribution bands separately. The Level Filter feature offers customizable triggering bands, allowing users to fine-tune the initiation point for the Accumulation/Distribution sequence. This flexibility enables traders to align entries more precisely with market conditions, setting optimal thresholds for initiating trade chains, whether in accumulating positions during uptrends or distributing in downtrends.
Lowest : Choose the price source (e.g., Close, Low). Number of bars considered when determining the lowest price level. Selecting the checkbox generate a signal when the price crosses below the previous lowest value for calculating the lowest value used for trade signals.
Highest : Choose the price source (e.g., Close, High). Number of bars considered when determining the highest price levels. Selecting the checkbox generate a signal when the price crosses above the previous highest value for calculating the highest value used for trade signals.
Accumulation Spread : Adjusts the buying frequency sensitivity by setting the distance between entries based on personal risk tolerance. Larger values for less frequent buys; smaller values for more frequent buys.
Distribution Spread : Adjusts the selling frequency sensitivity by setting the distance between exits based on reward preference. Larger values for less frequent sells; smaller values for more frequent sells.
Percentage of Capital Allocation : Sets the portion of total capital used for the initial trade in a strategy. It sets the scale for subsequent trades during accumulation phase.
🔹 APPLICATIONS:
❖ Accumulation and Distribution Phases
Early entries are avoided by initiating accumulation only after a trend reversal is confirmed and price breaks below long-term range.
Position sizes are determined by the distance between consecutive trades, smaller distance results in smaller position sizes and vice versa.
Average position cost is reduced by accumulating larger positions at the lower prices, potentially resulting in improved profitability.
Early exits are avoided by initiating distribution only after trend reversal is confirmed and price breaks above long-term range.
The pace of distribution can be tracked by the violet line that represents average positions during distribution phase
❖ Use Cases (Different than default setting input is used for illustration purposes)
If the starting point of accumulation starts too high for the risk preference, Accumulation Level Filter can be lowered by increasing the 🟢 threshold Factor.
If the starting point of distribution is too low for the reward preference, the Distribution Level Filter can be raised by increasing the 🔴 threshold Factor.
In lower timeframes, positions during the accumulation phase could be purchased at higher levels relative to prior entry positions. To optimize for this, consider extending the period used to capture the lowest prices. Similarly, during the distribution phase, increasing the period for identifying higher prices can improve accuracy.
🔹 Strategy Properties:
Adjusting properties within the script settings is recommended to align with specific accounts and trading platforms, ensuring realistic strategy results.
Balance (default): $100,000
Initial Order Size: 1% of the default balance
Commission: 0.1%
Slippage: 5 Ticks
Backtesting: Backtested using TradingView’s built-in strategy testing tool with default commission rates of 0.1% and slippage of 5 ticks. It reflects average market conditions for Apple Inc. (APPL) on 1-hour timeframe
Disclaimers: Commission and slippage varies with market conditions and brokerage policies. The assumed value may not represent all trading environments.
PAST PERFORMANCE DOESN’T GUARANTEE FUTURE RESULTS!
Disclaimer: Please remember that past performance may not be indicative of future results. Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting. This post and the script don’t provide any financial advice.
This invite-only script is being published as part of my commitment to developing tools that align with TradingView’s community standards. Access requests will be reviewed carefully after the script passes TradingView's moderation process.
Fractional
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.
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.