[F][IND] FVG IdentifierMastering Market Imbalances with Ease
The FVG Identifier stands as a groundbreaking TradingView indicator, crafted to illuminate the often-overlooked Fair Value Gaps (FVG) in the dynamic world of price action trading. Let’s dive into how this tool is transforming the approach to identifying market inefficiencies.
Decoding Fair Value Gaps
Central to the concept of FVGs is the identification of market imbalances — moments where the equilibrium between buying and selling pressures is disrupted. These gaps are typically seen in a sequence of three candles, where a dominant candle is surrounded by others whose wicks fail to fully overlap it. These formations are critical as they often influence future price directions, acting as potential magnets.
Simplifying the Detection of FVGs
The FVG Identifier is engineered to enhance the visibility of Fair Value Gaps, making them starkly apparent even in complex market charts. Its algorithms ensure that these vital market indicators are easily and promptly recognized, allowing traders to spot valuable trading opportunities with minimal effort.
Features of the FVG Identifier
1. Intuitive Interface: The indicator is designed for ease of use, accommodating both beginners and experienced traders.
2. Customizable Settings: It offers flexible configuration options, allowing for adaptation to various trading styles and strategies.
3. Strategic Trading Insight: By highlighting FVGs, the tool provides traders with actionable insights for strategic entry and exit points based on potential price movements.
Elevating Your Trading Strategy
Incorporating the FVG Identifier into your trading arsenal equips you with a nuanced perspective on market analysis. It not only assists in identifying significant market imbalances but also enriches your technical analysis with powerful, data-backed insights.
Revolutionizing Price Action Trading
The FVG Identifier transcends the role of a mere indicator; it represents a significant leap in trading methodology. Compatible with various trading platforms, this tool is ready to enhance your market understanding and application of Fair Value Gaps.
Embrace the FVG Identifier to uncover the hidden dynamics of market gaps and translate these insights into efficient and profitable trading strategies.
Disclaimer:
This indicator is provided for educational purposes only. Trading involves risk, and users should consult with a financial professional before making any trading decisions.
Your Feedback Matters!
Please feel free to comment or reach out if you have any improvement suggestions or if you would like to request the development of a specific indicator. Your feedback is invaluable!
Cari skrip untuk "algo"
Smart Money Oscillator [ChartPrime]The "Smart Money Oscillator " is a premium and discount zone oscillator with BOS and CHoCH built in for further analysis of price action. This indicator works by first determining the the premium and discount zones by using pivot points and high/lows. The top of this oscillator represents the current premium zone while the bottom half of this oscillator represents the discount zone. This oscillator functionally works like a stochastic oscillator with more sophisticated upper and lower bounds generated using smart money concept theories. We have included a moving average to allow the user to visualize the currant momentum in the oscillator. Another key feature we have included lagging divergences to help traders visualize potential reversal conditions.
Understanding the concepts of Premium and Discount zones, as well as Break of Structure (BoS) and Change of Character (CHoCH), is crucial for traders using the Smart Money Oscillator. These concepts are rooted in market structure analysis, which involves studying price levels and movements.
Premium Zone is where the price is considered to be relatively high or 'overbought'. In this zone, prices have risen significantly and may indicate that the asset is becoming overvalued, potentially leading to a reversal or slowdown in the upward trend.
The Discount Zone represents a 'discount' or 'oversold' area. Here, prices have fallen substantially, suggesting that the asset might be undervalued. This could be an indicator of a potential upward reversal or a pause in the downward trend.
Break of Structure (BoS) is about the continuation of a trend. In a bullish trend, a BoS is identified by the break of a recent higher high. In a bearish trend, it's the break of a recent Lower Low. BoS indicates that the trend is strong and likely to continue in its current direction. It's a sign of strength in the prevailing trend, whether up or down.
Change of Character (CHoCH) is an indication of a potential end to a trend. It occurs when there's a significant change in the market's behavior, contradicting the current trend. For example, in an uptrend characterized by higher highs and higher lows, a CHoCH may occur if a new high is formed but then is followed by an impulsive move downwards. This suggests that the bullish trend may be weakening and a bearish reversal could be imminent. CHoCH is essentially a sign of trend exhaustion and potential reversal.
With each consecutive BoS, the signal line of the oscillator will deepen in color. This allows you to visually see the strength of the current trend. The maximum strength of the trend is found by keeping track of the maximum number of consecutive BoS's within a window of 10. This calculation excludes periods without any BoS's to allow for a more stable max.
Quick Update is a feature that implements a more aggressive algorithm to update the highs and lows. Instead of updating the pivot points exclusively to update the range levels, it will attempt to use the current historical highs/lows to update the bounds. This results in a more responsive range at the cost of stability. There are pros and cons for both settings. With Quick Update disabled, the indicator will allow for strong reversals to register without the indicator maxing out. With Quick Update enabled, the indicator will show shorter term extremes with the risk of the signal being pinned to the extremities during strong trends or large movements. With Quick Update disabled, the oscillator prioritizes stability, using a more historical perspective to set its bounds. When Quick Update is enabled, the oscillator becomes more responsive, adjusting its bounds rapidly to reflect the latest market movements.
The Scale Offset feature allows the indicator to break the boundaries of the oscillator. This can be useful when the market is breaking highs or lows allowing the user to identify extremities in price. With Scale Offset disabled the oscillator will always remain inside of the boundaries because the extremities will be updated instantly. When this feature is enabled it will update the boundaries one step behind instead of updating it instantly. This allows the user to more easily see overbought and oversold conditions at the cost of incurring a single bar lag to the boundaries. Generally this is a good idea as this behavior makes the oscillator more sensitive to recent price spikes or drops, reflecting sudden market movements more accurately. It accentuates the extremities of the market conditions, potentially offering a more aggressive analysis. The main trade-off with the Scale Offset feature is between sensitivity and potential overreaction. It offers a more immediate and exaggerated reflection of market conditions but might also lead to misinterpretations in certain scenarios, especially in highly volatile markets.
Divergence is used to predict potential trend reversals. It occurs when the price of an asset and the reading of an oscillator move in opposite directions. This discrepancy can signal a weakening of the current trend and possibly indicate a potential reversal.
Divergence doesn't always lead to a trend reversal, but it's a warning sign that the current trend might be weakening. Divergence can sometimes give false signals, particularly in strongly trending markets where the oscillator may remain in overbought or oversold conditions for extended periods. The lagging nature of using pivot points to calculate divergences means that all divergences are limited by the pivot look forward input. The upside of using a longer look forward is that the divergences will be more accurate. The obvious con here is that it will be more delayed and might be useless by the time it appears. Its recommended to use the built in divergences as a way to learn how these are formed so you can make your own in real time.
By default, the oscillator uses a smoothing of 3 to allow for a more price like behavior while still being rather smooth compared to raw price data. Conversely, you can increase this value to make this indicator behave smoother. Something to keep in mind is that the amount of delay from real time is equal to half of the smoothing period.
We have included a verity of alerts in this indicator. Here is a list of all of the available alerts: Bullish BOS, Bearish BOS, Bullish CHoCH, Bearish CHoCH, Bullish Divergence, Hidden Bullish Divergence, Bearish Divergence, Hidden Bearish Divergence, Cross Over Average, Cross Under Average.
Below are all of the inputs and their tooltips to get you started:
Settings:
Smoothing: Specifies the degree of smoothing applied to the oscillator. Higher values result in smoother but potentially less responsive signals.
Average Length: Sets the length of the moving average applied to the oscillator, affecting its sensitivity and smoothness.
Pivot Length: Specifies the forward-looking length for pivot points, affecting how the oscillator anticipates future price movements. This directly impacts the delay in finding a pivot.
Max Length: Sets the maximum length to consider for calculating the highest values in the oscillator.
Min Length: Defines the minimum length for calculating the lowest values in the oscillator.
Quick Update: Activates a faster update mode for the oscillator's extremities, which may result in less stable range boundaries.
Scale Offset: When enabled, delays updating minimum and maximum values to enhance signal directionality, allowing the signal to occasionally exceed normal bounds.
Candle Color: Enables coloring of candles based on the current directional signal of the oscillator.
Labels:
Enable BOS/CHoCH Labels: Activates the display of BOS (Break of Structure) and CHoCH (Change of Character) labels on the chart.
Visual Padding: Turns on additional visual padding at the top and bottom of the chart to accommodate labels. Determines the amount of visual padding added to the chart for label display.
Divergence:
Divergence Pivot: Defines the number of bars to the right of the pivot in divergence calculations, influencing the oscillator's responsiveness.
Divergence Pivot Forward: Directly impacts latency. Longer periods results in more accurate results at the sacrifice of delay.
Upper Range: Sets the upper range limit for divergence calculations, influencing the oscillator's sensitivity to larger trends.
Lower Range: Determines the lower range limit for divergence calculations, affecting the oscillator's sensitivity to shorter trends.
Symbol: Allows selection of the label style for divergence indicators, with options for text or symbolic representation.
Regular Bullish: Activates the detection and marking of regular bullish divergences in the oscillator.
Hidden Bullish: Enables the identification and display of hidden bullish divergences.
Regular Bearish: Turns on the feature to detect and highlight regular bearish divergences.
Hidden Bearish: Activates the functionality for detecting and displaying hidden bearish divergences.
Color:
Bullish: Determines the minimum/maximum color gradient for bullish signals, impacting the chart's visual appearance.
Bearish: Defines the minimum/maximum color gradient for bearish signals, affecting their visual representation.
Average: Specifies the color for the average line of the oscillator, enhancing chart readability.
CHoCH: Sets the color for bullish/bearish CHoCH (Change of Character) signals.
Premium/Discount: Determines the color for the premium/discount zone in the oscillator's visual representation.
Text Color: Sets the color for the text in BoS/CHoCH labels.
Regular Bullish: Defines the color used to represent regular bullish divergences.
Hidden Bullish: Specifies the color for hidden bullish divergences.
Regular Bearish: Determines the color for hidden bearish divergences.
Divergence Text Color: Specifies the color for the text in divergence labels.
Ehlers Combo Strategy🚀 Presenting the Enhanced Ehlers Combo Strategy 🚀
Hello Traders! 👋 I'm thrilled to share the latest version of the Ehlers Combo Strategy v2.0. This powerful algorithm combines Ehlers Elegant Oscillator, Decycler, Instantaneous Trendline, Spearman Rank, and introduces the Signal to Noise Ratio for even more precise trading signals.
📊 Strategy Highlights:
Ehlers Elegant Oscillator: Captures market momentum and turning points.
Ehlers Decycler: Filters out market noise for clearer trend signals.
Instantaneous Trendline: Offers a dynamic view of the market trend.
Spearman Rank: Analyzes market rank correlations for enhanced insights.
Signal to Noise Ratio (SNR): Filters out noise for more accurate signals.
💡 Key Features & Customizations:
Adaptive Length: Enable adaptive length based on the market's current conditions.
SNR Threshold: Set your desired SNR threshold for filtering signals.
Exit Length: Define the length for exit signals.
📈 Trading Signals:
Long Entry: Elegant Oscillator and Decycler cross above 0, source crosses above Decycler, source is greater than an increasing Instantaneous Trendline, Spearman Rank is positive, and SNR exceeds the threshold.
Long Exit: Source crosses below the Instantaneous Trendline after entering a long position.
Short Entry: Elegant Oscillator and Decycler cross below 0, source crosses below Decycler, source is less than a decreasing Instantaneous Trendline, Spearman Rank is negative, and SNR exceeds the threshold.
Short Exit: Source crosses above the Instantaneous Trendline after entering a short position.
📊 Insights & Enhancements:
Dynamic Length: The strategy adapts its length dynamically based on market conditions.
Improved SNR: Signal to Noise Ratio ensures better filtering of signals.
Enhanced Visualization: The Elegant Oscillator now features improved color coding for a clearer interpretation.
🚨 Disclaimer:
Trading involves risk, and this script should be used judiciously. It's not a guaranteed profit machine, but with careful use, it can be a valuable addition to your toolkit.
Feel free to backtest, tweak, and make it your own! Let's conquer the markets together! 💪📈
🚀✨ Happy Trading! ✨🚀
---
🙌 Credits:
A big shoutout to the original contributors:
@blackcat1402
@cheatcountry
@DasanC
Fair Value Gaps (Volumetric) | Flux Charts💎 GENERAL OVERVIEW
Introducing a brand new Fair Value Gaps (FVG) indicator, now with Volumetric Zones! You can now see the total volume of FVG zones, as well as their bullish & bearish volume ratio.
Features of the Volumetric FVG Indicator :
Render Bullish / Bearish FVG Zones
See Total Volume Of The FVG Zones
See The Ratio Of Bullish / Bearish Bar Volume Of FVG Zones
Combination Of Overlapping FVG Zones
Variety Of Zone Detection/ Sensitivity / Filtering / Invalidation Settings
High Customizability
🚩UNIQUENESS
The ability to render the total volume of FVGs as well as bullish / bearish volume ratio is what sets this FVG indicator apart from others. Also the ability to combine overlapping FVG zones will result in cleaner charts for traders.
⚙️SETTINGS
1. General Configuration
Zone Invalidation -> Select between Wick & Close price for FVG Zone Invalidation.
Zone Filtering -> With "Average Range" selected, algorithm will find FVG zones in comparison with average range of last bars in the chart. With the "Volume Threshold" option, you may select a Volume Threshold % to spot FVGs with a larger total volume than average.
FVG Detection -> With the "Same Type" option, all 3 bars that formed the FVG should be the same type. (Bullish / Bearish). If the "All" option is selected, bar types may vary between Bullish / Bearish.
Detection Sensitivity -> You may select between Low, Normal or High FVG detection sensitivity. This will essentially determine the size of the spotted FVGs, with lower sensitivities resulting in spotting bigger FVGs, and higher sensitivities resulting in spotting all sizes of FVGs.
Show Historic Zones -> If this option is on, the indicator will render invalidated FVG zones as well as current FVG zones. For a cleaner look at current FVG zones which are not invalidated yet, you can turn this option off.
Support and Resistance (MTF) | Flux Charts💎 GENERAL OVERVIEW
Introducing a groundbreaking support and resistance indicator designed to revolutionize your trading experience on TradingView! This innovative tool operates across three distinct timeframes, offering a comprehensive view of market dynamics to help you make informed trading decisions.
The indicator offers a large variety of features :
Select Up To 3 Timeframes
Select Strength Of Supports & Resistances
Select Between Zones & Lines
Show Breaks & Restests
Break & Retest Alerts
Avoid False Breaks
Inverse Color After Broken
Expand Lines & Zones
🚩UNIQUENESS
What sets this indicator apart is its ability to seamlessly integrate and analyze support and resistance levels across multiple timeframes simultaneously. By combining data from three different timeframes, this indicator provides a holistic perspective on market trends and key levels. The adaptive nature of this tool ensures a dynamic assessment of support and resistance zones, empowering traders to adapt to changing market conditions efficiently.
⚙️SETTINGS
1. General Configration
Support & Resistance Count -> Select between 1-3 support & resistance zones for each timeframe.
Pivot Range -> The pivot range is taken into calculations when finding high & low pivots in the chart. Increase if you need a more general look at the support & support zones, or decrease if you need a more detailed look.
Strength -> The strength of the support & resistance zones are determined by how many times the price touched the zone in the past. You can increase the strength up to 4.
Expand Lines & Zones -> If enabled, the support & resistance zones will be expanded to both left and right infinitely. If disabled, the support & resistance zones will be clamped between the time they are first seen, and the time they become broken.
2. Support & Resistance Zones
Enable Zones -> The support & resitsance lines will be converted to zones if enabled.
Zone Width -> The width of the zones. 1 -> %0.05, 2 -> %0.06, 3 -> %0.075.
3. Timeframes
Enable & Disable up to 3 different timeframes using the checkboxes. You can set the timeframes using the selectboxes.
4. Breaks & Retests
Show Breaks -> Points the break points with a blue label with the text "B" on it.
Show Retests -> Points the times when the support & resistance zones are being retested in the current chart.
Avoid False Breaks -> If enabled, the algorithm will try to avoid false break points by comparing the average volume of the point to a longer average volume.
Break Volume Threshold % -> If "Avoid False Breaks" option is enabled, the average volume of the break point should surpass the general average volume by this percent. Higher values mean it's less likely to be a break.
Inverse Color After Broken -> As broken support & resistance zones often become resistance & support zones respectively, if you enable this option the broken zones will inverse their color.
5. Alerts
To make the alerts work, you'll need to add an alert to the chart using the TradingView® alert feature.
Enable Retest Alerts -> You will receive alerts when restests happen on any of the support & resistance zones. "Show Retests" option needs to be enabled to get alerts of this category.
Enable Break Alerts -> You will receive alerts when breaks happen on any of the support & resistance zones.
Mike's Crossover BotGreetings! As a newcomer to coding, I've developed a simple trading bot for experimentation purposes. However, it's important to note that this bot has not undergone rigorous testing, so please exercise caution and use it at your own risk.
Bot Overview:
The bot operates by leveraging two technical indicators: Moving Average Convergence Divergence (MACD) with 7-day and 25-day parameters, and the Relative Strength Index (RSI). These indicators help identify potential buying and selling opportunities in the market.
MACD Crossovers:
The MACD is a trend-following momentum indicator that compares short-term and long-term moving averages. In our bot, we look for crossovers between the 7-day and 25-day MACD lines. A crossover occurs when these lines intersect, suggesting a potential change in market direction.
RSI Confirmation:
To refine our signals, we incorporate the Relative Strength Index (RSI). When a MACD crossover happens, the bot checks if the RSI is below 40. If it is, a buy signal is generated, indicating a potential undervalued condition. Conversely, when the RSI is above 60 during a crossover, a sell signal is triggered, suggesting a potentially overvalued condition.
Important Considerations:
New Coder Disclaimer: This bot is designed for educational purposes, especially for those who are new to coding. It serves as a learning tool and is not intended for live trading without proper testing.
Risk Awareness: Trading always involves risks, and the bot's performance has not been thoroughly tested in live market conditions. It's crucial to exercise caution and be aware of the inherent risks associated with financial markets.
Continuous Learning: Coding and algorithmic trading are dynamic fields. As you explore this bot, consider it a starting point for learning and continuously seek to enhance your understanding and skills in coding and trading strategies.
Remember, the success of any trading strategy depends on various factors, and past performance is not indicative of future results. Always conduct thorough testing before considering any automated strategy for live trading.
Stochastic Trend Evaluator (STE)Stochastic Trend Evaluator (STE): Detailed Description
Overview :
The Stochastic Trend Evaluator (STE) is a sophisticated trading tool designed for TradingView that combines stochastic oscillation analysis with Exponential Moving Average (EMA) trends. It is tailored to assist traders in identifying potential buy and sell opportunities in various market conditions, particularly focusing on trend reversals and momentum shifts.
Functionality & Concept :
The STE is built on two core components – the Stochastic Oscillator and the 200-period EMA.
Stochastic Oscillator :
This oscillator is a momentum indicator comparing a particular closing price of a security to a range of its prices over a certain period.
Settings:
- %K Length: 14
- %K Smoothing: 3
- %D Smoothing: 3
The %K line is the main line indicating momentum, while the %D line is a moving average of %K, providing signal triggers.
200 EMA :
The 200-period EMA serves as a dynamic trend indicator.
It helps in distinguishing between bullish and bearish market phases.
A closing price above the 200 EMA suggests a bullish trend, while below it indicates a bearish trend.
Signal Generation :
STE generates signals based on the interaction between the Stochastic Oscillator and the 200 EMA.
Buy Signal :
Occurs when the stochastic %K crosses above 20 (indicative of oversold conditions), and the closing price is above the 200 EMA.
Represented visually by green label-up arrows.
Sell Signal :
Triggered when the stochastic %K crosses below 80 (suggestive of overbought conditions), and the closing price is below the 200 EMA.
Indicated by red label-down arrows.
Background Color Indicator :
The background color of the chart changes to enhance visual interpretation of the market condition.
Green background for a bullish market scenario (when a buy signal is active).
Red background for a bearish market scenario (when a sell signal is active).
Usage Guidelines :
The STE is best used in markets that exhibit clear trends.
Ideal for traders focusing on medium to long-term trade setups.
Can be used in conjunction with other indicators for confirmation and risk management.
Note : The STE, being a proprietary tool, is based on a unique blend of standard technical analysis concepts and custom logic to provide these trading signals. It is designed to give traders a comprehensive view of the market momentum and trend strength without revealing the intricate details of its algorithm.
KNN ATR Dual Range Predictions [SS]Excited to release this indicator!
I wanted to do a machine learning, ATR based indicator for a while, but I first had to learn about machine learning algos haha.
Now that I have created a KNN based regression methodology (shared in a previous indicator), I can finally do it!
So this is a Nearest Known Neighbor or KNN regression based indicator that uses ATR (average ranges) to predict future ranges.
It operates by calculating the move from High to Open and Open to Low and performing KNN regression to look for other, similar instances of similar movements and what followed those movements.
It provides for 2 methods of KNN regression, the traditional Cluster method (where it identifies a number of clusters within a tolerance range and averages them out), or the method of last instance (where it finds the most recent identical instance and plots the result from that).
You can toggle the parameters as you wish, including the:
a) Type of Regression
b) Number of Clusters
c) Tolerance for Clusters
Others functions:
The indicator provides for the ability to view 2 different timeframe targets. The default calculation is the current timeframe you are on. So if you are on the 1 minute, 5 minute or 1 hour, it will automatically default the primary range to this timeframe. This cannot be changed.
But it permits for a second prediction to be calculated for a timeframe you can specify. The example in the chart above is the 1 hour overlaid on the 5 minute chart.
You can see how the model is performing in the statistics table. The statistics table can be removed as well if you don't want it overlaid on your chart.
You can also toggle off and on the various ranges. IF you only want to visualize 1 hour levels on a 5 minute chart, you can toggle off the bands and just view the higher tf data. Inversely, if you only want the current timeframe data and not the higher tf data, you can toggle the higher tf data off as well.
General Use Tips:
Some general use tips include:
🎯The default settings are appropriate for most common tickers. Because this is performing an autoregression on itself, the parameters tend to be more tight vs. performing dual correlation between two separate tickers which are sizably different in scale (which would require a higher tolerance).
Here is an example of YM1!, which is a sizably larger ticker, however it is performing well with the current settings.
🎯 If you get not great results from your ranges or an error in the correlation table, something like this:
It means the parameters are too tight for what you want to do and it is having trouble identifying other, similar cases (in this case, the lookback length was significantly shortened). The first step is to:
a) Expand your lookback range (up to 500 is usually sufficient). This should resolve most issues in most cases. If not:
b) If you are using the Cluster method, try broadening your cluster tolerance by 0.5 increments.
Between those two implementations, you should get a functional model. And it actually honestly hasn't happened to me in general use, I had to force that example by significantly shortening the lookback period.
Concluding Remarks
And that's pretty much the indicator.
I hope you enjoy it! I was really excited to be finally able to do it, like I said I attempted to do this for a while but needed to research the whole KNN process and how its performed.
Enjoy and leave your comments and questions below!
Supertrend Advance Pullback StrategyHandbook for the Supertrend Advance Strategy
1. Introduction
Purpose of the Handbook:
The main purpose of this handbook is to serve as a comprehensive guide for traders and investors who are looking to explore and harness the potential of the Supertrend Advance Strategy. In the rapidly changing financial market, having the right tools and strategies at one's disposal is crucial. Whether you're a beginner hoping to dive into the world of trading or a seasoned investor aiming to optimize and diversify your portfolio, this handbook offers the insights and methodologies you need. By the end of this guide, readers should have a clear understanding of how the Supertrend Advance Strategy works, its benefits, potential pitfalls, and practical application in various trading scenarios.
Overview of the Supertrend Advance Pullback Strategy:
At its core, the Supertrend Advance Strategy is an evolution of the popular Supertrend Indicator. Designed to generate buy and sell signals in trending markets, the Supertrend Indicator has been a favorite tool for many traders around the world. The Advance Strategy, however, builds upon this foundation by introducing enhanced mechanisms, filters, and methodologies to increase precision and reduce false signals.
1. Basic Concept:
The Supertrend Advance Strategy relies on a combination of price action and volatility to determine the potential trend direction. By assessing the average true range (ATR) in conjunction with specific price points, this strategy aims to highlight the potential starting and ending points of market trends.
2. Methodology:
Unlike the traditional Supertrend Indicator, which primarily focuses on closing prices and ATR, the Advance Strategy integrates other critical market variables, such as volume, momentum oscillators, and perhaps even fundamental data, to validate its signals. This multidimensional approach ensures that the generated signals are more reliable and are less prone to market noise.
3. Benefits:
One of the main benefits of the Supertrend Advance Strategy is its ability to filter out false breakouts and minor price fluctuations, which can often lead to premature exits or entries in the market. By waiting for a confluence of factors to align, traders using this advanced strategy can increase their chances of entering or exiting trades at optimal points.
4. Practical Applications:
The Supertrend Advance Strategy can be applied across various timeframes, from intraday trading to swing trading and even long-term investment scenarios. Furthermore, its flexible nature allows it to be tailored to different asset classes, be it stocks, commodities, forex, or cryptocurrencies.
In the subsequent sections of this handbook, we will delve deeper into the intricacies of this strategy, offering step-by-step guidelines on its application, case studies, and tips for maximizing its efficacy in the volatile world of trading.
As you journey through this handbook, we encourage you to approach the Supertrend Advance Strategy with an open mind, testing and tweaking it as per your personal trading style and risk appetite. The ultimate goal is not just to provide you with a new tool but to empower you with a holistic strategy that can enhance your trading endeavors.
2. Getting Started
Navigating the financial markets can be a daunting task without the right tools. This section is dedicated to helping you set up the Supertrend Advance Strategy on one of the most popular charting platforms, TradingView. By following the steps below, you'll be able to integrate this strategy into your charts and start leveraging its insights in no time.
Setting up on TradingView:
TradingView is a web-based platform that offers a wide range of charting tools, social networking, and market data. Before you can apply the Supertrend Advance Strategy, you'll first need a TradingView account. If you haven't set one up yet, here's how:
1. Account Creation:
• Visit TradingView's official website.
• Click on the "Join for free" or "Sign up" button.
• Follow the registration process, providing the necessary details and setting up your login credentials.
2. Navigating the Dashboard:
• Once logged in, you'll be taken to your dashboard. Here, you'll see a variety of tools, including watchlists, alerts, and the main charting window.
• To begin charting, type in the name or ticker of the asset you're interested in the search bar at the top.
3. Configuring Chart Settings:
• Before integrating the Supertrend Advance Strategy, familiarize yourself with the chart settings. This can be accessed by clicking the 'gear' icon on the top right of the chart window.
• Adjust the chart type, time intervals, and other display settings to your preference.
Integrating the Strategy into a Chart:
Now that you're set up on TradingView, it's time to integrate the Supertrend Advance Strategy.
1. Accessing the Pine Script Editor:
• Located at the top-center of your screen, you'll find the "Pine Editor" tab. Click on it.
• This is where custom strategies and indicators are scripted or imported.
2. Loading the Supertrend Advance Strategy Script:
• Depending on whether you have the script or need to find it, there are two paths:
• If you have the script: Copy the Supertrend Advance Strategy script, and then paste it into the Pine Editor.
• If searching for the script: Click on the “Indicators” icon (looks like a flame) at the top of your screen, and then type “Supertrend Advance Strategy” in the search bar. If available, it will show up in the list. Simply click to add it to your chart.
3. Applying the Strategy:
• After pasting or selecting the Supertrend Advance Strategy in the Pine Editor, click on the “Add to Chart” button located at the top of the editor. This will overlay the strategy onto your main chart window.
4. Configuring Strategy Settings:
• Once the strategy is on your chart, you'll notice a small settings ('gear') icon next to its name in the top-left of the chart window. Click on this to access settings.
• Here, you can adjust various parameters of the Supertrend Advance Strategy to better fit your trading style or the specific asset you're analyzing.
5. Interpreting Signals:
• With the strategy applied, you'll now see buy/sell signals represented on your chart. Take time to familiarize yourself with how these look and behave over various timeframes and market conditions.
3. Strategy Overview
What is the Supertrend Advance Strategy?
The Supertrend Advance Strategy is a refined version of the classic Supertrend Indicator, which was developed to aid traders in spotting market trends. The strategy utilizes a combination of data points, including average true range (ATR) and price momentum, to generate buy and sell signals.
In essence, the Supertrend Advance Strategy can be visualized as a line that moves with the price. When the price is above the Supertrend line, it indicates an uptrend and suggests a potential buy position. Conversely, when the price is below the Supertrend line, it hints at a downtrend, suggesting a potential selling point.
Strategy Goals and Objectives:
1. Trend Identification: At the core of the Supertrend Advance Strategy is the goal to efficiently and consistently identify prevailing market trends. By recognizing these trends, traders can position themselves to capitalize on price movements in their favor.
2. Reducing Noise: Financial markets are often inundated with 'noise' - short-term price fluctuations that can mislead traders. The Supertrend Advance Strategy aims to filter out this noise, allowing for clearer decision-making.
3. Enhancing Risk Management: With clear buy and sell signals, traders can set more precise stop-loss and take-profit points. This leads to better risk management and potentially improved profitability.
4. Versatility: While primarily used for trend identification, the strategy can be integrated with other technical tools and indicators to create a comprehensive trading system.
Type of Assets/Markets to Apply the Strategy:
1. Equities: The Supertrend Advance Strategy is highly popular among stock traders. Its ability to capture long-term trends makes it particularly useful for those trading individual stocks or equity indices.
2. Forex: Given the 24-hour nature of the Forex market and its propensity for trends, the Supertrend Advance Strategy is a valuable tool for currency traders.
3. Commodities: Whether it's gold, oil, or agricultural products, commodities often move in extended trends. The strategy can help in identifying and capitalizing on these movements.
4. Cryptocurrencies: The volatile nature of cryptocurrencies means they can have pronounced trends. The Supertrend Advance Strategy can aid crypto traders in navigating these often tumultuous waters.
5. Futures & Options: Traders and investors in derivative markets can utilize the strategy to make more informed decisions about contract entries and exits.
It's important to note that while the Supertrend Advance Strategy can be applied across various assets and markets, its effectiveness might vary based on market conditions, timeframe, and the specific characteristics of the asset in question. As always, it's recommended to use the strategy in conjunction with other analytical tools and to backtest its effectiveness in specific scenarios before committing to trades.
4. Input Settings
Understanding and correctly configuring input settings is crucial for optimizing the Supertrend Advance Strategy for any specific market or asset. These settings, when tweaked correctly, can drastically impact the strategy's performance.
Grouping Inputs:
Before diving into individual input settings, it's important to group similar inputs. Grouping can simplify the user interface, making it easier to adjust settings related to a specific function or indicator.
Strategy Choice:
This input allows traders to select from various strategies that incorporate the Supertrend indicator. Options might include "Supertrend with RSI," "Supertrend with MACD," etc. By choosing a strategy, the associated input settings for that strategy become available.
Supertrend Settings:
1. Multiplier: Typically, a default value of 3 is used. This multiplier is used in the ATR calculation. Increasing it makes the Supertrend line further from prices, while decreasing it brings the line closer.
2. Period: The number of bars used in the ATR calculation. A common default is 7.
EMA Settings (Exponential Moving Average):
1. Period: Defines the number of previous bars used to calculate the EMA. Common periods are 9, 21, 50, and 200.
2. Source: Allows traders to choose which price (Open, Close, High, Low) to use in the EMA calculation.
RSI Settings (Relative Strength Index):
1. Length: Determines how many periods are used for RSI calculation. The standard setting is 14.
2. Overbought Level: The threshold at which the asset is considered overbought, typically set at 70.
3. Oversold Level: The threshold at which the asset is considered oversold, often at 30.
MACD Settings (Moving Average Convergence Divergence):
1. Short Period: The shorter EMA, usually set to 12.
2. Long Period: The longer EMA, commonly set to 26.
3. Signal Period: Defines the EMA of the MACD line, typically set at 9.
CCI Settings (Commodity Channel Index):
1. Period: The number of bars used in the CCI calculation, often set to 20.
2. Overbought Level: Typically set at +100, denoting overbought conditions.
3. Oversold Level: Usually set at -100, indicating oversold conditions.
SL/TP Settings (Stop Loss/Take Profit):
1. SL Multiplier: Defines the multiplier for the average true range (ATR) to set the stop loss.
2. TP Multiplier: Defines the multiplier for the average true range (ATR) to set the take profit.
Filtering Conditions:
This section allows traders to set conditions to filter out certain signals. For example, one might only want to take buy signals when the RSI is below 30, ensuring they buy during oversold conditions.
Trade Direction and Backtest Period:
1. Trade Direction: Allows traders to specify whether they want to take long trades, short trades, or both.
2. Backtest Period: Specifies the time range for backtesting the strategy. Traders can choose from options like 'Last 6 months,' 'Last 1 year,' etc.
It's essential to remember that while default settings are provided for many of these tools, optimal settings can vary based on the market, timeframe, and trading style. Always backtest new settings on historical data to gauge their potential efficacy.
5. Understanding Strategy Conditions
Developing an understanding of the conditions set within a trading strategy is essential for traders to maximize its potential. Here, we delve deep into the logic behind these conditions, using the Supertrend Advance Strategy as our focal point.
Basic Logic Behind Conditions:
Every strategy is built around a set of conditions that provide buy or sell signals. The conditions are based on mathematical or statistical methods and are rooted in the study of historical price data. The fundamental idea is to recognize patterns or behaviors that have been profitable in the past and might be profitable in the future.
Buy and Sell Conditions:
1. Buy Conditions: Usually formulated around bullish signals or indicators suggesting upward price momentum.
2. Sell Conditions: Centered on bearish signals or indicators indicating downward price momentum.
Simple Strategy:
The simple strategy could involve using just the Supertrend indicator. Here:
• Buy: When price closes above the Supertrend line.
• Sell: When price closes below the Supertrend line.
Pullback Strategy:
This strategy capitalizes on price retracements:
• Buy: When the price retraces to the Supertrend line after a bullish signal and is supported by another bullish indicator.
• Sell: When the price retraces to the Supertrend line after a bearish signal and is confirmed by another bearish indicator.
Indicators Used:
EMA (Exponential Moving Average):
• Logic: EMA gives more weight to recent prices, making it more responsive to current price movements. A shorter-period EMA crossing above a longer-period EMA can be a bullish sign, while the opposite is bearish.
RSI (Relative Strength Index):
• Logic: RSI measures the magnitude of recent price changes to analyze overbought or oversold conditions. Values above 70 are typically considered overbought, and values below 30 are considered oversold.
MACD (Moving Average Convergence Divergence):
• Logic: MACD assesses the relationship between two EMAs of a security’s price. The MACD line crossing above the signal line can be a bullish signal, while crossing below can be bearish.
CCI (Commodity Channel Index):
• Logic: CCI compares a security's average price change with its average price variation. A CCI value above +100 may mean the price is overbought, while below -100 might signify an oversold condition.
And others...
As the strategy expands or contracts, more indicators might be added or removed. The crucial point is to understand the core logic behind each, ensuring they align with the strategy's objectives.
Logic Behind Each Indicator:
1. EMA: Emphasizes recent price movements; provides dynamic support and resistance levels.
2. RSI: Indicates overbought and oversold conditions based on recent price changes.
3. MACD: Showcases momentum and direction of a trend by comparing two EMAs.
4. CCI: Measures the difference between a security's price change and its average price change.
Understanding strategy conditions is not just about knowing when to buy or sell but also about comprehending the underlying market dynamics that those conditions represent. As you familiarize yourself with each condition and indicator, you'll be better prepared to adapt and evolve with the ever-changing financial markets.
6. Trade Execution and Management
Trade execution and management are crucial aspects of any trading strategy. Efficient execution can significantly impact profitability, while effective management can preserve capital during adverse market conditions. In this section, we'll explore the nuances of position entry, exit strategies, and various Stop Loss (SL) and Take Profit (TP) methodologies within the Supertrend Advance Strategy.
Position Entry:
Effective trade entry revolves around:
1. Timing: Enter at a point where the risk-reward ratio is favorable. This often corresponds to confirmatory signals from multiple indicators.
2. Volume Analysis: Ensure there's adequate volume to support the movement. Volume can validate the strength of a signal.
3. Confirmation: Use multiple indicators or chart patterns to confirm the entry point. For instance, a buy signal from the Supertrend indicator can be confirmed with a bullish MACD crossover.
Position Exit Strategies:
A successful exit strategy will lock in profits and minimize losses. Here are some strategies:
1. Fixed Time Exit: Exiting after a predetermined period.
2. Percentage-based Profit Target: Exiting after a certain percentage gain.
3. Indicator-based Exit: Exiting when an indicator gives an opposing signal.
Percentage-based SL/TP:
• Stop Loss (SL): Set a fixed percentage below the entry price to limit potential losses.
• Example: A 2% SL on an entry at $100 would trigger a sell at $98.
• Take Profit (TP): Set a fixed percentage above the entry price to lock in gains.
• Example: A 5% TP on an entry at $100 would trigger a sell at $105.
Supertrend-based SL/TP:
• Stop Loss (SL): Position the SL at the Supertrend line. If the price breaches this line, it could indicate a trend reversal.
• Take Profit (TP): One could set the TP at a point where the Supertrend line flattens or turns, indicating a possible slowdown in momentum.
Swing high/low-based SL/TP:
• Stop Loss (SL): For a long position, set the SL just below the recent swing low. For a short position, set it just above the recent swing high.
• Take Profit (TP): For a long position, set the TP near a recent swing high or resistance. For a short position, near a swing low or support.
And other methods...
1. Trailing Stop Loss: This dynamic SL adjusts with the price movement, locking in profits as the trade moves in your favor.
2. Multiple Take Profits: Divide the position into segments and set multiple TP levels, securing profits in stages.
3. Opposite Signal Exit: Exit when another reliable indicator gives an opposite signal.
Trade execution and management are as much an art as they are a science. They require a blend of analytical skill, discipline, and intuition. Regularly reviewing and refining your strategies, especially in light of changing market conditions, is crucial to maintaining consistent trading performance.
7. Visual Representations
Visual tools are essential for traders, as they simplify complex data into an easily interpretable format. Properly analyzing and understanding the plots on a chart can provide actionable insights and a more intuitive grasp of market conditions. In this section, we’ll delve into various visual representations used in the Supertrend Advance Strategy and their significance.
Understanding Plots on the Chart:
Charts are the primary visual aids for traders. The arrangement of data points, lines, and colors on them tell a story about the market's past, present, and potential future moves.
1. Data Points: These represent individual price actions over a specific timeframe. For instance, a daily chart will have data points showing the opening, closing, high, and low prices for each day.
2. Colors: Used to indicate the nature of price movement. Commonly, green is used for bullish (upward) moves and red for bearish (downward) moves.
Trend Lines:
Trend lines are straight lines drawn on a chart that connect a series of price points. Their significance:
1. Uptrend Line: Drawn along the lows, representing support. A break below might indicate a trend reversal.
2. Downtrend Line: Drawn along the highs, indicating resistance. A break above might suggest the start of a bullish trend.
Filled Areas:
These represent a range between two values on a chart, usually shaded or colored. For instance:
1. Bollinger Bands: The area between the upper and lower band is filled, giving a visual representation of volatility.
2. Volume Profile: Can show a filled area representing the amount of trading activity at different price levels.
Stop Loss and Take Profit Lines:
These are horizontal lines representing pre-determined exit points for trades.
1. Stop Loss Line: Indicates the level at which a trade will be automatically closed to limit losses. Positioned according to the trader's risk tolerance.
2. Take Profit Line: Denotes the target level to lock in profits. Set according to potential resistance (for long trades) or support (for short trades) or other technical factors.
Trailing Stop Lines:
A trailing stop is a dynamic form of stop loss that moves with the price. On a chart:
1. For Long Trades: Starts below the entry price and moves up with the price but remains static if the price falls, ensuring profits are locked in.
2. For Short Trades: Starts above the entry price and moves down with the price but remains static if the price rises.
Visual representations offer traders a clear, organized view of market dynamics. Familiarity with these tools ensures that traders can quickly and accurately interpret chart data, leading to more informed decision-making. Always ensure that the visual aids used resonate with your trading style and strategy for the best results.
8. Backtesting
Backtesting is a fundamental process in strategy development, enabling traders to evaluate the efficacy of their strategy using historical data. It provides a snapshot of how the strategy would have performed in past market conditions, offering insights into its potential strengths and vulnerabilities. In this section, we'll explore the intricacies of setting up and analyzing backtest results and the caveats one must be aware of.
Setting Up Backtest Period:
1. Duration: Determine the timeframe for the backtest. It should be long enough to capture various market conditions (bullish, bearish, sideways). For instance, if you're testing a daily strategy, consider a period of several years.
2. Data Quality: Ensure the data source is reliable, offering high-resolution and clean data. This is vital to get accurate backtest results.
3. Segmentation: Instead of a continuous period, sometimes it's helpful to backtest over distinct market phases, like a particular bear or bull market, to see how the strategy holds up in different environments.
Analyzing Backtest Results:
1. Performance Metrics: Examine metrics like the total return, annualized return, maximum drawdown, Sharpe ratio, and others to gauge the strategy's efficiency.
2. Win Rate: It's the ratio of winning trades to total trades. A high win rate doesn't always signify a good strategy; it should be evaluated in conjunction with other metrics.
3. Risk/Reward: Understand the average profit versus the average loss per trade. A strategy might have a low win rate but still be profitable if the average gain far exceeds the average loss.
4. Drawdown Analysis: Review the periods of losses the strategy could incur and how long it takes, on average, to recover.
9. Tips and Best Practices
Successful trading requires more than just knowing how a strategy works. It necessitates an understanding of when to apply it, how to adjust it to varying market conditions, and the wisdom to recognize and avoid common pitfalls. This section offers insightful tips and best practices to enhance the application of the Supertrend Advance Strategy.
When to Use the Strategy:
1. Market Conditions: Ideally, employ the Supertrend Advance Strategy during trending market conditions. This strategy thrives when there are clear upward or downward trends. It might be less effective during consolidative or sideways markets.
2. News Events: Be cautious around significant news events, as they can cause extreme volatility. It might be wise to avoid trading immediately before and after high-impact news.
3. Liquidity: Ensure you are trading in assets/markets with sufficient liquidity. High liquidity ensures that the price movements are more reflective of genuine market sentiment and not due to thin volume.
Adjusting Settings for Different Markets/Timeframes:
1. Markets: Each market (stocks, forex, commodities) has its own characteristics. It's essential to adjust the strategy's parameters to align with the market's volatility and liquidity.
2. Timeframes: Shorter timeframes (like 1-minute or 5-minute charts) tend to have more noise. You might need to adjust the settings to filter out false signals. Conversely, for longer timeframes (like daily or weekly charts), you might need to be more responsive to genuine trend changes.
3. Customization: Regularly review and tweak the strategy's settings. Periodic adjustments can ensure the strategy remains optimized for the current market conditions.
10. Frequently Asked Questions (FAQs)
Given the complexities and nuances of the Supertrend Advance Strategy, it's only natural for traders, both new and seasoned, to have questions. This section addresses some of the most commonly asked questions regarding the strategy.
1. What exactly is the Supertrend Advance Strategy?
The Supertrend Advance Strategy is an evolved version of the traditional Supertrend indicator. It's designed to provide clearer buy and sell signals by incorporating additional indicators like EMA, RSI, MACD, CCI, etc. The strategy aims to capitalize on market trends while minimizing false signals.
2. Can I use the Supertrend Advance Strategy for all asset types?
Yes, the strategy can be applied to various asset types like stocks, forex, commodities, and cryptocurrencies. However, it's crucial to adjust the settings accordingly to suit the specific characteristics and volatility of each asset type.
3. Is this strategy suitable for day trading?
Absolutely! The Supertrend Advance Strategy can be adjusted to suit various timeframes, making it versatile for both day trading and long-term trading. Remember to fine-tune the settings to align with the timeframe you're trading on.
4. How do I deal with false signals?
No strategy is immune to false signals. However, by combining the Supertrend with other indicators and adhering to strict risk management protocols, you can minimize the impact of false signals. Always use stop-loss orders and consider filtering trades with additional confirmation signals.
5. Do I need any prior trading experience to use this strategy?
While the Supertrend Advance Strategy is designed to be user-friendly, having a foundational understanding of trading and market analysis can greatly enhance your ability to employ the strategy effectively. If you're a beginner, consider pairing the strategy with further education and practice on demo accounts.
6. How often should I review and adjust the strategy settings?
There's no one-size-fits-all answer. Some traders adjust settings weekly, while others might do it monthly. The key is to remain responsive to changing market conditions. Regular backtesting can give insights into potential required adjustments.
7. Can the Supertrend Advance Strategy be automated?
Yes, many traders use algorithmic trading platforms to automate their strategies, including the Supertrend Advance Strategy. However, always monitor automated systems regularly to ensure they're operating as intended.
8. Are there any markets or conditions where the strategy shouldn't be used?
The strategy might generate more false signals in markets that are consolidative or range-bound. During significant news events or times of unexpected high volatility, it's advisable to tread with caution or stay out of the market.
9. How important is backtesting with this strategy?
Backtesting is crucial as it allows traders to understand how the strategy would have performed in the past, offering insights into potential profitability and areas of improvement. Always backtest any new setting or tweak before applying it to live trades.
10. What if the strategy isn't working for me?
No strategy guarantees consistent profits. If it's not working for you, consider reviewing your settings, seeking expert advice, or complementing the Supertrend Advance Strategy with other analysis methods. Remember, continuous learning and adaptation are the keys to trading success.
Other comments
Value of combining several indicators in this script and how they work together
Diversification of Signals: Just as diversifying an investment portfolio can reduce risk, using multiple indicators can offer varied perspectives on potential price movements. Each indicator can capture a different facet of the market, ensuring that traders are not overly reliant on a single data point.
Confirmation & Reduced False Signals: A common challenge with many indicators is the potential for false signals. By requiring confirmation from multiple indicators before acting, the chances of acting on a false signal can be significantly reduced.
Flexibility Across Market Conditions: Different indicators might perform better under different market conditions. For example, while moving averages might excel in trending markets, oscillators like RSI might be more useful during sideways or range-bound conditions. A mashup strategy can potentially adapt better to varying market scenarios.
Comprehensive Analysis: With multiple indicators, traders can gauge trend strength, momentum, volatility, and potential market reversals all at once, providing a holistic view of the market.
How do the different indicators in the Supertrend Advance Strategy work together?
Supertrend: This is primarily a trend-following indicator. It provides traders with buy and sell signals based on the volatility of the price. When combined with other indicators, it can filter out noise and give more weight to strong, confirmed trends.
EMA (Exponential Moving Average): EMA gives more weight to recent price data. It can be used to identify the direction and strength of a trend. When the price is above the EMA, it's generally considered bullish, and vice versa.
RSI (Relative Strength Index): An oscillator that measures the magnitude of recent price changes to evaluate overbought or oversold conditions. By cross-referencing with other indicators like EMA or MACD, traders can spot potential reversals or confirmations of a trend.
MACD (Moving Average Convergence Divergence): This indicator identifies changes in the strength, direction, momentum, and duration of a trend in a stock's price. When the MACD line crosses above the signal line, it can be a bullish sign, and when it crosses below, it can be bearish. Pairing MACD with Supertrend can provide dual confirmation of a trend.
CCI (Commodity Channel Index): Initially developed for commodities, CCI can indicate overbought or oversold conditions. It can be used in conjunction with other indicators to determine entry and exit points.
In essence, the synergy of these indicators provides a balanced, comprehensive approach to trading. Each indicator offers its unique lens into market conditions, and when they align, it can be a powerful indication of a trading opportunity. This combination not only reduces the potential drawbacks of each individual indicator but leverages their strengths, aiming for more consistent and informed trading decisions.
Backtesting and Default Settings
• This indicator has been optimized to be applied for 1 hour-charts. However, the underlying principles of this strategy are supply and demand in the financial markets and the strategy can be applied to all timeframes. Daytraders can use the 1min- or 5min charts, swing-traders can use the daily charts.
• This strategy has been designed to identify the most promising, highest probability entries and trades for each stock or other financial security.
• The combination of the qualifiers results in a highly selective strategy which only considers the most promising swing-trading entries. As a result, you will normally only find a low number of trades for each stock or other financial security per year in case you apply this strategy for the daily charts. Shorter timeframes will result in a higher number of trades / year.
• Consequently, traders need to apply this strategy for a full watchlist rather than just one financial security.
• Default properties: RSI on (length 14, RSI buy level 50, sell level 50), EMA, RSI, MACD on, type of strategy pullback, SL/TP type: ATR (length 10, factor 3), trade direction both, quantity 5, take profit swing hl 5.1, highest / lowest lookback 2, enable ATR trail (ATR length 10, SL ATR multiplier 1.4, TP multiplier 2.1, lookback = 4, trade direction = both).
savitzkyGolay, KAMA, HPOverview
This trading indicator integrates three distinct analytical tools: the Savitzky-Golay Filter, Kaufman Adaptive Moving Average (KAMA), and Hodrick-Prescott (HP) Filter. It is designed to provide a comprehensive analysis of market trends and potential trading signals.
Components
Hodrick-Prescott (HP) Filter
Purpose: Smooths out the price data to identify the underlying trend.
Parameters: Lambda: Controls the smoothness. Range: 50 to 1600.
Impact of Parameters:
Increasing Lambda: This makes the trend line more responsive to short-term market fluctuations, suitable for short-term analysis. A higher Lambda value decreases the degree of smoothing, making the trend line follow recent market movements more closely.
Decreasing Lambda: A lower Lambda value makes the trend line smoother and less responsive to short-term market fluctuations, ideal for longer-term trend analysis. Decreasing Lambda increases the degree of smoothing, thereby filtering out minor market movements and focusing more on the long-term trend.
Kaufman Adaptive Moving Average (KAMA):
Purpose: An adaptive moving average that adjusts to price volatility.
Parameters: Length, Fast Length, Slow Length: Define the sensitivity and adaptiveness of KAMA.
Impact of Parameters:
Adjusting Length affects the base period for efficiency ratio, altering the overall sensitivity.
Fast Length and Slow Length control the speed of KAMA’s adaptation. A smaller Fast Length makes KAMA more sensitive to price changes, while a larger Slow Length makes it less sensitive.
Savitzky-Golay Filter:
Purpose: Smooths the price data using polynomial regression.
Parameters: Window Size: Determines the size of the moving window (7, 9, 11, 15, 21).
Impact of Parameters:
A larger Window Size results in a smoother curve, which is more effective for identifying long-term trends but can delay reaction to recent market changes.
A smaller Window Size makes the curve more responsive to short-term price movements, suitable for short-term trading strategies.
General Impact of Parameters
Adjusting these parameters can significantly alter the signals generated by the indicator. Users should fine-tune these settings based on their trading style, the characteristics of the traded asset, and market conditions to optimize the indicator's performance.
Signal Logic
Buy Signal: The trend from the HP filter is below both the KAMA and the Savitzky-Golay SMA, and none of these indicators are flat.
Sell Signal: The trend from the HP filter is above both the KAMA and the Savitzky-Golay SMA, and none of these indicators are flat.
Usage
Due to the combination of smoothing algorithms and adaptability, this indicator is highly effective at identifying emerging trends for both initiating long and short positions.
IMPORTANT : Although the code and user settings incorporate measures to limit false signals due to lateral (sideways) movement, they do not completely eliminate such occurrences. Users are strongly advised to avoid signals that emerge during simultaneous lateral movements of all three indicators.
Despite the indicator's success in historical data analysis using its signals alone, it is highly recommended to use this code in combination with other indicators, patterns, and zones. This is particularly important for determining exit points from positions, which can significantly enhance trading results.
Limitations and Recommendations
The indicator has shown excellent performance on the weekly time frame (TF) with the following settings:
Savitzky-Golay (SG): 11
Hodrick-Prescott (HP): 100
Kaufman Adaptive Moving Average (KAMA): 20, 2, 30
For the monthly TF, the recommended settings are:
SG: 15
HP: 100
KAMA: 30, 2, 35
Note: The monthly TF is quite variable. With these settings, there may be fewer signals, but they tend to be more relevant for long-term investors. Based on a sample of 40 different stocks from various countries and sectors, most exhibited an average trade return in the thousands of percent.
It's important to note that while these settings have been successful in past performance, market conditions vary and past performance is not indicative of future results. Users are encouraged to experiment with these settings and adjust them according to their individual needs and market analysis.
As this is my first developed trading indicator, I am very open to and appreciative of any suggestions or comments. Your feedback is invaluable in helping me refine and improve this tool. Please feel free to share your experiences, insights, or any recommendations you may have.
[KVA]Body Percentage Counter This indicator presents a comprehensive view of the historical candle data within user-defined body percentage ranges. Each column represents a specific body size percentage threshold, starting from as low as 0.01% and extending up to 20%.
The rows categorize candles by their closing and opening price differences, effectively sorting them into green (bullish) and red (bearish) candles based on whether they closed higher or lower than their opening prices.
First Row of the table is the bu
For developers, this table can be immensely useful in determining stop-loss ranges. By analyzing the frequency of candles that fall within certain body percentage ranges, developers can better understand where to set stop-loss orders. For instance, if a developer notices a high frequency of candles with body sizes within a specific percentage range, they may choose to set their stop-loss orders outside of this range to avoid being stopped out by normal market fluctuations.
Moreover, the indicator can be used to:
Volatility Assessment : The indicator can be used to gauge market volatility. Smaller bodies may indicate consolidation periods, while larger bodies might suggest more volatile market conditions.
Optimize Trading Strategies : Adjust entry and exit points based on the prevalence of certain candle sizes.
Risk Management : Determine the commonality of price movements within a certain range to better manage risks.
Backtesting : Use historical data to backtest how different stop-loss ranges would have performed in the past.
Comparative Analysis : Traders can compare the frequency of different body sizes over a selected period, providing insights into how the market is evolving.
Educational Use : For new traders, the indicator can serve as an educational tool to understand the implications of candlestick sizes and their relationship with market dynamics
The data provided in this output can guide developers to make more informed decisions about where to place stop-loss orders, potentially increasing the effectiveness of their trading algorithms or manual trading strategies.
The output of the " Body Percentage Counter" indicator is organized into a table format, which can be broken down as follows:
Header (First Row) : This row lists the body percentage thresholds used to categorize the candles. It starts from 0.01% and increases incrementally to 20%. These thresholds are likely set by the user and represent the range of candle body sizes as a percentage of the total candle size.
Green Candle Count (Second Row) : This row displays the count of green candles—candles where the close price is higher than the open price—that fall within each body percentage threshold. For example, under the column "0.01", the number 25 indicates there are 25 green candles whose body size is 0.01% of the total candle size.
Red Candle Count (Third Row) : This row shows the count of red candles—candles where the close price is lower than the open price—for each body percentage threshold. The numbers in this row reflect the number of red candles that match the body percentage criteria in the corresponding column.
Total Candle Count (Fourth Row) : This row sums the counts of both green and red candles for each body percentage threshold, providing a total count of candles that have a body size within the specific range. For instance, if under "0.01" the green count is 25 and the red count is 26, then the total would be 51.
This organized data representation allows users to quickly assess the distribution of candle body sizes over a historical period, which is especially useful for determining the frequency of price movements that are significant enough to consider for stop-loss settings or other trade management decisions.
hamster-bot MRS 2 (simplified version) MRS - Mean Reversion Strategy (Countertrend) (Envelope strategy)
This script does not claim to be unique and does not mislead anyone. Even the unattractive backtest result is attached. The source code is open. The idea has been described many times in various sources. But at the same time, their collection in one place provides unique opportunities.
Published by popular demand and for ease of use. so that users can track the development of the script and can offer their ideas in the comments. Otherwise, you have to communicate in several telegram chats.
Representative of the family of counter-trend strategies. The basis of the strategy is Mean reversion . You can also read about the Envelope strategy .
Mean reversion , or reversion to the mean, is a theory used in finance that suggests that asset price volatility and historical returns eventually will revert to the long-run mean or average level of the entire dataset.
The strategy is very simple. Has very few settings. Good for beginners to get acquainted with algorithmic trading. A simple adjustment will help avoid overfitting. There are many variations of this strategy, but for understanding it is better to start with this implementation.
Principle of operation.
1)
A conventional MA is being built. (fuchsia line). A limit order is placed on this line to close the position.
2)
(green line) A limit order is placed on this line to open a long position
3)
(red line) A limit order is placed on this line to open a short position
Attention!
Please note that a limit order is used. Conclude that the strategy has a limited capacity. And the results obtained on low-liquid instruments will be too high in the tester. On real auctions there will be a different result.
Note for testing the strategy in the spot market:
When testing in the spot market, do not include both long and short at the same time. It is recommended to test only the long mode on the spot. Short mode for more advanced users.
Settings:
Available types of moving averages:
SMA
EMA
TEMA - triple exponential moving average
DEMA - Double Exponential Moving Average
ZLEMA - Zero lag exponential moving average
WMA - weighted moving average
Hma - Hull Moving Average
Thma - Triple Exponential Hull Moving Average
Ehma - Exponential Hull Moving Average
H - MA built based on highs for n candles | ta.highest(len)
L - MA built based on lows for n candles | ta.lowest(len)
DMA - Donchian Moving Average
A Kalman filter can be applied to all MA
The peculiarity of the strategy is a large selection of MA and the possibility of shifting lines. You can set up a reverse trending strategy on the Donchian channel for example.
Use Long - enable/disable opening a Long position
Use Short - enable/disable opening a Short position
Lot Long, % - % allocated from the deposit for opening a Long position. In the spot market, do not use % greater than 100%
Lot Short, % - allocated % of the deposit for opening a Short position
Start date - the beginning of the testing period
End date - the end of the testing period (Example: only August 2020 can be tested)
Mul - multiplier. Used to offset lines. Example:
Mul = 0.99 is shift -1%
Mul = 1.01 is shift +1%
Non-strict recommendations:
1) Test the SPOT market on crypto exchanges. (The countertrend strategy has liquidation risk on futures)
2) Symbols altcoin/bitcoin or altcoin/altcoin. Example: ETH/BTC or DOGE/ETH
3) Timeframe is usually 1 hour
If the script passes moderation, I will supplement it by adding separate settings for closing long and short positions according to their MA
TUE Renko Box/Time TesterThe TUE Renko Box/Time Tester is a technical indicator designed to quantify the frequency of consecutive duplicate timestamps within Renko charts on the TradingView platform. It serves the critical purpose of assessing the prevalence of identical timestamps, a crucial factor for the accurate automation of trading strategies.
The presence of duplicate timestamps can impede the reliability of automated trading systems. This indicator systematically examines Renko bars and identifies instances where successive bars share the same timestamp. The quantified data aids traders and developers in evaluating the quality and suitability of their Renko chart data for algorithmic trading purposes.
To ensure proper speed and precision in automation, traders are advised to run Renko charts on either 1-second or 5-second timeframes. Adjusting the box sizes of Renko charts based on these timeframes is essential.
The objective is to maintain the incidence of duplicate timestamps at levels below 20%, ensuring the robustness and consistency of automated trading strategies. By providing a quantitative analysis of timestamp duplication, this indicator supports traders in optimizing their trading systems for enhanced accuracy and efficiency.
The script will automatically collate only the last two days' worth of data, in order to maintain timestamp integrity. You should be able to view individual seconds on your timestamps, and if they're all reading :00 at the end, then you have ran out of seconds-level data. This is only done with a Premium or higher subscription.
ADX Trend Confirmer [Honestcowboy]The ADX Trend Confirmer aims to give traders or algorithms a way to confirm a trend before entering a trade.
While the default for ADX is a smoothing factor of 14 and a length of 14 to measure directional strength. In my experience this is a lagging indicator and not the best for confirming if the market is trending.
🟢 What are the methods used for confirming trend in this indicator?
ADX above x number : By default we use an ADX length of 3 and it's value needs to be above 50.
ADX sloping up ? This will check if the ADX value is higher than that of previous bar, this to confirm that trend is getting momentum and not slowing down.
close>open / close<open : This is to check in which direction the trend is going.
Mid Point : We use a mid-point between highest high and lowest low in a given period by default of 3 bars. Price needs to close above/below this point to confirm direction. We use previous bar mid-point so there is no repainting of the line.
Min bar ratio: How many percent of the bar is the body? A high amount of wicks but not a lot of body can mean indecision (no trend). This to ensure entries are only after a convincing bar.
🟢 Extra Info:
Thanks to ZenAndTheArtOfTrading for publishing ZenLibrary which we use in this script.
This is not a strategy on it's own but a building block to add to your analysis.
VAcc (Velocity & Acceleration)VAcc (Velocity & Acceleration) is a momentum indicator published by Scott Cong in Stocks & Commodities V. 41:09 (8–15). It applies concepts from physics, namely velocity and acceleration, to financial markets. VAcc functions similarly to the popular MACD (Moving Average Convergence Divergence) indicator when using a longer lookback period, but produces more responsive results. With shorter periods, VAcc exhibits characteristics reminiscent of the stochastic oscillator.
🟠 Algorithm
The average velocity over the past n periods is defined as
((C - C_n) / n + (C - C_{n-1}) / (n - 1) + … + (C - C_i) / i + (C - C_1) / 1) / n
At its core, the velocity is a weighted average of the rate of change over the past n periods.
The calculation of the acceleration follows a similar process, where it’s defined as
((V - V_n) / n + (V - V_{n - 1}) / (n - 1) + … + (V - V_i) / i + (V - V_1) / 1) / n
🟠 Comparison with MACD
A comparison of VAcc and MACD on the daily Nasdaq 100 (NDX) chart from August 2022 helps demonstrate VAcc's improved sensitivity. Both indicators utilized a lookback period of 26 days and smoothing of 9 periods.
The VAcc histogram clearly shows a divergence forming, with momentum weakening as prices reached new highs. In contrast, the corresponding MACD histogram significantly lagged in confirming the divergence, highlighting VAcc's ability to identify subtle shifts in trend momentum more immediately than the traditional MACD.
RSI Box Strategy (pseudo- Grid Bot)This is a strategy intended primarily for algorithmic traders. It's a pseudo-grid bot that uses a dynamic, volume-weighted grid that only updates when the RSI meets certain conditions. It's also a breakout strategy, whereas normal grid bots are not (typical grid bots sell when a higher grid is reached, whereas this strategy sells when a lower grid is breached under specific conditions). This strategy also sells 100% of pyramiding orders on close.
In a nutshell, the strategy updates its grid to the volume-weighted highest/lowest values of your given source ("src" in the settings) each time that there is a RSI crossunder/crossover. From this range it produces an evenly-spaced grid of five lines, and uses the current source to determine which grid line is closest to the source. Then, if the source crosses over the line directly above the current line, it enters a buy order. If the source crosses under the line directly below the current line, it enters a sell order.
You can configure shorts, source, RSI length, and overbought/oversold levels in the settings.
For the strategy results below: fees are at 0.1% per trade, with order size 1% of equity and a max pyramiding value of 33. For a greater R/R profile, you can increase the order size, which will increase drawdown but potentially yield better results.
Fractals 5/7/9/11/13 ModifiedDescription:
The Modified Fractals Indicator is designed to help traders identify specific fractal patterns on a chart. Unlike traditional Williams Fractals, this indicator focuses on highlighting two distinct types of fractals:
- UpFractals: These fractals are identified when each preceding candle has a higher high than the one before it, and each succeeding candle has a higher high than the one following it.
- DownFractals: Conversely, DownFractals are detected when each preceding candle has a lower low than the one before it, and each succeeding candle has a lower low than the one following it.
This unique approach sets it apart from standard Fractal indicators.
Features:
1. Originality and Uniqueness: This indicator employs a distinctive algorithm to detect and display modified fractals, providing a fresh perspective on price reversals.
2. Customizable Parameters: Users can fine-tune the indicator to their trading strategy by adjusting the candle count and arrow size.
3. Easy-to-Understand Chart: The Modified Fractals Indicator is designed to provide clear and easily identifiable signals on your chart, enhancing your trading experience.
4. User-Friendly Interface: This indicator is user-friendly and can be easily integrated into your TradingView setup.
How it Works:
The Modified Fractals Indicator scans the price action on your chart and identifies specific fractal patterns based on the criteria mentioned above for both UpFractals and DownFractals.
Usage:
- Add the Modified Fractals Indicator to your TradingView chart.
- Customize the settings, including the candle count and arrow size, to align with your trading strategy.
- Observe the chart for the appearance of UpFractals and DownFractals as marked by the indicator's arrows.
- Use the signals provided by the indicator to inform your trading decisions, such as potential entry or exit points.
Please note that this Modified Fractals Indicator offers a unique approach to fractal analysis, focusing on specific price patterns that differ from traditional Williams Fractals. It provides traders with an additional tool for identifying potential trend reversals and market opportunities.
Range Detector [LuxAlgo]The Range Detector indicator aims to detect and highlight intervals where prices are ranging. The extremities of the ranges are highlighted in real-time, with breakouts being indicated by the color changes of the extremities.
🔶 USAGE
Ranging prices are defined by a period of stationarity, that is where prices move within a specific range.
Detecting ranging markets is a common task performed manually by traders. Price breaking one of the extremities of a range can be indicative of a new trend, with an uptrend if price breaks the upper range extremity, and a downtrend if price breaks the lower range extremity.
Ranges are highlighted as zones and are set retrospectively, that is the starting point of a range is offset in the past. The exact moment a range is detected is highlighted by a gray background color. The average between the maximum/minimum of a zone is also highlighted as a dotted line and is also set retrospectively.
The range extremities are set in real-time, blue extremities indicate the range extremities were not broken, green extremities indicate that price broke the upper range extremity, while red extremities indicate price broke the lower range extremity.
Extremities are extended until a new range is detected, allowing past ranges extremities can be used as future support/resistances.
🔶 DETAILS
The detection algorithm used to detect ranges tests if all the prices within a user-set window are all within two extremities. These extremities are determined by the mean of the detection window plus/minus an ATR value.
When a new range is detected, the script checks if this new range overlaps with a previously detected range, if this is the case, both ranges are merged into one; updating the extremities of the previous range.
This can be observed with the real-time extremities changing within a highlighted zone.
🔶 SETTINGS
Minimum Range Length: Minimum amount of bars needed to detect a range.
Range Width: Multiplicative factor for the ATR used to detect new ranges. Lower values detect ranges with a lower width. Using higher values might return false positives.
ATR Length: ATR length used to determine the range width.
Histogram-based price zonesThis indicator provides a new approach to creating price zones that can be used as support and resistance. The approach does not use pivot points or Fibonacci levels. Instead, it uses the frequency of occurence of local maxima and minima to determine zones of interest where price often changed direction.
The algorithm is as follows:
- Gather price data from the last Lookback trading periods
- Calculate rolling minima and rolling maxima along the price points with window size Window size
- Build a histogram from the rolling extrema which are binned into different zones. The number of bins and therefore the width of a zone can be adjusted with the parameter Zone width factor
- Select only the top fullest bins. The number of bins selected for plotting can be controlled with Zone multiplier
The result are a number of boxes that appear on the chart which mark levels of interest to watch for. You can combine multiple instances of this indicator on different settings to find zones that are very relevant.
Shown as an example is the Nasdaq 100 futures ( NQ1! ) on the D timeframe with levels built from the last 100 periods with default settings. The boxes are the only output of the indicator, no signals are created.
Support and Resistance: Triangles [YinYangAlgorithms]Overview:
Triangles have always been known to be the strongest shape. Well, why wouldn’t that likewise apply to trading? This Indicator will create Upwards and Downwards Triangles which in turn create Support and Resistance locations. For example, we find 2 highs that meet the criteria (within deviation %, Minimum Distance and Lookback Distance). We calculate the distance between these two and create an Equilateral Triangle Downwards (You can adjust the % if you want more of an Isosceles Triangle). The midpoint (tip) of this triangle is the Support and the bottom (base) of it is the Resistance. The exact opposite applies for an Upwards Triangle.
The reason why Triangles may make for good Support and Resistance locations is the % 's used, much like the fibonacci, use ratios relevant in nature and everywhere in the world around us, so why not for trading too?
Tutorial:
If you look at the locations we’ve circled above, all of them exhibit strong rejections are predictive Support and Resistance locations plotted by the triangles created. There can only ever be 1 Upward and 1 Downward Triangle at a time, so when a new one is created, the Support and Resistance locations are moved.
If you scroll back far enough you’ll notice the Triangles disappear but their Support and Resistance locations are still plotted. This has to do with the fact you are allowed only so many Lines plotted and when a new Triangle is created, an old one will be removed. The Support and Resistance locations however will stay.
If we look at the example above, you can see the Support and Resistance locations the Triangles made here may have helped predict where the price would struggle to surpass.
By default the Look Back Distance is set to 50 and the Min Distance is 10 (settings used in all previous examples). However, you can modify these to make Triangles more ‘Rare’ and therefore the Support and Resistance locations change less. In the example above for Instance we left Look Back Distance to 50 but changed Min Distance from 10 to 25. This results in Support and Resistance locations that may hold better in the long term.
If we scroll back a bit, we can see the settings ‘Look Back Distance’ 50 and ‘Minimum Distance’ 25 had done a decent job at predicting the ATH resistance and many Support and Resistance locations around it. Keep in mind, previous results don’t mean future results, but Triangles may create ratios which apply well to trading.
We will conclude our Tutorial here. Hopefully you can see the benefit to the ratio Triangles make when predicting Support and Resistance locations.
Settings:
Show Triangles: If all you want to know is the Support and Resistance locations, there’s no need to draw the Triangles.
Triangle Zones: What types of triangles should we create our zones for? Options are Upward, Downward, Both, None.
Max Deviation Allowed: Maximum Deviation up or down from the last bars High/Low for potential to create a Triangle.
Lookback Distance: How far back we look to see for potential of a High/Low within Deviation range.
Min Distance: This is so triangles are spaced properly and not from 2 bars beside each other. Min distance allocated between 2 points to create a Triangle.
Bar Percent Increase: How much % multiplier do we apply for each bar spacing of the triangle. 0.005 creates a close to Equilateral Triangle, but other values like 0.004 and 0.006 seem to work well too.
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
Volumetric Toolkit [LuxAlgo]The Volumetric Toolkit is a complete and comprehensive set of tools that display price action-related analysis methods from volume data.
A total of 4 features are included within the toolkit. Symbols that do not include volume data will not be supported by the script.
🔶 USAGE
The volumetric toolkit puts a heavy focus on price action, returning support/resistance levels, ranges, volume divergences...etc.
The main premise between each feature is that volume has a direct relationship with market participants level of interest over a specific symbol, and that this interest is not constant over time.
Each individual feature is detailed below.
🔹 Ranges Of Interest
The Ranges Of Interest construct a range from a surge of high liquidity in the market. This range is constructed from the price high and price low of the candle with the associated significant liquidity.
The returned extremities can be used as support and resistance, with breakouts often being accompanied by significant liquidity as well, suggesting potential trend continuations.
The length setting associated with this feature determines how sensitive the range detection algorithm is to volume, with higher values requiring more significant volume in order to display a new range.
🔹 Impulses
Impulses highlight times when volume makes a new higher high while the price makes a new higher high or lower low, suggesting increased market participation.
When this occurs when the price makes a new higher high the impulse is considered bullish (green), if the price makes a new lower low the impulse is bearish (red).
Impulses occurring within an established trend opposite to it (e.g a bearish impulse on an uptrend) might be indicative of reversals.
The length setting works similarly to the previously described ranges of interest, with higher values requiring longer-term volume higher high and price higher high/lower low, highlighting more significant impulse and potentially longer-term reversals.
🔹 Levels Of Interest
Levels of interest display price levels of significant trading activity, contrary to the range of interest only the closing price is taken into account, also volume peaks are used to detect significant trading activity.
Note that this feature is subject to backpainting, that is lines are set retrospectively.
Users can determine the amount of most recent levels to display on the chart. These can be used as classical support/resistances.
🔹 Volume Divergence
We define volume divergence as a decreased market participation while a trend is still developing.
More precisely volume divergences are highlighted if volume makes a lower high while price is making a new higher high/lower low.
This can be indicative of a lack of further participation in the current trend, indicating a potential reversal.
Using higher length values will return longer-term divergences.
Note that this feature is subject to backpainting, that is lines are set retrospectively.
🔶 SETTINGS
🔹 Ranges Of Interest
Show Ranges Of Interest: Display Ranges Of Interest.
Length: Ranges Of Interest sensitivity to volume.
🔹 Impulses
Show Impulses: Display Ranges Of Interest.
Length: Impulses sensitivity to volume.
🔹 Levels Of Interest
Show: Determine if Levels Of Interest are displayed, and how many from the most recent.
Length: Level detection sensitivity to volume.
🔹 Volume Divergences
Show Divergences: Determine if Volume Divergences are displayed.
Length: Period for the detection of price tops/bottoms and volume peaks.
Supertrend Targets [ChartPrime]The Supertrend Targets indicator combines the concepts of trend-following with dynamic volatility-based target levels. It takes core simple and classical concepts and provides actionable insights. The core of this indicator revolves around the "Supertrend" algorithm, which essentially uses the Average True Range (ATR) and a multiplier to determine if the price of a financial instrument is in an uptrend or downtrend. The indicator generates various plot points on the trading chart, which traders can use to make informed trading decisions.
Users can set several input parameters such as the source price, custom levels, multiplier scale, length of the average true range, and the window length. Traders can also opt to enable a table that shows numeric target data by percentiles, risk ratio, take profit and stop loss points.
The generated plots and fills on the chart represent various levels of potential gains and drawdowns, acting as potential targets for taking profit or stopping losses. These include the 25th, 50th, 75th, 90th, and 100th percentiles, which are adjustable by scale. There are also plots for average gain and drawdown levels, enhanced by standard deviation curves if enabled.
The Supertrend line indicators are color-coded for ease of understanding: blue for bullish performance and orange for bearish performance. The "Center Line" represents the point at which traders might consider entering a position.
Lastly, the script presents a summary table (when enabled) at the right side of the chart displaying numeric data of the plotted targets. This data provides additional insights on the risk-reward balance for each percentile, helping traders to execute their strategies more effectively.
Here's a comprehensive breakdown of its functionalities and features:
Inputs:
Source: Determines the price series type (e.g., Close, Open, High, Low, etc.).
Show Trailing Stop: Option to display the trailing stop on the chart.
Levels: Sets the number of target levels you want to display. Can range from -5 to 5.
Scale: A scaling factor for adjusting targets, can be between 1 to 100.
Window Length: Length for the target computation, determines how many bars will be considered.
Unique: Ensures every data point used in calculations is unique.
Multiplier: Multiplier for the ATR (Average True Range) to compute the SuperTrend.
ATR Length: Period for the ATR computation.
Custom Level: Allows users to set their own levels using various statistics like Average, Average + STDEV, Percentile, or can be disabled.
Percent Rank: Determines the percentile rank for targeting.
Enable Table: Enables or disables a table display.
Methods:
Flag: Identifies bullish and bearish trend reversals.
Target Percent: Determines the expected price movement (both gains and drawdowns) based on historical trend reversals.
Value Percent: Computes the percentage difference between the current price and the entry price during trend reversals.
Plots:
Multiple target lines are plotted on the chart to visualize potential gain and drawdown levels. These levels are adjusted based on user settings. Additionally, the main Supertrend line is plotted to indicate the prevailing trend direction.
Gain Levels: Target levels which show potential upside from the current price.
Drawdown Levels: Target levels which represent potential downside from the current price.
SuperTrend Line: A line that adjusts based on price volatility and trend direction, acting as a dynamic support or resistance.
In conclusion, the "Supertrend Targets " indicator is a powerful tool that combines the principle of trend-following with dynamic targets, providing traders with insights into potential future price movements. The range of customization options allows traders to adapt the indicator to different trading strategies and market conditions.
YinYang Bar ForecastOverview:
YinYang Bar Forecast is a prediction indicator. It predicts the movement for High, Low, Open and Close for up to 13 bars into the future. We created this Indicator as we felt the TradingView community could benefit from a bar forecast as there wasn’t any currently available.
Our YinYang Bar Forecast is something we plan on continuously working on to better improve it, but at its current state it is still very useful and decently accurate. It features many calculations to derive what it thinks the future bars will hold. Let’s discuss some of the logic behind it:
Each bar has its High, Low, Open and Close calculated individually for highest accuracy. Within these calculations we first check which bar it is we are calculating and base our span back length that we are getting our data from based on the bar index we are generating. This helps us get a Moving Average for this bar index.
We take this MA and we apply our Custom Volume Filter calculation on it, which is essentially us dividing the current bars volume over the average volume in the last ‘Filtered Length’ (Setting) length. We take this decimal and multiply it on our MA and smooth it out with a VWMA.
We take the new Volume Filtered MA and apply a RSI Filter calculation on it. RSI Filter is where we take the difference between the high and low of this bar and we multiply it with an RSI calculation using our Volume Filtered MA. We take the result of that multiplication and either add or subtract it from the Volume Filtered MA based on if close > open. This makes our RSI Filtered MA.
Next, we do an EMA Strength Calculation which is where we check if close > ema(close, ‘EMA Averaged Length’) (Setting). Based on this condition we assign a multiplier that is applied to our RSI Filtered MA. We divide by how many bars we are predicting and add a bit to each predictive bar so that the further we go into the future the stronger the strength is.
Next we check RSI and RSI MA levels and apply multiplications based on its RSI levels and if it is greater than or less than the MA. Also it is affected by if the RSI is <= 30 and >= 70.
Finally we check the MFI and MFI MA levels and like RSI we apply multiplications based on its MFI levels and if it is greater than or less than the MA. It is also affected by if the MFI is <= 30 and >= 70.
Please note the way we calculate this may change in the future, this is just currently what we deemed works best for forecasting the future bars. Also note this script uses MA calculations out of scope for efficiency but there is potential for inconsistencies.
Innately it’s main use is the projection it provides. It only draws the bars for realtime bars and not historical ones, so the best way to backtest it is with TradingView’s Replay Tool.
Well, enough of the logic behind it, let's get to understanding how to use it:
Tutorial:
So unfortunately we aren’t able to plot legit bars/candles into the future so we’ve had to do a bit of a work around using lines and fills. As you can see here we have 4 Lines and 3 Zones:
Lines:
Green: Represents the High
Orange: Represents the Open
Teal: Represents the Close
Red: Represents the Low
Zones:
High Zone: This zone is from either Open or Close to the High and is ALWAYS filled with Green.
Open/Close Zone: This zone is from the Open to the Close and is filled with either Green or Red based on if it's greater than the previous bar (real or forecasted).
Low Zone: This zone is from either Open or Close to the Low and is ALWAYS filled with Red.
As you can see generally the Forecasted bars are generally within strong pivot locations and are a good estimation of what will likely go on. Please note, the WHOLE structure of the prediction can change based on the current bars movements and the way it affects the calculations.
Let's look 1 bar back from the current bar just so we can see what it used to Forecast:
As you can see it has changed quite a bit from the previous bar, but if you look close, we drew horizontal lines around where its projecting the next bar to be (our current realtime bar), if we go back to the live chart:
Its projections were pretty close for the high and low. Generally, right now at least, it does a much better job at predicting the high and low than it does the open and close, however we will do our best to fine tune that in future updates.
Remember, this indicator is not meant to base your trades on, but rather give you a Forecast towards the general direction of the next few bars. Somewhat like weather, the farther the bar (or day for weather), the harder it is to predict. For this reason we recommend you focusing on the first few bars as they are more accurate, but review the further ones as they may help show the trend and the way that pair will move.
We will conclude this tutorial here, hopefully this Predictive Indicator can be of some help and use to you. If you have any questions, comments, ideas or concerns please let us know.
Settings:
Forecast Length: How many bars should we predict into the Future? Max 13
Each Bar Length Multiplier: For each new Forecast bar, how many more bars are averaged? Min 2
VWMA Averaged Length: All Forecast bars are put into a VWMA, what length should we use?
EMA Averaged Length: All Forecast bars are put into a EMA, what length should we use?
Filtered Length: What length should we use for Filtered Volume and RSI?
EMA Strength Length: What length should we use for the EMA Strength
HAPPY TRADING!