Volatility Trend Bands [Orderflowing]Volatility Trend Bands | Moving Averages | Adaptive Bands | Volatility | Smoothing (+)
Built using Pine Script V5.
Introduction
The Volatility Trend Bands indicator is a trading tool designed for trend analysis and market volatility visualization.
It integrates multiple moving average types, offering traders a customizable trend visual.
Inspiration and Originality
The Volatility Trend Bands indicator is inspired by the need for a comprehensive trend/volatility tool that can work with differing market conditions and trading styles.
Its use of multiple moving average types and more customizable settings sets it apart from other traditional technical analysis tools.
Core Features
Multiple Moving Average Types: Offers EMA, DEMA, T3, Laguerre, ZLEMA, TEMA, or HULL types for the calculation.
Band Width: Allows for the adjustment of band width, used to align it with different analytical styles and volatility levels.
Optional Smoothing: Implements smoothing techniques for a clearer view of the Trend Band, reducing market noise and take significant movements into account.
Calculations: Includes options like Laguerre Gamma and Volume Factor for T3, allowing depth for the Laguerre & T3 options.
Input Parameters
Lookback Period: Adjust the number of past data points considered, affecting sensitivity to market changes.
Moving Average Type: Select from the available options to determine the band's calculation method.
Band Width Multiplier: Modify the width of the bands to visualize market extremes and volatility more effectively.
Smoothing Techniques: Choose to apply smoothing for a trend visualization.
Calculation Settings: Fine-tune settings like Laguerre Gamma and Volume Factor.
Example of Disabled Smoothing (EMA type):
Example of Enabled Smoothing (EMA type):
Example of T3 Calculation:
Example of Multi-Timeframe (1D Calculation / 4H Chart):
Usage and Applications
Instrument Trend Analysis: The plotted trend can be used to analyze trends and potential reversal points, helping with strategic decision-making.
Volatility: Offers visual of market volatility, and furthermore in the identification of potential breakout points.
Risk Management: Utilize the bands for setting strategic stop-loss or take-profit levels, based on nuanced market movement analysis.
The Value
The Volatility Trend Bands indicator is a custom tool, offering advanced features and customization options that justify its value.
Conclusion
The Volatility Trend Bands indicator is a useful tool for market analysis, offering a mix of advanced calculation methods and customization options.
It adapts to market conditions and trader preferences, providing a flexible approach to trend analysis.
The Volatility Trend Bands indicator is to be used for confluence with other trading strategies and market analysis methods.
Only relying on this indicator for trading decisions is not advised.
Volatilité
Logarithmic Bollinger Bands [MisterMoTA]The script plot the normal top and bottom Bollinger Bands and from them and SMA 20 it finds fibonacci logarithmic levels where price can find temporary support/resistance.
To get the best results need to change the standard deviation to your simbol value, like current for BTC the Standards Deviation is 2.61, current Standard Deviation for ETH is 2.55.. etc.. find the right current standard deviation of your simbol with a search online.
The lines ploted by indicators are:
Main line is a 20 SMA
2 retracement Logarithmic Fibonacci 0.382 levels above and bellow 20 sma
2 retracement Logarithmic Fibonacci 0.618 levels above and bellow 20 sma
Top and Bottom Bollindger bands (ticker than the rest of the lines)
2 expansion Logarithmic Fibonacci 0.382 levels above Top BB and bellow Bottom BB
2 expansion Logarithmic Fibonacci 0.618 levels above Top BB and bellow Bottom BB
2 expansion Logarithmic Fibonacci level 1 above Top BB and bellow Bottom BB
2 expansion Logarithmic Fibonacci 1.618 levels above Top BB and bellow Bottom BB
Let me know If you find the indicator useful or PM if you need any custom changes to it.
Optimal Length BackTester [YinYangAlgorithms]This Indicator allows for a ‘Optimal Length’ to be inputted within the Settings as a Source. Unlike most Indicators and/or Strategies that rely on either Static Lengths or Internal calculations for the length, this Indicator relies on the Length being derived from an external Indicator in the form of a Source Input.
This may not sound like much, but this application may allows limitless implementations of such an idea. By allowing the input of a Length within a Source Setting you may have an ‘Optimal Length’ that adjusts automatically without the need for manual intervention. This may allow for Traditional and Non-Traditional Indicators and/or Strategies to allow modifications within their settings as well to accommodate the idea of this ‘Optimal Length’ model to create an Indicator and/or Strategy that adjusts its length based on the top performing Length within the current Market Conditions.
This specific Indicator aims to allow backtesting with an ‘Optimal Length’ inputted as a ‘Source’ within the Settings.
This ‘Optimal Length’ may be used to display and potentially optimize multiple different Traditional Indicators within this BackTester. The following Traditional Indicators are included and available to be backtested with an ‘Optimal Length’ inputted as a Source in the Settings:
Moving Average; expressed as either a: Simple Moving Average, Exponential Moving Average or Volume Weighted Moving Average
Bollinger Bands; expressed based on the Moving Average Type
Donchian Channels; expressed based on the Moving Average Type
Envelopes; expressed based on the Moving Average Type
Envelopes Adjusted; expressed based on the Moving Average Type
All of these Traditional Indicators likewise may be displayed with multiple ‘Optimal Lengths’. They have the ability for multiple different ‘Optimal Lengths’ to be inputted and displayed, such as:
Fast Optimal Length
Slow Optimal Length
Neutral Optimal Length
By allowing for the input of multiple different ‘Optimal Lengths’ we may express the ‘Optimal Movement’ of such an expressed Indicator based on different Time Frames and potentially also movement based on Fast, Slow and Neutral (Inclusive) Lengths.
This in general is a simple Indicator that simply allows for the input of multiple different varieties of ‘Optimal Lengths’ to be displayed in different ways using Tradition Indicators. However, the idea and model of accepting a Length as a Source is unique and may be adopted in many different forms and endless ideas.
Tutorial:
You may add an ‘Optimal Length’ within the Settings as a ‘Source’ as followed in the example above. This Indicator allows for the input of a:
Neutral ‘Optimal Length’
Fast ‘Optimal Length’
Slow ‘Optimal Length’
It is important to account for all three as they generally encompass different min/max length values and therefore result in varying ‘Optimal Length’s’.
For instance, say you’re calculating the ‘Optimal Length’ and you use:
Min: 1
Max: 400
This would therefore be scanning for 400 (inclusive) lengths.
As a general way of calculating you may assume the following for which lengths are being used within an ‘Optimal Length’ calculation:
Fast: 1 - 199
Slow: 200 - 400
Neutral: 1 - 400
This allows for the calculation of a Fast and Slow length within the predetermined lengths allotted. However, it likewise allows for a Neutral length which is inclusive to all lengths alloted and may be deemed the ‘Most Accurate’ for these reasons. However, just because the Neutral is inclusive to all lengths, doesn’t mean the Fast and Slow lengths are irrelevant. The Fast and Slow length inputs may be useful for seeing how specifically zoned lengths may fair, and likewise when they cross over and/or under the Neutral ‘Optimal Length’.
This Indicator features the ability to display multiple different types of Traditional Indicators within the ‘Display Type’.
We will go over all of the different ‘Display Types’ with examples on how using a Fast, Slow and Neutral length would impact it:
Simple Moving Average:
In this example above have the Fast, Slow and Neutral Optimal Length formatted as a Slow Moving Average. The first example is on the 15 minute Time Frame and the second is on the 1 Day Time Frame, demonstrating how the length changes based on the Time Frame and the effects it may have.
Here we can see that by inputting ‘Optimal Lengths’ as a Simple Moving Average we may see moving averages that change over time with their ‘Optimal Lengths’. These lengths may help identify Support and/or Resistance locations. By using an 'Optimal Length' rather than a static length, we may create a Moving Average which may be more accurate as it attempts to be adaptive to current Market Conditions.
Bollinger Bands:
Bollinger Bands are a way to see a Simple Moving Average (SMA) that then uses Standard Deviation to identify how much deviation has occurred. This Deviation is then Added and Subtracted from the SMA to create the Bollinger Bands which help Identify possible movement zones that are ‘within range’. This may mean that the price may face Support / Resistance when it reaches the Outer / Inner bounds of the Bollinger Bands. Likewise, it may mean the Price is ‘Overbought’ when outside and above or ‘Underbought’ when outside and below the Bollinger Bands.
By applying All 3 different types of Optimal Lengths towards a Traditional Bollinger Band calculation we may hope to see different ranges of Bollinger Bands and how different lookback lengths may imply possible movement ranges on both a Short Term, Long Term and Neutral perspective. By seeing these possible ranges you may have the ability to identify more levels of Support and Resistance over different lengths and Trading Styles.
Donchian Channels:
Above you’ll see two examples of Machine Learning: Optimal Length applied to Donchian Channels. These are displayed with both the 15 Minute Time Frame and the 1 Day Time Frame.
Donchian Channels are a way of seeing potential Support and Resistance within a given lookback length. They are a way of withholding the High’s and Low’s of a specific lookback length and looking for deviation within this length. By applying a Fast, Slow and Neutral Machine Learning: Optimal Length to these Donchian Channels way may hope to achieve a viable range of High’s and Low’s that one may use to Identify Support and Resistance locations for different ranges of Optimal Lengths and likewise potentially different Trading Strategies.
Envelopes / Envelopes Adjusted:
Envelopes are an interesting one in the sense that they both may be perceived as useful; however we deem that with the use of an ‘Optimal Length’ that the ‘Envelopes Adjusted’ may work best. We will start with examples of the Traditional Envelope then showcase the Adjusted version.
Envelopes:
As you may see, a Traditional form of Envelopes even produced with a Machine Learning: Optimal Length may not produce optimal results. Unfortunately this may occur with some Traditional Indicators and they may need some adjustments as you’ll notice with the ‘Envelopes Adjusted’ version. However, even without the adjustments, these Envelopes may be useful for seeing ‘Overbought’ and ‘Oversold’ locations within a Machine Learning: Optimal Length standpoint.
Envelopes Adjusted:
By adding an adjustment to these Envelopes, we may hope to better reflect our Optimal Length within it. This is caused by adding a ratio reflection towards the current length of the Optimal Length and the max Length used. This allows for the Fast and Neutral (and potentially Slow if Neutral is greater) to achieve a potentially more accurate result.
Envelopes, much like Bollinger Bands are a way of seeing potential movement zones along with potential Support and Resistance. However, unlike Bollinger Bands which are based on Standard Deviation, Envelopes are based on percentages +/- from the Simple Moving Average.
We will conclude our Tutorial here. Hopefully this has given you some insight into how useful adding a ‘Optimal Length’ within an external (secondary) Indicator as a Source within the Settings may be. Likewise, how useful it may be for automation sake in the sense that when the ‘Optimal Length’ changes, it doesn’t rely on an alert where you need to manually update it yourself; instead it will update Automatically and you may reap the benefits of such with little manual input needed (aside from the initial setup).
If you have any questions, comments, ideas or concerns please don't hesitate to contact us.
HAPPY TRADING!
MAC Spikes(Adam H Grimes)From Adam H Grimes: "Introducing a New Tool: The MAC Spike"
Mean Absolute Change Spikes (“MAC Spikes”).
Here are the steps to calculate it:
-Convert each day’s closing price to a change (difference) by subtracting it from the previous day’s closing price.
-Take the absolute value of that change.
-Average the past 20 days absolute values to create the baseline.
-Divide today’s change by yesterday’s baseline. (Still offsetting by one day.)
MAC Spikes- Indicator:
-Indicator Setup: The script defines an indicator with the name "MAC Spikes", not overlaying the main chart, and allows up to 99 lines to be plotted.
-User Inputs: It provides several user-configurable inputs, such as:
Length for standard deviation calculation (len).
-Type of spike to monitor (spikeType), with options for close, range, or open spikes.
-Option to filter spikes based on a threshold (filtered).
-The threshold value for spike significance (spike_thresh).
-Whether to display the spike histogram (disp_Spike).
-Line width for plotting (lw).
unconscious lineThis indicator was created with the idea that if everyone trades, it will move in that direction, i.e., it will repeatedly converge on an unaware area. The unaware area is defined by calculating the difference between the high and high of the current bar and the previous bar, and the low and low of the current bar, and then plotting the maximum and minimum values of the unaware area. If the price converges to this line, the time when it does not go to this line can be taken as the bias of the theoretical price, so it is not plotted, but the time when it does not touch the right edge of the indicator title is plotted.
Parameters
Arybuf -Specifies the range of values to be determined from the current time. The smaller the value, the more recent the value will be used.
Style
1. Display the smallest value in the judgment range
2. Display the largest value in the judgment range.
3. Display line 1 to draw the range with the largest difference.
Displays line 2 that draws the range with the largest difference.
The area with the largest difference, i.e., the unaware area, is the range of values from Style 3 to 4.
Period of noncoucentration.
This value is the number of bars that have not touched the least concentrated area.
Indicator Usage.
Set the value of the parameter.
Draw a long enough moving average.
Use the moving average to recognize the environment and make an entry at a push.
Note that this indicator draws a convergence point and does not predict the future. While this allows you to find a push, the value itself has no driving force.
When used in a contrarian manner, it should be used with the expectation that it will be caught at a buying or selling climax at some point in the future.
[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.
BandPercentile [Orderflowing]BandPercentile | Bollinger Band Analysis | Bandpass Filtering | Customizable (+)
Built using Pine Script V5.
Introduction
The BandPercentile indicator is a technical analysis tool that improves the traditional Bollinger Bands as a Percentile concept.
Inspiration and Evolution
The BandPercentile was born of the simplicity of calculating the Bollinger Bands Percentile.
It evolves this concept by addressing a need for greater customization and precision.
The integration of the Experimental version of the Bandpass Filter & Super Smoothing, a concept by John Ehlers, adds a layer of sophistication - allowing for a different view.
Core Functionality
The BandPercentile calculates percentile values based on the position of the price within the Bollinger Bands, offering a way to see overbought and oversold market conditions.
The indicator is designed to provide clear visual cues for market extremes, aiding in decision-making for entries and exits.
These market extremes or overbought/sold levels are fully customizable.
Unique Features and Customization
Overbought/Oversold Dots: Visual markers for identifying critical market thresholds.
Divergence Detection: Highlights potential bullish and bearish divergences, aiding in predictive analysis.
Multiple Moving Average Types: Choose from SMA, Hull, Dema, EMA, WMA, and LINREG for calculations.
Customizable Parameters: Adjust length, multiplier, and overbought/oversold levels to fit various trading styles.
Roofing Filter Integration: Incorporates Ehlers' Bandpass Filter for signal processing.
Example of 2 pole bandpass filtering on daily calculation / 4 hour chart:
Example of 3 pole bandpass filtering on daily calculation / 4 hour chart:
Analysis and Interpretation
The indicator provides a scale, ranging from extreme overbought to extreme oversold levels, with customizable levels for divergence/confirmed trend shift analysis.
This scale is useful for traders to understand market sentiment and potential reversal points.
Interpretation and Visuals
The BandPercentile indicator is designed with a clear, color-coded system for better readability and quick interpretation:
Primary Overbought and Oversold Lines: These are marked in red and blue, respectively, to signify the most critical overbought and oversold levels.
Extended Overbought and Oversold Lines: Additional red and blue lines represent extended overbought and oversold levels, showing more extreme market conditions.
Middle Line: This line acts as a central balance point, providing a reference for the current market state relative to overbought and oversold conditions.
Intermediate Middle Levels: These are additional lines marked in lighter shades of blue and red, indicating lower mid and higher mid levels that can signal emerging trends or potential reversals.
Markers: Distinct shapes are used to highlight potential trend reversals, helping with identifying opportunities.
Multi-Timeframe
The indicator's flexibility allows for application across most asset classes and timeframes, making it suitable for different trading strategies, from day trading to long-term investing.
Example using the Daily BandPercentile on a 4H chart:
Trading Style
Whether you are a momentum trader, swing trader, or a long-term investor.
The BandPercentile can be made to suit diverse trading styles and risk parameters.
Usage and Applications
Market Extremes Identification - Pinpoint overbought and oversold conditions.
Divergence Analysis - Detect potential trend reversals before they occur.
Customizable Analysis - Edit the indicator inputs to align with personal trading strategies and preferences.
The Value
BandPercentile stands out as an innovative tool.
It also respects the individuality of each trader's approach.
Its advanced filtering and customization capabilities makes it valuable.
Conclusion
The BandPercentile indicator is a useful tool for traders to optimize their strategy.
Its unique blend of traditional concepts and modern filtering techniques makes it one-of-a-kind.
Do not solely rely on the signals from the BandPercentile.
The indicator is meant to be used as confluence to your existing strategy.
Donchian Trend SignalsThe Donchian Trend Signals is an indicator developed to help traders identify the current trend direction and potential liquidity grabs.
The usage of the indicator is very simple, on the chart you'll see a modified version of the classic and popular Donchian channel, calculated using the closing prices, that changes the color of the average middle line to indicate the direction of the current trend. The indicator also colors the candlestick.
Using the option "Complex Mode" will give your indicator additional data by changing the calculation method. These changes make the lines become the average between different lengths of the same Donchian channel formula.
Additionally, the indicator plots on the chart some buy or sell signals, displayed as diamonds above or below the candles. The signals are calculated to find potential liquidity grabs using the wicks, the true range of the candles, and the volume compared to his average value.
Detrended Price Rate of ChangeThe Detrended Price Rate of Change is an oscillator developed to help traders identify potential conditions of overbought and oversold markets.
The formula of the oscillator includes both the Detrended price formula, useful to spot divergences, and the Rate of change simplified formula, which helps in identifying overextended markets and gives useful information on price momentum.
[KVA]Donchian Channel Percentage" The 'Donchian Channel Percentage ' (DC%) indicator, developed for TradingView’s Pine Script Version 5, is a unique tool designed to measure the current price’s position within the Donchian Channel. The Donchian Channel, a popular indicator in technical analysis, is defined by the highest high and the lowest low over a user-specified period.
Key Features :
User-Defined Period: Users can customize the lookback period (default 20 periods), allowing flexibility in different trading styles and timeframes.
Channel Calculation: The upper and lower bounds of the Donchian Channel are calculated based on the highest high and lowest low over the chosen period.
Percentage Calculation: DC% quantifies where the current price lies within the channel, presented as a percentage. A value of 0% indicates the price at the channel's low, and 100% signifies the price at the high.
Visualization: The DC% is plotted as a line graph, providing a clear visual representation of the price’s relative position. The indicator includes horizontal lines at 0% and 100%, marked in red and green, respectively, to depict the channel's boundaries.
Market Analysis Tool: DC% offers insights into market trends and potential overbought or oversold conditions, making it a valuable addition for traders who focus on channel-based strategies.
Applications :
The DC% is particularly useful for identifying breakout scenarios and potential reversals.
Traders can use this tool in conjunction with other indicators to enhance their market analysis, especially in strategies that capitalize on price extremes within a defined range.
In summary, the Donchian Channel Percentage offers traders a simple yet powerful tool to gauge the current price’s position within a historical high-low range. Its adaptability across various assets and timeframes makes it a versatile addition to any technical trader’s toolkit."
[KVA]Keltner Channel PercentageThe " Keltner Channel Percentage " (KC%) indicator, designed for TradingView's version 5 language, offers a unique perspective on market volatility and trend analysis, similar yet distinct from the well-known Bollinger Bands Percentage (BB%).
Audience and Applications:
This indicator is suited for traders who prefer a volatility-based approach but seek a smoother, trend-focused alternative to BB%.
It is especially valuable in markets where volatility is not just a byproduct but a central aspect of price dynamics.
In essence, the " Keltner Channel Percentage " stands as a complementary tool to Bollinger Bands Percentage. It offers a different lens through which to view market volatility and trends, providing traders with additional insights and strategies for navigating the financial markets. Its unique combination of simplicity and depth makes it a valuable addition to the technical analyst's toolkit, suitable for a variety of trading scenarios and market conditions.
ROC slope indicatorI would like to present to you an indicator that I think is missing.
It is based on the ROC indicator (RATE OF CHANGE).
The ROC indicator is a measure of the rate of change in the exchange rate, as its name implies.
From which the angle of the slope of the change can be calculated. This angle is displayed on an oscillator.
The value of the oscillator can thus take max 90 and min -90 degrees as a result of the angle function calculation. Thus, the slope of the exchange rate can be continuously monitored on the indicator.
The length parameter is used to control how many candles should be included in the calculation, as is usually the case for all indicators, and a simple moving average is used to smooth the oscillator.
I added two more lines to allow monitoring of extreme high angle values.
This is a very simple indicator. I hope this approach will help you in your analysis of exchange rates and I welcome any ideas based on this oscillator.
Market Pivot Levels [Past & Live]Market Levels provide a robust view of daily pivot points of markets such as high/low/close with both past and live values shown at the same time using the recently updated system of polylines of pinescript.
The main need for this script arose from not being able to use plots for daily points because plots are inherently once drawn can't be erased and because we can't plot stuff for previous bars after values are determined we can't use them reliably. And while we can use traditional lines, because we would have extremely high amount of lines and we would have to keep removing the previous ones it wouldn't be that effective way for us. So we try to do it with the new method of polylines .
Features of this script:
- Daily High/Low Points
- Yesterday High/Low/Close Points
- Pre-Market High-Low points.
Now let's preview some of the important points of code and see how we achieve this:
With the code below we make sure no matter which chart we are using we are getting the extended hours version of sessions so our calculations are made safely for viewing pre-market conditions.
// Let's get ticker extended no matter what the current chart is
tc = ticker.new(syminfo.prefix, syminfo.ticker, session.extended)
Coding our own function to calculate high's and low's because inbuilt pinescript function cannot take series and we send this function to retrieve our high's and lows.
// On the fly function to calculate daily highlows instead of tv inbuilt because tv's length cannot take series
f_highlow(int last) =>
bardiff = last
float _low = low, float _high = high
for i = bardiff to 0 by 1
if high > _high
_high := high
if low < _low
_low := low
With doing calculations at the bars of day ending points we can retrieve the correct points and values and push them for our polylines array so it can be used in best way possible.
// Daily change points
changeD = timeframe.change("D")
// When new day starts fill polyline arrays with previous day values for polylines to draw on chart
// We also update prevtime values with current ones after we pushed to the arrays
if changeD
f_arrFill(cpArrHigh, cpArrLow, prevArrh, prevArrl, prevArrc, prevMarh, prevMarl)
valHolder.unshift(valueHold.new(_high, _low, _high, _close, _low, time, pr_h, pr_l))
The rest of the code is annotated and commented. You can let me know in comments if you have any questions. Happy trading.
Logical Trading Indicator V.1Features of the Logical Trading Indicator V.1
ATR-Based Trailing Stop Loss
The Logical Trading Indicator V.1 utilizes the Average True Range (ATR) to implement a dynamic trailing stop loss. You can customize the sensitivity of your alerts by adjusting the ATR Multiple and ATR Period settings.
Higher ATR Multiple values create wider stops, while lower values result in tighter stops. This feature ensures that your trades are protected against adverse price movements. For best practice, use higher values on higher timeframes and lower values on lower term timeframes.
Bollinger Bands
The Logical Trading Indicator V.1 includes Bollinger Bands, which can be customized to use either a Simple Moving Average (SMA) or an Exponential Moving Average (EMA) as the basis.
You can adjust the length and standard deviation multiplier of the Bollinger Bands to fine-tune your strategy. The color of the basis line changes to green when price is above and red when price is below the line to represent the trend.
The bands show a range vs a single band that also represents when the price is in overbought and oversold ranges similar to an RSI. These bands also control the take profit signals.
You also have the ability to change the band colors as well as toggle them off, which only affects the view, they are still active which will still fire the take profit signals.
Momentum Indicator
Our indicator offers a momentum filter option that highlights market momentum directly on the candlesticks, identifying periods of bullish, bearish, or consolidation phases. You can enable or disable this filter as needed, providing valuable insights into market conditions.
By default, you will see the candlestick colors represent the momentum direction as green or red, and consolidation periods as white, but the filter on the BUY and SELL signals is not active. The view options and filter can be toggled on and off in the settings.
Buy and Sell Signals
The Logical Trading Indicator V.1 generates buy and sell signals based on a combination of ATR-based filtering, Bollinger Band basis crossover, and optional momentum conditions if selected in the settings. These signals help you make informed decisions about when to enter or exit a trade. You can also enable a consolidation filter to stay out of trades during tight ranges.
Basically a BUY signal fires when the price closes above the basis line, and the price meets or exceeds the ATR multiple from the previous candle length, which is also editable in the settings.
If the momentum filter is engaged, it will not fire BUY signals when in consolidation periods. It works just the opposite for SELL signals.
Take Profit Signals
We've integrated a Take Profit feature that helps you identify points to exit your trades with profits. The indicator marks Long Take Profit when prices close below the upper zone line of the Bollinger Bands after the previous candle closes inside the band, suggesting an optimal point to exit a long trade or consider a short position.
Conversely, Short Take Profit signals appear when prices close above the lower zone after the previous candle closes inside of it, indicating the right time to exit a short trade or contemplate a long position.
Alerts for Informed Trading
The Logical Trading Indicator V.1 comes equipped with alert conditions for buy signals, sell signals, take profit points, and more. Receive real-time notifications to your preferred devices or platforms to stay updated on market movements and trading opportunities.
ATH Drawdown Indicator by Atilla YurtsevenThe ATH (All-Time High) Drawdown Indicator, developed by Atilla Yurtseven, is an essential tool for traders and investors who seek to understand the current price position in relation to historical peaks. This indicator is especially useful in volatile markets like cryptocurrencies and stocks, offering insights into potential buy or sell opportunities based on historical price action.
This indicator is suitable for long-term investors. It shows the average value loss of a price. However, it's important to remember that this indicator only displays statistics based on past price movements. The price of a stock can remain cheap for many years.
1. Utility of the Indicator:
The ATH Drawdown Indicator provides a clear view of how far the current price is from its all-time high. This is particularly beneficial in assessing the magnitude of a pullback or retracement from peak levels. By understanding these levels, traders can gauge market sentiment and make informed decisions about entry and exit points.
2. Risk Management:
This indicator aids in risk management by highlighting significant drawdowns from the ATH. Traders can use this information to adjust their position sizes or set stop-loss orders more effectively. For instance, entering trades when the price is significantly below the ATH could indicate a higher potential for recovery, while a minimal drawdown from the ATH may suggest caution due to potential overvaluation.
3. Indicator Functionality:
The indicator calculates the percentage drawdown from the ATH for each trading period. It can display this data either as a line graph or overlaid on candles, based on user preference. Horizontal lines at -25%, -50%, -75%, and -100% drawdown levels offer quick visual cues for significant price levels. The color-coding of candles further aids in visualizing bullish or bearish trends in the context of ATH drawdowns.
4. ATH Level Indicator (0 Level):
A unique feature of this indicator is the 0 level, which signifies that the price is currently at its all-time high. This level is a critical reference point for understanding the market's peak performance.
5. Mean Line Indicator:
Additionally, this indicator includes a 'Mean Line', representing the average percentage drawdown from the ATH. This average is calculated over more than a thousand past bars, leveraging the law of large numbers to provide a reliable mean value. This mean line is instrumental in understanding the typical market behavior in relation to the ATH.
Disclaimer:
Please note that this ATH Drawdown Indicator by Atilla Yurtseven is provided as an open-source tool for educational purposes only. It should not be construed as investment advice. Users should conduct their own research and consult a financial advisor before making any investment decisions. The creator of this indicator bears no responsibility for any trading losses incurred using this tool.
Please remember to follow and comment!
Trade smart, stay safe
Atilla Yurtseven
Williams Vix Fix [CC]The Vix Fix indicator was created by Larry Williams and is one of my giant backlog of unpublished scripts which I'm going to start publishing more of. This indicator is a great synthetic version of the classic Volatility Index and can be useful in combination with other indicators to determine when to enter or exit a trade due to the current volatility. The indicator creates this synthetic version of the Volatility Index by a fairly simple formula that subtracts the current low from the highest close over the last 22 days and then divides that result by the same highest close and multiplies by 100 to turn it into a percentage. The 22-day length is used by default since there is a max of 22 trading days in a month but this formula works well for any other timeframe. By itself, this indicator doesn't generate buy or sell signals but generally speaking, you will want to enter or exit a trade when the Vix fix indicator amount spikes and you get an entry or exit signal from another indicator of your choice. Keep in mind that the colors I'm using for this indicator are only a general idea of when volatility is high enough to enter or exit a trade so green colors mean higher volatility and red colors mean low volatility. This is one of the few indicators I have written that don't recommend to buy or sell when the colors change.
This was a custom request from one of my followers so please let me know if you guys have any other script requests you want to see!
Easy To Trade indicatorAbstract
This script evaluates how easy for traders to trade.
This script computes the level that the gains were distributed in many trading days.
We can use this indicator to decide the instruments and the time we trade.
Introduction
Why we think the trading markets are boring?
It is because most of the gains were concentrated in a few trading days.
We look for instruments we can buy at support and sell at resistance frequently and repeatedly.
However, it does not happen usually because it is difficult to find sellers sell at support and buyers buy at resistance.
This script is a method to measure if an instrument is difficult to trade.
If most of the gains were concentrated in a few trading days, this script says it is difficult to trade.
If gains were distributed in many trading days and we can buy low and sell high repeatedly, this script says it is easy to trade.
Therefore, this script measure how difficult for us to trade by the ratio between the area of value and the total gain.
How it works
1. Determine the instruments and time frames we are interested in.
2. Determine how many days this script evaluate the result. This number may depend on how many days from you buy in to you sell out.
3. If the instrument you choose is easy to trade, this script reports higher values.
4. If the instrument is long term bullish, the number "easy to invest" is usually higher than the number "easy to short" .
5. We can consider trade instruments which are easier to trade than others.
6. We can consider wait until the period that it is difficult to trade has past or keep believing that some instruments are easier to trade than others.
Parameters
x_src = The price for each trading day this script use. It may be open , high , low , close or their combination.
x_is_exp = Whether this script evaluate the price movement in exponential or logarithm. You are advised to answer yes if the price changes drastically.
x_period = How many days this script evaluate the result.
Conclusion
With this indicator , we have data to explain how easy or difficult an instrument is for traders . In other words , if we hear some people say the trading markets are boring or difficult for traders , we can use this indicator to verify how accurate their comments are.
With this explainable analysis , we have more knowledge about which instruments and which sessions are relative easy for us to buy low and sell high repeatedly and frequently , we can have better proceeding than buy and hold simply.
Liquidity Price Depth Chart [LuxAlgo]The Liquidity Price Depth Chart is a unique indicator inspired by the visual representation of order book depth charts, highlighting sorted prices from bullish and bearish candles located on the chart's visible range, as well as their degree of liquidity.
Note that changing the chart's visible range will recalculate the indicator.
🔶 USAGE
The indicator can be used to visualize sorted bullish/bearish prices (in descending order), with bullish prices being highlighted on the left side of the chart, and bearish prices on the right. Prices are highlighted by dots, and connected by a line.
The displacement of a line relative to the x-axis is an indicator of liquidity, with a higher displacement highlighting prices with more volume.
These can also be easily identified by only keeping the dots, visible voids can be indicative of a price associated with significant volume or of a large price movement if the displacement is more visible for the price axis. These areas could play a key role in future trends.
Additionally, the location of the bullish/bearish prices with the highest volume is highlighted with dotted lines, with the returned horizontal lines being useful as potential support/resistances.
🔹 Liquidity Clusters
Clusters of liquidity can be spotted when the Liquidity Price Depth Chart exhibits more rectangular shapes rather than "V" shapes.
The steepest segments of the shape represent periods of non-stationarity/high volatility, while zones with clustered prices highlight zones of potential liquidity clusters, that is zones where traders accumulate positions.
🔹 Liquidity Sentiment
At the bottom of each area, a percentage can be visible. This percentage aims to indicate if the traded volume is more often associated with bullish or bearish price variations.
In the chart above we can see that bullish price variations make 63.89% of the total volume in the range visible range.
🔶 SETTINGS
🔹 Bullish Elements
Bullish Price Highest Volume Location: Shows the location of the bullish price variation with the highest associated volume using one horizontal and one vertical line.
Bullish Volume %: Displays the bullish volume percentage at the bottom of the depth chart.
🔹 Bearish Elements
Bearish Price Highest Volume Location: Shows the location of the bearish price variation with the highest associated volume using one horizontal and one vertical line.
Bearish Volume %: Displays the bearish volume percentage at the bottom of the depth chart.
🔹 Misc
Volume % Box Padding: Width of the volume % boxes at the bottom of the Liquidity Price Depth Chart as a percentage of the chart visible range
BUY/SELL RSI FLIUX v1.0The "BUY/SELL RSI FLUX v1.0" indicator is designed to provide buy and sell signals based on the RSI (Relative Strength Index) and price action in relation to support and resistance levels. It overlays directly on the price chart and includes the following components:
- Support and Resistance Levels: Determined over a specified number of bars (lengthSR), these levels represent potential barriers where price action may stall or reverse.
- ATR (Average True Range): Used to measure market volatility. While it's calculated in the script, it's not visualized on the chart as per the latest modification.
- RSI: The RSI is calculated over a defined period (lengthRSI) and is used to identify overbought or oversold conditions. Buy signals are generated when the RSI is below the oversold threshold (rsiOversold) and the price is above the support level. Conversely, sell signals occur when the RSI is above the overbought threshold (rsiOverbought), the price is below the resistance level, and additionally, the price is below a long-term moving average, which acts as a trend filter.
- Long-Term Moving Average: This moving average is plotted to help identify the prevailing market trend. Sell signals are filtered based on the price's position in relation to this moving average.
- Buy/Sell Signals: Visual representations in the form of shapes are plotted below (for buy) or above (for sell) the price bars to indicate potential entry points.
By combining these elements, the indicator aims to provide high-probability trading signals that align with both the market's momentum and trend.
Predictive Indicator Matrix v2 (public)Predictive Indicator Matrix for TradingView
The "Predictive Indicator Matrix" is an advanced analytical tool for TradingView, designed to work across multiple timeframes from 1D to 5m. It employs a complex algorithm combining various technical indicators such as the Ichimoku Cloud, ADX, five EMAs, slow and fast versions of MACD, Stochastic Oscillator, and RSI. This combination is meticulously curated to provide a multifaceted view of the market.
The uniqueness of this script lies in its trigonometric and mathematical logic. It utilizes trigonometric functions, like the arctangent and cosine functions, to calculate the 'bias' and 'score' of market trends, presented in decimal percentages (%). These calculations are pivotal in understanding market dynamics and potential directional changes. The 'bias' is calculated using the cosine of the arctangent of the ratio between current and previous scores, adjusted for market shift. This innovative approach provides a nuanced understanding of market momentum and trend strength.
Furthermore, the script dynamically generates prediction lines based on these calculations. These lines represent potential future market paths, plotted using the current market data and the calculated levels from the matrix. This feature visually represents the script's analysis, offering users an intuitive and actionable insight into potential market movements.
The integration of these indicators, along with the trigonometric calculations, makes the script not only unique but also a powerful tool for traders. It encapsulates various market aspects in one matrix, offering a comprehensive analysis that goes beyond traditional indicator-based strategies.
Note 1: This tool is intended for market analysis and should not be construed as investment advice.
Note 2: Community engagement is encouraged. For additional features like a time display on the table, please provide feedback in the comments. I am open to incorporating such features to enhance the tool's utility based on user preference.
Session Fibonacci Levels [QuantVue]The "Session Fibonacci Levels" indicator is a powerful tool designed for traders who aim to use Fibonacci retracement and extension levels in their trading strategy.
The indicator combines Fibonacci levels with customized trading sessions, allowing traders to observe and utilize Fibonacci levels that are automatically calculated for each defined session.
This approach offers a dynamic and session-relevant perspective on potential support and resistance levels, which can be crucial for intraday trading strategies.
🔹The indicator calculates Fibonacci retracement and extension levels based on the high and low prices of a specified trading session, dynamically adjusting to the location of the high and low bar.
If the low of the session occurs before the high, the fib levels are measured from low to high.
If the low of the session occurs after the high, the fib levels are measured from high to low.
🔹Users can set their time zone and define trading sessions, allowing for flexibility and applicability across global markets. This is particularly beneficial for traders who focus on specific market hours like the London or New York sessions.
Important sessions:
New York (8:00am - 5:00pm EST)
London (3:00am - 12:00pm EST)
Asia (7:00pm - 4:00am EST)
Custom session (user defined session in indicator settings)
🔹The indicator dynamically updates Fibonacci levels as new highs and lows are made within the session, keeping the analysis current. Additionally, it provides alerts when prices hit key Fibonacci levels, aiding in timely decision-making.
How to Use:
Configure the time zone and session time
Once the session begins, the indicator will begin highlighting the session range
When the session ends, Fibonacci levels based on the high and low of the session will be drawn
Use these levels to identify potential support and resistance areas
Standardized SuperTrend Oscillator
The Standardized SuperTrend Oscillator (SSO) is a versatile tool that transforms the SuperTrend indicator into an oscillator, offering both trend-following and mean reversion capabilities. It provides deeper insights into trends by standardizing the SuperTrend with respect to its upper and lower bounds, allowing traders to identify potential reversals and contrarian signals.
Methodology:
Lets begin with describing the SuperTrend indicator, which is the fundamental tool this script is based on.
SuperTrend:
The SuperTrend is calculated based on the average true range (ATR) and multiplier. It identifies the trend direction by placing a line above or below the price. In an uptrend, the line is below the price; in a downtrend, it's above the price.
pine_st(float src = hl2, float factor = 3., simple int len = 10) =>
float atr = ta.atr(len)
float up = src + factor * atr
up := up < nz(up ) or close > nz(up ) ? up : nz(up )
float lo = src - factor * atr
lo := lo > nz(lo ) or close < nz(lo ) ? lo : nz(lo )
int dir = na
float st = na
if na(atr )
dir := 1
else if st == nz(up )
dir := close > up ? -1 : 1
else
dir := close < lo ? 1 : -1
st := dir == -1 ? lo : up
SSO Oscillator:
The SSO is derived from the SuperTrend and the source price. It calculates the standardized difference between the SuperTrend and the source price. The standardization is achieved by dividing this difference by the distance between the upper and lower bounds of the SuperTrend.
float sso = (src - st) / (up - lo)
Components and Features:
SuperTrend of Oscillator - An additional SuperTrend based on the direction and volatility of the oscillator, behaving as the SuperTrend OF the SuperTrend. This provides further trend analysis of the underlying broad trend regime.
Reversion Tracer - The RSI of the direction of the original SuperTrend, providing a dynamic threshold for premium and discount price areas.
float rvt = ta.rsi(dir, len)
Heikin Ashi Transform - An option to apply the Heikin Ashi transform to the source price of the oscillator, providing a smoother visual representation of trends.
Display Modes - Choose between Line mode for a standard oscillator view or Candle mode, displaying the oscillator as Heikin Ashi candles for more in-depth trend analysis.
Contrarian and Reversion Signals:
Contrarian Signals - Based on the SuperTrend of the oscillator, these signals can act as potential buy or sell indications, highlighting potential trend exhaustion or premature reversals.
Reversion Signals - Generated when the oscillator crosses above or below the Reversion Tracer, signaling potential mean reversion opportunities or trend breakouts.
Utility and Use Cases:
Trend Analysis - Utilize the SSO as a trend-following tool with the added benefits of the oscillator's SuperTrend and Heikin Ashi transform.
Valuation Analysis - Leverage the oscillator's reversion signals for identifying potential mean reversion opportunities in the market.
The Standardized SuperTrend Oscillator enhances the capabilities of the SuperTrend indicator, offering a balanced approach to both trend-following and mean reversion strategies. Its customizable options and contrarian signals make it a valuable instrument for traders seeking comprehensive trend analysis and potential reversal signals.
Ranges With Targets [ChartPrime]The Ranges With Targets indicator is a tool designed to assist traders in identifying potential trading opportunities on a chart derived from breakout trading. It dynamically outlines ranges with boxes in real-time, providing a visual representation of price movements. When a breakout occurs from a range, the indicator will begin coloring the candles. A green candle signals a long breakout, suggesting a potential upward movement, while a red candle indicates a short breakout, suggesting a potential downward movement. Grey candles indicate periods with no active trade. Ranges are derived from daily changes in price action.
This indicator builds upon the common breakout theory in trading whereby when price breaks out of a range; it may indicate continuation in a trend.
Additionally, users have the ability to customize their risk-reward settings through a multiplier referred to as the Target input. This allows traders to set their Take Profit (TP) and Stop Loss (SL) levels according to their specific risk tolerance and trading strategy.
Furthermore, the indicator offers an optional stop loss setting that can automatically exit losing trades, providing an additional layer of risk management for users who choose to utilize this feature.
A dashboard is provided in the top right showing the statistics and performance of the indicator; winning trades; losing trades, gross profit and loss and PNL. This can be useful when analyzing the success of breakout trading on a particular asset or timeframe.