Fibonacci Enhanced Bollinger BandsDiscover the synergistic power of Fibonacci ratios with traditional Bollinger Bands in the 'Fibonacci Enhanced Bollinger Bands' indicator. Ideal for traders seeking dynamic price levels for strategic entries and exits, this tool adds a unique Fibonacci twist to your technical analysis toolkit.
Introduction to Fibonacci Enhanced Bollinger Bands
'Fibonacci Enhanced Bollinger Bands' is a trading indicator that combines the classic Bollinger Bands approach with the powerful insights of Fibonacci ratios. By integrating these two concepts, this indicator offers traders a unique perspective on market volatility and potential support/resistance levels.
How It Works
Core Concept : The indicator calculates Bollinger Bands using a selected Fibonacci ratio. This ratio is applied to the standard deviation of the price series, providing a dynamic range around a Simple Moving Average (SMA).
Trading Strategies
Long Opportunities : The area below the lower band can be considered a potential zone for long positions. Prices in this zone may indicate an oversold market condition, suggesting a possible reversal or pullback.
Short Opportunities : Conversely, the area above the upper band might signal short-selling opportunities. Prices in this region could imply an overbought scenario, potentially leading to a price decline.
Versatility : Whether you're a day trader, swing trader, or long-term investor, this indicator adapts to various timeframes and assets, making it a versatile tool in your trading arsenal.
Conclusion
The 'Fibonacci Enhanced Bollinger Bands' indicator is designed for traders who wish to leverage the power of Fibonacci ratios in conjunction with the volatility insights provided by Bollinger Bands. It's an excellent tool for identifying potential reversal zones and refining entry and exit points. Try it out to enhance your market analysis and support your trading decisions with the combined wisdom of Fibonacci and Bollinger Bands.
Volatility
Dynamic Volume-Volatility Adjusted MomentumThis Indicator in a refinement of my earlier script PC*VC Moving average Old with easier to follow color codes, overbought and oversold zones. This script has converted the previous script into a standardized measure by converting it into Z-scores and also incorporated a volatility based dynamic length option. Below is a detailed Explanation.
The "Dynamic Volume-Volatility Adjusted Momentum" or "Nasan Momentum Oscillator" is designed to capture market momentum while accounting for volume and volatility fluctuations. It leverages the Typical Price (TP), calculated as the average of high, low, and close prices, and introduces the Price Coefficient (PC) based on deviations from the simple moving average (SMA) across various time frames. Additionally, the Volume Coefficient (VC) compares current volume to SMA, and calculates Intraday Volatility (IDV) which gauges the daily price range relative to the close. Then intraday volatility ratio is calculated ( IDV Ratio) as the ratio of current Intraday Volatility (IDV) to the average of IDV for three different length periods, which provides a relative measure of current intraday volatility compared to its recent historical average. An inter-day ATR based Relative Volatility (RV) is calculated to adjusts for changing market volatility based on which the dynamic length adjustment adapts the moving average (standard length is 14). The PC *VC/IDV Ratio integrates price, volume, and volatility information which provides a volume and volatility adjusted momentum. This volume and volatility adjusted momentum is converted into a standardized Z-Score. The Z-Score measures deviations from the mean. Color-coded plots visually represent momentum, and thresholds aid in identifying overbought or oversold conditions.
The indicator incorporates a nuanced approach to emphasize the joint impact of price and volume while considering the stabilizing effect of lower intraday volatility. Placing the volume ratio (VC) in the numerator means that higher volume positively contributes to the overall ratio, aligning with the observation that increased volumes often accompany robust price movements. Simultaneously, the decision to include the inverse of intraday volatility (1/IDV) in the denominator acts as a dampener, reducing the impact of extreme intraday volatility on the momentum indicator. This design choice aims to filter out noise, giving more weight to significant price changes supported by substantial trading activity. In essence, the indicator's design seeks to provide a more robust momentum measure that balances the influence of price, volume, and volatility in the analysis of market dynamics.
Unbound RSIUnbound RSI
Description
The Unbound RSI or de-oscillated RSI indicator is a novel technical analysis indicator that combines the concepts of the Relative Strength Index (RSI) and moving averages, applied directly over the price chart. This indicator is unique in its approach by transforming the oscillatory nature of the RSI into a format that aligns with the price action, thereby offering a distinctive view of market momentum and trends.
Key Features
Multi-Length RSI Analysis: Incorporates three different lengths of RSI (short, medium, and long), providing insights into the momentum and trend strength at various timeframes.
Deoscillation of RSI: The RSI for each length is 'deoscillated' by adjusting its scale to align with the actual price movements. This is achieved by shifting and scaling the RSI values, effectively merging them with the price line.
Average True Range (ATR) Scaling: The deoscillation process includes scaling by the Average True Range (ATR), making the indicator responsive to the asset’s volatility.
Optional Smoothing: Provides an option to apply a simple moving average (SMA) smoothing to each deoscillated RSI line, reducing noise and highlighting more significant trends.
Dynamic Moving Average (MA) Baseline: Features a moving average calculated from the medium length (default value) de-oscillated RSI, serving as a dynamic baseline to identify overarching trends.
How It’s Different
Unlike standard RSI indicators that oscillate in a fixed range, this indicator transforms the RSI to move in tandem with the price, offering a unique perspective on momentum and trend changes. The use of multiple timeframes for RSI and the inclusion of a dynamic MA baseline provide a multifaceted view of market conditions.
Potential Usage
Trend Identification: The position of the price in relation to the different deoscillated RSI lines and the MA baseline can indicate the prevailing market trend.
Momentum Shifts: Crossovers of the price with the deoscillated RSI lines or the MA baseline can signal potential shifts in momentum, offering entry or exit points.
Volatility Awareness: The ATR-based scaling of the deoscillated RSI lines means the indicator adjusts to changes in volatility, potentially offering more reliable signals in different market conditions.
Comparative Analysis: By comparing the short, medium, and long deoscillated RSI lines, traders can gauge the strength of trends and the convergence or divergence of momentum across timeframes.
Best Practices
Backtesting: Given its novel nature, it’s crucial to backtest the indicator across different assets and market conditions.
Complementary Tools: Combine with other technical analysis tools (like support/resistance levels, other oscillators, volume analysis) for more robust trading signals.
Risk Management: Always use sound risk management strategies, as no single indicator provides foolproof signals.
Gap SMAGap SMA Indicator - Analyzing Price Gaps with Moving Averages
Description:
The Gap SMA (Simple Moving Average) indicator is a powerful tool designed to analyze price gaps, a phenomenon occurring when the market opens significantly higher or lower than the previous session's close. These gaps often signify abrupt shifts in market sentiment, driven by fundamental news, earnings reports, or overnight geopolitical events.
This indicator calculates and visualizes the average gap-up and gap-down based on historical data, aiding traders in identifying potential support or resistance levels driven by gap behavior.
What is a Gap?
In financial markets, a gap occurs when there is a notable difference (upward or downward) between the previous session's close and the current session's open. Gaps can be categorized as gap-ups (when the current open is higher than the previous close) or gap-downs (when the current open is lower than the previous close).
Key Features:
User-Defined Parameters: Adjust the number of gaps considered and a multiplier factor for precise customization.
Average Gap Visualization: Plotting lines representing the moving average of gap-ups and gap-downs.
Alert System: Alerts notify traders when the close price crosses above/below the average gap lines, offering potential entry or exit signals.
This tool is particularly useful for swing traders and investors interested in understanding historical gap patterns and integrating this information into their decision-making process. It can assist in determining potential stop-loss levels, defining entry or exit points, and gauging market sentiment based on gap behavior.
Feel free to experiment with various settings and timeframes to suit your trading strategy and risk tolerance. Your feedback and suggestions for further enhancements are highly appreciated!
Variable Keltner Channel For DCAHello Everyone,
Sharing the indicator that I'm using for Dollar Cost Averaging into the stocks & ETFs in my portfolio.
Instead of entering regularly each month, entry only happens when the share price is below the indicator.
This indicator is based on Exponential Moving Average & Keltner Channel.
When 21 EMA is above 34 EMA, the line is 1 ATR below the 21 EMA. (green color)
When 21 EMA is below 34 EMA, the line is 2 ATR below the 21 EMA. (red color)
Exploring ways to refine this further, especially during sideways or transition to downtrend, do comment if you have any idea.
This strategy itself was based on SMA 50 strategy for DCA.
Red Candle ATRThis ATR - Average True Range - Measures only red candles, giving the average true range of market declines.
SuperTrend ToolkitThe SuperTrend Toolkit (Super Kit) introduces a versatile approach to trend analysis by extending the application of the SuperTrend indicator to a wide array of @TradingView's built-in or Community Scripts . This tool facilitates the integration of the SuperTrend algorithm with various indicators, including oscillators, moving averages, overlays, and channels.
Methodology:
The SuperTrend, at its core, calculates a trend-following indicator based on the Average-True-Range (ATR) and price action. It creates dynamic support and resistance levels, adjusting to changing market conditions, and aiding in trend identification.
pine_st(simple float factor = 3., simple int length = 10) =>
float atr = ta.atr(length)
float up = hl2 + factor * atr
up := up < nz(up ) or close > nz(up ) ? up : nz(up )
float lo = hl2 - 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
@TradingView's native SuperTrend lacks the flexibility to incorporate different price sources into its calculation.
Community scripts, addressed the limitation by implementing the option to input different price sources, for example, one of the most popular publications, @KivancOzbilgic's SuperTrend script.
In May 2023, @TradingView introduced an update allowing the passing of another indicator's plot as a source value via the input.source() function. However, the built-in ta.atr function still relied on the chart's price data, limiting the formerly mentioned scripts to the chart's price data alone.
Unique Approach -
This script addresses the aforementioned limitations by processing the data differently.
Firstly we create a User-Defined-Type (UDT) replicating a bar's open, high, low, close (OHLC) values.
type bar
float o = open
float h = high
float l = low
float c = close
We then use this type to store the external input data.
src = input.source(close, "External Source")
bar b = bar.new(
nz(src ) , open 𝘷𝘢𝘭𝘶𝘦
math.max(nz(src ), src), high 𝘷𝘢𝘭𝘶𝘦
math.min(nz(src ), src), low 𝘷𝘢𝘭𝘶𝘦
src ) close 𝘷𝘢𝘭𝘶𝘦
Finally, we pass the data into our custom built SuperTrend with ATR functions to derive the external source's version of the SuperTrend indicator.
supertrend st = b.st(mlt, len)
- Setup Guide -
Utility and Use Cases:
Universal Compatibility - Apply SuperTrend to any built-in indicator or script, expanding its use beyond traditional price data.
- A simple example on one of my own public scripts -
Trend Analysis - Gain additional trend insights into otherwise mainly mean reverting or volume indicators.
- Alerts Setup Guide -
The Super Kit empowers traders and analysts with a tool that adapts the robust SuperTrend algorithm to a myriad of indicators, allowing comprehensive trend analysis and strategy development.
Market SessionsMarket Sessions Indicator Overview:
The "Market Sessions" indicator is a powerful tool designed to enhance traders' insights by providing comprehensive information about key market sessions, daily high/low values, and important exponential moving averages (EMAs) directly on the trading chart.
Key Features:
Market Sessions Display:
Visually represents Sydney/Tokyo, London, and New York sessions using distinct color-coded shapes.
Enhances visibility by dynamically changing the background color during specific trading sessions.
Daily High/Low:
Plots and labels the high and low values of the previous trading day on the chart.
Customizable colors for daily high and low markers.
Exponential Moving Averages (EMAs):
Includes 20, 50, and 200-period EMAs for comprehensive trend analysis.
Users have the flexibility to customize the visibility and color of each EMA.
Dashboard Information:
Real-time information about the current and upcoming market sessions.
Displays the time remaining for the upcoming session, aiding in timely decision-making.
Stock Session Information:
Clearly marks open and close times for Asia, Euro, and USA stock sessions.
Customizable visibility options for stock open/close lines, allowing for a tailored chart display.
Usage Guidelines:
Market Session Identification: Easily identify distinct market sessions using color-coded shapes and background color changes.
Daily Analysis: Quickly reference labeled lines for the high and low values of the previous trading day.
Trend Analysis: Observe the plotted EMAs on the chart for insights into the prevailing trends.
Real-time Monitoring: Utilize the dashboard for real-time information on current and upcoming sessions.
Stock Session Details: Identify specific open and close times for stock sessions, aiding in strategic planning.
Customization Options:
User-Friendly Parameters: Customize visibility, color, and positioning based on individual preferences.
Dashboard Configuration: Adjust dashboard position, text placement, and EMA parameters to tailor the indicator to specific needs.
Backtesting Feature:
The indicator includes a backtest feature, allowing users to visualize past sessions for testing and refining trading strategies.
This Market Sessions Indicator provides traders with a holistic view of market dynamics, facilitating informed decision-making and enhancing overall trading experiences.
Linear Regression MTF + Bands
Multiple Time Frames (MTFs): The indicator allows you to view linear regression trends over three different time frames (TF1, TF2, TF3) simultaneously. This means a trader can observe short, medium, and long-term trends on a single chart, which is valuable for understanding overall market direction and making cross-timeframe comparisons.
Linear Regression Bands: For each time frame, the indicator calculates linear regression bands. These bands represent the expected price range based on past prices. The middle line is the linear regression line, and the upper and lower lines are set at a specified deviation from this line. Traders can use these bands to spot potential overbought or oversold conditions, or to anticipate future price movements.
History Bands: Looking at linear regression channels can be deceiving if the user does not understand the calculation. In order to see where the channel was at in history the user can display the history bands to see where price actual was in a non-repainting fashion.
Customization Options: Traders can customize various aspects of the indicator, such as whether to display each time frame, the length of the linear regression (how many past data points it considers), and the deviation for the bands. This flexibility allows traders to adapt the indicator to their specific trading style and the asset they are analyzing.
Alerts: The script includes functionality to set alerts based on the price crossing the upper or lower bands of any time frame. This feature helps traders to be notified of potential trading opportunities or risks without constantly monitoring the chart.
Examples
The 15minute linear regression is overlayed onto a 5 minute chart. We are able to see higher timeframe average and extremes. The average is the middle of the channel and the extremes are the outer edges of the bands. The bands are non-repainting meaning that is the actual value of the channel at that place in time.
Here multiple channels are shown at once. We have a linear regression for the 5, 15, and 60 minute charts. If your strategy uses those timeframes you can see the average and overbought/oversold areas without having to flip through charts.
In this example we show just the history bands. The bands could be thought of as a "don't diddle in the middle" area if your strategy is looking for reversals
You can extend the channel into the future via the various input settings.
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.
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.
RMI Trend Sync - Strategy [presentTrading]█ Introduction and How It Is Different
The "RMI Trend Sync - Strategy " combines the strength of the Relative Momentum Index (RMI) with the dynamic nature of the Supertrend indicator. This strategy diverges from traditional methodologies by incorporating a dual analytical framework, leveraging both momentum and trend indicators to offer a more holistic market perspective. The integration of the RMI provides an enhanced understanding of market momentum, while the Super Trend indicator offers clear insights into the end of market trends, making this strategy particularly effective in diverse market conditions.
BTC 4h long/short performance
█ Strategy: How It Works - Detailed Explanation
- Understanding the Relative Momentum Index (RMI)
The Relative Momentum Index (RMI) is an adaptation of the traditional Relative Strength Index (RSI), designed to measure the momentum of price movements over a specified period. While RSI focuses on the speed and change of price movements, RMI incorporates the direction and magnitude of those movements, offering a more nuanced view of market momentum.
- Principle of RMI
Calculation Method: RMI is calculated by first determining the average gain and average loss over a given period (Length). It differs from RSI in that it uses the price change (close-to-close) rather than absolute gains or losses. The average gain is divided by the average loss, and this ratio is then normalized to fit within a 0-100 scale.
- Momentum Analysis in the Strategy
Thresholds for Decision Making: The strategy uses predetermined thresholds (pmom for positive momentum and nmom for negative momentum) to trigger trading decisions. When RMI crosses above the positive threshold and other conditions align (e.g., a bullish trend), it signals a potential long entry. Similarly, crossing below the negative threshold in a bearish trend may trigger a short entry.
- Super Trend and Trend Analysis
The Super Trend indicator is calculated based on a higher time frame, providing a broader view of the market trend. This indicator uses the Average True Range (ATR) to adapt to market volatility, making it an effective tool for identifying trend reversals.
The strategy employs a Volume Weighted Moving Average (VWMA) alongside the Super Trend, enhancing its capability to identify significant trend shifts.
ETH 4hr long/short performance
█ Trade Direction
The strategy offers flexibility in selecting the trading direction: long, short, or both. This versatility allows traders to adapt to their market outlook and risk tolerance, whether looking to capitalize on bullish trends, bearish trends, or a combination of both.
█ Usage
To effectively use the "RMI Trend Sync" strategy, traders should first set their preferred trading direction and adjust the RMI and Super Trend parameters according to their risk appetite and trading goals.
The strategy is designed to adapt to various market conditions, making it suitable for different asset classes and time frames.
█ Default Settings
RMI Settings: Length: 21, Positive Momentum Threshold: 70, Negative Momentum Threshold: 30
Super Trend Settings: Length: 10, Higher Time Frame: 480 minutes, Super Trend Factor: 3.5, MA Source: WMA
Visual Settings: Display Range MA: True, Bullish Color: #00bcd4, Bearish Color: #ff5252
Additional Settings: Band Length: 30, RWMA Length: 20
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.