Holding Zone Input Parameters
The script has three input parameters:
· length: an integer input with a default value of 20, likely used for calculating moving averages or other indicators.
· zoneSize: a decimal input with a default value of 1.5, likely used to define the size of the "holding zone".
· entryZone: an integer input with a default value of 50, likely used to define the entry point for the strategy.
Calculate Holding Zone
The script calculates two values:
· highs: the highest high over the last length bars.
· lows: the lowest low over the last length bars.
Then, it calculates the zoneHigh and zoneLow values by subtracting/adding a fraction of the difference between highs and lows from/to highs and lows, respectively. This creates a "holding zone" between zoneHigh and zoneLow.
Plot Holding Zone
Finally, the script plots two lines:
· zoneHigh with a blue color and a linewidth of 2.
· zoneLow with a blue color and a linewidth of 2.
________________________________________________________________
For the 15 min timeframe I use the parameters 10 for the length, 0.5 for the zone size and 20 for the entry zone. this makes it more sensitive to price
Bands and Channels
[blackcat] L1 Zero-Lag EMA BandThe Zero-Lag EMA Band is a sophisticated technical analysis tool designed to provide traders with a comprehensive view of market trends. This innovative indicator merges the Zero-Lag EMA, a derivative of the traditional Exponential Moving Average, with Bollinger Bands to create a unique trend indicator that is less laggy and more responsive to market changes.
The Zero-Lag EMA Band is calculated by taking the standard deviation of the price data and adding or subtracting it from the Zero-Lag EMA to create an upper band and a lower band. This process results in a trend band that can help traders identify potential support and resistance levels, providing them with a more accurate assessment of the market's behavior.
The Zero-Lag EMA Band is particularly useful for traders who need to react quickly to market changes. It offers a more timely assessment of potential trend reversals, allowing traders to capitalize on market opportunities and mitigate risk.
The indicator's design is based on the principle of Zero-Lag, which aims to reduce the lag associated with traditional EMAs. This feature makes the Zero-Lag EMA Band a powerful tool for traders who want to stay ahead of the market and make more informed decisions.
In summary, the Zero-Lag EMA Band is a comprehensive and responsive tool for traders looking to identify and capitalize on market trends. It is a valuable addition to any trader's toolkit, offering a more accurate and timely assessment of potential trend reversals and providing a more comprehensive view of the market's behavior.
Certainly! Let's go through the Pine Script code line by line to understand its functionality:
//@version=5
This line specifies the version of Pine Script being used. In this case, it's version 5.
indicator(' L1 Zero-Lag EMA Band', shorttitle='L1 ZLEMA Band', overlay=true)
This line defines the indicator with a title and a short title. The `overlay=true` parameter means that the indicator will be plotted on top of the price data.
length = input.int(21, minval=1, title='Length')
This line creates an input field for the user to specify the length of the EMA. The default value is 21, and the minimum value is 1.
mult = input(1, title='Multiplier')
This line creates an input field for the user to specify the multiplier for the standard deviation, which is used to calculate the bands around the EMA. The default value is 1.
src = input.source(close, title="Source")
This line creates an input field for the user to specify the data source for the EMA calculation. The default value is the closing price of the asset.
// Define the smoothing factor (alpha) for the EMA
alpha = 2 / (length + 1)
This line calculates the smoothing factor alpha for the EMA. It's a common formula for EMA calculation.
// Initialize a variable to store the previous EMA value
var float prevEMA = na
This line initializes a variable to store the previous EMA value. It's initialized as `na` (not a number), which means it's not yet initialized.
// Calculate the zero-lag EMA
emaValue = na(prevEMA) ? ta.sma(src, length) : (src - prevEMA) * alpha + prevEMA
This line calculates the zero-lag EMA. If `prevEMA` is not a number (which means it's the first calculation), it uses the simple moving average (SMA) as the initial EMA. Otherwise, it uses the standard EMA formula.
// Update the previous EMA value
prevEMA := emaValue
This line updates the `prevEMA` variable with the newly calculated EMA value. The `:=` operator is used to update the variable in Pine Script.
// Calculate the upper and lower bands
dev = mult * ta.stdev(src, length)
upperBand = emaValue + dev
lowerBand = emaValue - dev
These lines calculate the upper and lower bands around the EMA. The bands are calculated by adding and subtracting the product of the multiplier and the standard deviation of the source data over the specified length.
// Plot the bands
p0 = plot(emaValue, color=color.new(color.yellow, 0))
p1 = plot(upperBand, color=color.new(color.yellow, 0))
p2 = plot(lowerBand, color=color.new(color.yellow, 0))
fill(p1, p2, color=color.new(color.fuchsia, 80))
These lines plot the EMA value, upper band, and lower band on the chart. The `fill` function is used to color the area between the upper and lower bands. The `color.new` function is used to create a new color with a specified alpha value (transparency).
In summary, this script creates an indicator that displays the zero-lag EMA and its bands on a trading chart. The user can specify the length of the EMA and the multiplier for the standard deviation. The bands are used to identify potential support and resistance levels for the asset's price.
In the context of the provided Pine Script code, `prevEMA` is a variable used to store the previous value of the Exponential Moving Average (EMA). The EMA is a type of moving average that places a greater weight on the most recent data points. Unlike a simple moving average (SMA), which is an equal-weighted average, the EMA gives more weight to the most recent data points, which can help to smooth out short-term price fluctuations and highlight the long-term trend.
The `prevEMA` variable is used to calculate the current EMA value. When the script runs for the first time, `prevEMA` will be `na` (not a number), indicating that there is no previous EMA value to use in the calculation. In such cases, the script falls back to using the simple moving average (SMA) as the initial EMA value.
Here's a breakdown of the role of `prevEMA`:
1. **Initialization**: On the first bar, `prevEMA` is `na`, so the script uses the SMA of the close price over the specified period as the initial EMA value.
2. **Calculation**: On subsequent bars, `prevEMA` holds the value of the EMA from the previous bar. This value is used in the EMA calculation to give more weight to the most recent data points.
3. **Update**: After calculating the current EMA value, `prevEMA` is updated with the new EMA value so it can be used in the next bar's calculation.
The purpose of `prevEMA` is to maintain the state of the EMA across different bars, ensuring that the EMA calculation is not reset to the SMA on each new bar. This is crucial for the EMA to function properly and to avoid the "lag" that can sometimes be associated with moving averages, especially when the length of the moving average is short.
In the provided script, `prevEMA` is used to simulate a zero-lag EMA, but as mentioned earlier, there is no such thing as a zero-lag EMA in the traditional sense. The EMA already has a very minimal lag due to its recursive nature, and any attempt to reduce the lag further would likely not be accurate or reliable for trading purposes.
Please note that the script provided is a conceptual example and may not be suitable for actual trading without further testing and validation.
Profitable L 1800 Candle Highlight [Beta]
Certainly! Here's a user guide for the provided Pine Script code:
User Guide: 1800 Candle Highlight Indicator
Overview:
The "1800 Candle Highlight" indicator is designed to visually emphasize the 18:00 (6:00 PM) candle on the chart, providing clarity on its open and close prices, and highlighting its timeframe with a distinctive color.
Key Features:
Candle Highlighting: The indicator identifies the candle that opens at 18:00 and visually distinguishes it from other candles on the chart.
Open and Close Prices: The indicator plots the open and close prices of the 18:00 candle as step lines, making it easy to identify price movements during that timeframe.
Background Color: It colors the background within the 18:00 candle's timeframe with a transparent blue shade, providing further emphasis on that period.
Start Marker: A downward triangle shape marks the start of the 18:00 candle, aiding in identifying the beginning of the highlighted timeframe.
Usage:
Overlay: The indicator is designed to be overlaid on the price chart, allowing users to visualize the highlighted candle alongside price movements.
Interpretation: Traders can observe the open and close prices of the 18:00 candle relative to previous and subsequent candles, aiding in analysis and decision-making.
Timeframe Focus: The highlighted candle's timeframe can serve as a reference point for analyzing price action during specific hours, such as the end of a trading day.
Installation:
Access: Users can access the Pine Script editor within the TradingView platform to create a new indicator.
Copy and Paste: Copy the provided Pine Script code and paste it into the editor.
Save and Apply: Save the indicator and apply it to the desired chart, adjusting settings as needed.
Customization:
Color Scheme: Users can customize the colors used for highlighting, open/close prices, and background to suit their preferences and chart aesthetics.
Styling: Adjustments can be made to line styles, widths, and marker sizes to enhance visibility and clarity.
Compatibility:
The indicator is compatible with TradingView's Pine Script version 5 and can be applied to various financial instruments and timeframes supported by the platform.
Disclaimer:
The "1800 Candle Highlight" indicator is provided for informational purposes only and should not be considered as financial advice. Users are encouraged to conduct thorough analysis and consider multiple factors before making trading decisions.
Double Inside bar with drift - by Yasser Mahmoud (YWMAAAWORLD)This is a new indicator that detects double inside bars with the condition that their base bar is either shifted above or below (i.e. both base bar's high and low are higher or lower than the mother bar's high and low respectively)
it plots lines at the top and bottom of the mother bar and 2 TPs above and 2 TPs below.
Fair ValueThis indicator is designed to provide a valuation perspective based on a specified length and deviations from a base value. This code calculates fair value levels relative to a chosen source (typically closing prices) using simple moving averages (SMA) or exponential moving averages (EMA). Please note that this is purely educational and should not be considered financial advice.
Key Features:
1. Valuation Calculation: The indicator computes a base value using either SMA or EMA, providing a reference point for fair value.
2. Deviation Levels: Additional levels of valuation are defined as deviations from the base value, indicating potential overvalued or undervalued conditions.
3. Currency-Specific Display: It displays valuation levels in different currency symbols based on the asset's trading currency.
4. Visual Representation: The indicator plots fair value lines and shades areas to highlight potential deviations.
5. Line Projection: A projection line shows potential future movement based on the calculated slope. This feature forecasts future price movement using a linear regression line's slope, dynamically projecting the trend forward. It provides traders with valuable insight into potential future price behavior. The implementation involves complex mathematical computations to determine the slope and iterative drawing of projected segments.
Educational Purpose: This indicator is for educational purposes only. It does not guarantee accuracy or suitability for trading decisions.
Please use caution and consider consulting a financial professional before making any investment decisions based on this indicator. Keep in mind that market conditions can change rapidly, and historical performance may not predict future results.
Bullish Candlestick Patterns With Filters [TradeDots]The "Bullish Candlestick Patterns With Filters" is a trading indicator that identifies 6 core bullish candlestick patterns. This is further enhanced by applying channel indicator as filters, designed to further increase the accuracy of the recognized patterns.
6 CANDLESTICK PATTERNS
Hammer
Inverted Hammer
Bullish Engulfing
The Piercing Line
The Morning Star
The 3 White Soldiers
SIGNAL FILTERING
The indicator incorporates with 2 primary methodologies aimed at filtering out lower accuracy signals.
Firstly, it comes with a "Lowest period" parameter that examines whether the trough of the bullish candlestick configuration signifies the lowest point within a specified retrospective bar length. The longer the period, the higher the probability that the price will rebound.
Secondly, the channel indicators, the Keltner Channels or Bollinger Bands. This indicator examines whether the lowest point of the bullish candlestick pattern breaches the lower band, indicating an oversold signal. Users have the flexibility to modify the length and band multiplier, enabling them to custom-tune signal sensitivity.
Without Filtering:
With Filtering
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
Dise prev Gen Long/Short
This script builds levels based on the High and Low of the previous trading day; a middle line is also added, which is the average value of these data. The indicator generates a long signal when the High level of the previous day is broken, as well as a short signal when the low is broken. The idea of the indicator is to capture volatility in the crypto market. You can try small takes of 1-2% of the movement, they will be more likely to work out. The script is intended rather to search for interesting “strong” assets within a day, for further analysis of whether it is worth trading or not.
Astro: Celestial Body Channel LinesThis is fork of the previous Astro: Planetary Channel Lines indicator that now includes over a dozen different celestial bodies, made possible after the most recent update of the AstroLib library.
Celestial Body Channel Lines is an approach to financial astrology that involves using the positions of the celestial bodies to predict trends and patterns in the stock market. The idea behind celestial body lines is that the positions of the bodies in the sky at the time of a market event can significantly influence that event.
The celestial body lines approach involves mapping the bodies' positions onto a stock market graph, with each body's position representing a specific line. These lines are thought to indicate areas of support and resistance, as well as potential turning points in the market.
This indicator includes geocentric/heliocentric celestial body lines on the chart for up to two bodies, price scaling & vertical offset, mirror/inversion switch, retrograde highlighting, and aspect recognition with customizable precision.
Relative Average Extrapolation [ChartPrime]Relative Average Extrapolation (ChartPrime) is a new take on session averages, like the famous vwap . This indicator leverages patterns in the market by leveraging average-at-time to get a footprint of the average market conditions for the current time. This allows for a great estimate of market conditions throughout the day allowing for predictive forecasting. If we know what the market conditions are at a given time of day we can use this information to make assumptions about future market conditions. This is what allows us to estimate an entire session with fair accuracy. This indicator works on any intra-day time frame and will not work on time frames less than a minute, or time frames that are a day or greater in length. A unique aspect of this indicator is that it allows for analysis of pre and post market sessions independently from regular hours. This results in a cleaner and more usable vwap for each individual session. One drawback of this is that the indicator utilizes an average for the length of a session. Because of this, some after hour sessions will only have a partial estimation. The average and deviation bands will work past the point where it has been extrapolated to in this instance however. On low time frames due to the limited number of data points, the indicator can appear noisy.
Generally crypto doesn't have a consistent footprint making this indicator less suitable in crypto markets. Because of this we have implemented other weighting schemes to allow for more flexibility in the number of use cases for this indicator. Besides volume weighting we have also included time, volatility, and linear (none) weighting. Using any one of these weighting schemes will transform the vwap into a wma, volatility adjusted ma, or a simple moving average. All of the style are still session period and will become longer as the session progresses.
Relative Average Extrapolation (ChartPrime) works by storing data for each time step throughout the day by utilizing a custom indexing system. It takes the a key , ie hour/minute, and transforms it into an array index to stor the current data point in its unique array. From there we can take the current time of day and advance it by one step to retrieve the data point for the next bar index. This allows us to utilize the footprint the extrapolate into the future. We use the relative rate of change for the average, the relative deviation, and relative price position to extrapolate from the current point to the end of the session. This process is fast and effective and possibly easier to use than the built in map feature.
If you have used vwap before you should be familiar with the general settings for this indicator. We have made a point to make it as intuitive for anyone who is already used to using the standard vwap. You can pick the source for the average and adjust/enable the deviation bands multipliers in the settings group. The average period is what determines the number of days to use for the average-at-time. When it is set to 0 it will use all available data. Under "Extrapolation" you will find the settings for the estimation. "Direction Sensitivity" adjusts how sensitive the indicator is to the direction of the vwap. A higher number will allow it to change directions faster, where a lower number will make it more stable throughout the session. Under the "Style" section you will find all of the color and style adjustments to customize the appearance of this indicator.
Relative Average Extrapolation (ChartPrime) is an advanced and customizable session average indicator with the ability to estimate the direction and volatility of intra-day sessions. We hope you will find this script fascinating and useful in your trading and decision making. With its unique take on session weighting and forecasting, we believe it will be a secret weapon for traders for years to come.
Enjoy
Nadaraya-Watson Probability [Yosiet]The script calculates and displays probability bands around price movements, offering insights into potential market trends.
Setting Up the Script
Window Size: Determines the length of the window for the Nadaraya-Watson estimation. A larger window smooths the data more but might lag current market conditions.
Bandwidth: Controls the bandwidth for the kernel regression, affecting the smoothness of the probability bands.
Reading the Data Table
The script dynamically updates a table positioned at the bottom right of your chart, providing real-time insights into market probabilities. Here's how to interpret the table:
Table Columns: The table is organized into three columns:
Up: Indicates the probability or relative change percentage for the upper band.
Down: Indicates the probability or relative change percentage for the lower band.
Table Rows: There are two main rows of interest:
P%: Shows the price change percentage difference between the bands and the closing price. A positive value in the "Up" column suggests the upper band is above the current close, indicating potential upward momentum. Conversely, a negative value in the "Down" column suggests downward momentum.
R%: Displays the relative inner change percentage difference between the bands, offering a measure of the market's volatility or stability within the bands.
Utilizing the Insights
Market Trends: A widening gap between the "Up" and "Down" percentages in the "P%" row might indicate increasing market volatility. Traders can use this information to adjust their risk management strategies accordingly.
Entry and Exit Points: The "R%" row provides insights into the relative position of the current price within the probability bands. Traders might consider positions closer to the lower band as potential entry points and positions near the upper band as exit points or take-profit levels.
Conclusion
The Nadaraya-Watson Probability script offers a sophisticated tool for traders looking to incorporate statistical analysis into their trading strategy. By understanding and utilizing the data presented in the script's table, traders can gain insights into market trends and volatility, aiding in decision-making processes. Remember, no indicator is foolproof; always consider multiple data sources and analyses when making trading decisions.
TASC 2024.05 Ultimate Channels and Ultimate Bands█ OVERVIEW
This script, inspired by the "Ultimate Channels and Ultimate Bands" article from the May 2024 edition of TASC's Traders' Tips , showcases the application of the UltimateSmoother by John Ehlers as a lag-reduced alternative to moving averages in indicators based on Keltner channels and Bollinger Bands®.
█ CONCEPTS
The UltimateSmoother , developed by John Ehlers, is a digital smoothing filter that provides minimal lag compared to many conventional smoothing filters, e.g., moving averages . Since this filter can provide a viable replacement for moving averages with reduced lag, it can potentially find broader applications in various technical indicators that utilize such averages.
This script explores its use as the smoothing filter in Keltner channels and Bollinger Bands® calculations, which traditionally rely on moving averages. By substituting averages with the UltimateSmoother function, the resulting channels or bands respond more quickly to fluctuations with substantially reduced lag.
Users can customize the script by selecting between the Ultimate channel or Ultimate bands and adjusting their parameters, including lookback lengths and band/channel width multipliers, to fine-tune the results.
█ CALCULATIONS
The calculations the Ultimate channels and Ultimate bands use closely resemble those of their conventional counterparts.
Ultimate channel:
Apply the Ultimate smoother to the `close` time series to establish the basis (center) value.
Calculate the smooth true range (STR) by applying the UltimateSmoother function with a user-specified length instead of a rolling moving average, thus replacing the conventional average true range (ATR). Users can adjust the final STR value using the "Width multiplier" input in the script's settings.
Calculate the upper channel value by adding the multiplied STR to the basis calculated in the first step, and calculate the lower channel value by subtracting the multiplied STR from the basis.
Ultimate bands:
Apply the Ultimate smoother to the `close` time series to establish the basis (center) value.
Calculate the width of the bands by finding the square root of the average of individual squared deviations over the specified length, then multiplying the result by the "Width multiplier" input value.
Calculate the upper band by adding the resulting width to the basis from the first step, and calculate the lower band by subtracting the width from the basis.
Swing Harmony IndicatorThis indicator is called "Swing Harmony Indicator" and it calculates the average of the highest high and lowest low prices over a certain period, along with a simple moving average of the closing prices. It then plots these values on the chart, with the color of the average line dynamically changing based on whether the second average is less than or greater than the first average.
Customizable 52 Week High & Range BandsTitle: Customizable 52 Week High & Range Bands Indicator
Description:
The "Customizable 52 Week High & Range Bands" indicator is a novel tool designed for traders and investors who seek to gain insights into an asset's long-term performance while simultaneously identifying potential support and resistance levels through customizable percentage-based range bands.
Key Features:
52-Week High Visualization: At its core, this indicator pinpoints the highest price reached by an asset over the past 52 weeks, offering a clear view of its peak performance in the yearly window.
Adjustable Range Bands: Unlike fixed indicators, this tool allows users to set a custom percentage above and below the 52-week high to create upper and lower range bands. These bands are invaluable for traders looking to gauge potential breakout or pullback zones relative to historical highs.
Strategic Decision-Making: By adjusting the range bands, users can tailor the indicator to match their trading style, whether it be conservative or aggressive, making it a versatile addition to any trading strategy.
How to Use:
Customize the Percentage: Begin by setting your desired percentage for the range bands through the indicator settings. This will adjust the upper and lower bands to encapsulate the range you're interested in monitoring.
Analyze the Bands: The 52-week high and its corresponding range bands are plotted directly on the chart, offering immediate visual cues. Look for price actions that approach or breach these bands to identify potential trading opportunities.
Incorporate into Your Strategy: Use the information provided by the indicator in conjunction with other analysis tools or indicators to refine your trading decisions and strategies.
This indicator stands out by providing not just a static view of the past year's performance but a dynamic tool that can be customized to fit the individual trader's needs, making it a valuable addition to the TradingView Community.
On Chart Reverse PMARPIntroducing the On Chart Reverse PMARP
Concept
The PMAR/PMARP is an indicator which calculates :
The ratio between a chosen source price and a user defined moving average ( Price Moving Average Ratio ).
The percentile of the PMAR over an adjustable lookback period ( Price Moving Average Ratio Percentile ).
Here I have 'reverse engineered' the PMAR / PMARP formulas to derive several functions.
These functions calculate the chart price at which the PMARP will cross a particular PMARP level.
I have employed those functions here to give the "crossover" price levels for :
Scale high level
High alert level
High test level
Mid-Line
Low test level
Low alert level
Scale low level
Knowing the price at which these various user defined PMARP levels will be crossed can be useful in setting price levels that trigger components of various strategies.
For example: A trader can use the reverse engineered upper high alert price level, to set a take profit limit order on a long trade, which was entered when PMARP was low.
This 'On Chart' RPMARP indicator displays these 'reverse engineered' price levels as plotted lines on the chart.
This allows the user to see directly on the chart the interplay between the various crossover levels and price action.
This allows for more intuitive Technical Analysis, and allows traders to precisely plan entries, exits and stops for their PMARP based trades.
It optionally plots the user defined moving average from which the PMARP is derived.
It also optionally plots the 'Reverse engineered' midline, test level lines, visual alert level lines, scale max. and min. level lines, and background alert signal bars.
Main Properties :
Price Source :- Choice of price values or external value from another indicator ( default *Close ).
PMAR Length :- User defined time period to be used in calculating the Moving Average for the Price Moving Average Ratio and the PMAR component of the PMARP ( default *21 ).
MA Type :- User defined type of Moving Average which creates the MA for the Price Moving Average Ratio and the PMAR component of the PMARP ( default *EMA ).
Checkbox and color selection box for the optionally plotted Moving Average line.
Price Moving Average Ratio Percentile Properties :
PMARP Length :- The lookback period to be used in calculating the Price Moving Average Ratio Percentile ( default *350 ).
PMARP Level Settings :
Scale High :- Scale high level ( Locked at 100 ).
Hi Alert :- High alert level ( default *99 ).
Hi Test :- High test level ( default *70 ).
Lid Line :- Mid line level ( Locked at 50 ).
Lo Test :- Low test level ( default *30 ).
Lo Alert :- Low alert level ( default *1 ).
Scale Low :- Scale low level ( Locked at 0 ).
Checkboxes and color selection boxes for each of the optionally plotted lines.
PMARP MA Settings :
Checkbox to optionally plot 'reverse engineered' PMARP MA line.
PMARP MA Length :- The time period to be used in calculating the signal Moving Average for the Line Plot ( default *20 ).
PMARP MA Type :- The type of Moving Average which creates the signal Moving Average for the Line Plot ( default *EMA ).
Color Type :- User choice from dropdown between "single" or "dual" line color ( default *dual ).
Single Color :- Color selection box.
Dual Color :- Color selection box. Note: Defines the color of the signal MA when the MA is falling in "dual" line coloring mode.
Signal Bar Settings :
Signal Bars Transparency :- Sets the transparency of the vertical signal bars ( default *70 ).
Checkboxes and color selection boxes for Upper/Lower alert signal bars.
EMA 9/13/18/25 + Bollinger BandThe indicator combines two components: Exponential Moving Averages (EMAs) and Bollinger Bands.
Exponential Moving Averages (EMAs): The indicator calculates four EMAs with different periods: 9, 13, 18, and 25. An Exponential Moving Average is a type of moving average that places a greater weight and significance on the most recent data points. As the name suggests, it's an average of the asset's price over a certain period, with recent prices given more weight in the calculation, making it more responsive to recent price changes.
Bollinger Bands: Bollinger Bands consist of a simple moving average (the basis) and two standard deviations plotted away from it. The standard deviations are multiplied by a factor (usually 2) to determine the distance from the basis. These bands dynamically adjust themselves based on recent price movements. The upper band represents the highest price level reached in the given period, while the lower band represents the lowest price level.
Combining these components provides traders with insights into both trend direction and volatility. The EMAs help identify trends by smoothing out price data, while the Bollinger Bands offer insights into volatility and potential price reversal points. Traders often use the crossovers of EMAs and interactions with Bollinger Bands to make trading decisions. For example, when the price touches the upper Bollinger Band, it may indicate overbought conditions, while touching the lower band may suggest oversold conditions. Additionally, crossovers of EMAs (such as the shorter-term EMA crossing above or below the longer-term EMA) may signal changes in trend direction.
MTF BB+KC Avg
Bollinger Bands (BB) are a widely used technical analysis created by John Bollinger in the early 1980’s. Bollinger Bands consist of a band of three lines which are plotted in relation to instrument prices. The line in the middle is usually a Simple Moving Average (SMA) set to a period of 20 days (The type of trend line and period can be changed by the trader; however a 20 day moving average is by far the most popular). This indicator does not plot the middle line. The Upper and Lower Bands are used as a way to measure volatility by observing the relationship between the Bands and price. Typically the Upper and Lower Bands are set to two standard deviations away from the middle line, however the number of standard deviations can also be adjusted in the indicator.
Keltner Channels (KC) are banded lines similar to Bollinger Bands and Moving Average Envelopes. They consist of an Upper Envelope above a Middle Line (not plotted in this indicator) as well as a Lower Envelope below the Middle Line. The Middle Line is a moving average of price over a user-defined time period. Either a simple moving average or an exponential moving average are typically used. The Upper and Lower Envelopes are set a (user-defined multiple) of a range away from the Middle Line. This can be a multiple of the daily high/low range, or more commonly a multiple of the Average True Range.
This indicator is built on AVERAGING the BB and KC values for each bar, so you have an efficient metric of AVERAGE volatility. The indicator visualizes changes in volatility which is of course dynamic.
What to look for
High/Low Prices
One thing that must be understood about this indicator's plots is that it averages by adding BB levels to KC levels and dividing by 2. So the plots provide a relative definition of high and low from two very popular indicators. Prices are almost always within the upper and lower bands. Therefore, when prices move up near the upper or lower bands or even break through the band, many traders would see that price action as OVER-EXTENDED (either overbought or oversold, as applicable). This would preset a possible selling or buying opportunity.
Cycling Between Expansion and Contraction
Volatility can generally be seen as a cycle. Typically periods of time with low volatility and steady or sideways prices (known as contraction) are followed by period of expansion. Expansion is a period of time characterized by high volatility and moving prices. Periods of expansion are then generally followed by periods of contraction. It is a cycle in which traders can be better prepared to navigate by using Bollinger Bands because of the indicators ability to monitor ever changing volatility.
Walking the Bands
Of course, just like with any indicator, there are exceptions to every rule and plenty of examples where what is expected to happen, does not happen. Previously, it was mentioned that price breaking above the Upper Band or breaking below the Lower band could signify a selling or buying opportunity respectively. However this is not always the case. “Walking the Bands” can occur in either a strong uptrend or a strong downtrend.
During a strong uptrend, there may be repeated instances of price touching or breaking through the Upper Band. Each time that this occurs, it is not a sell signal, it is a result of the overall strength of the move. Likewise during a strong downtrend there may be repeated instances of price touching or breaking through the Lower Band. Each time that this occurs, it is not a buy signal, it is a result of the overall strength of the move.
Keep in mind that instances of “Walking the Bands” will only occur in strong, defined uptrends or downtrends.
Inputs
TimeFrame
You can select any timeframe froom 1 minute to 12 months for the bar measured.
Length of the internal moving averages
You can select the period of time to be used in calculating the moving averages which create the base for the Upper and Lower Bands. 20 days is the default.
Basis MA Type
Determines the type of Moving Average that is applied to the basis plot line. Default is SMA and you can select EMA.
Source
Determines what data from each bar will be used in calculations. Close is the default.
StdDev/Multiplier
The number of Standard Deviations (for BB) or Multiplier (for KC) away from the moving averages that the Upper and Lower Bands should be. 2 is the default value for each indicator.
Team Undergrounds Magic RSI BandsWhat is this indicator?
This indicator shows RSI but visualize as bands with custom timeframe settings. Normal RSI doesn't really visualse well when the price gets overbought/oversold and generally because of candle closes it can be hard to determine if the price has already touched the prefered RSI level. The custom timeframe allows you to go to shorter or longer timeframes on the chart while maintaining the same timeframe on the RSI indicator.
How does it work?
Add this indicator to the chart, and you'll see 2 bands (green and red). By standard settings, the green band shows when price goes below 30 RSI and the red line when price goes above 70 on the RSI. By standard settings the RSI band is set to 7 hour because this tends to work well with Bitcoin and crypto in general, but the timeframe can be changed in the settings. 12hr, 3hr, 3D, 1W are all good timeframes based off personal preference. The overbought/oversold level and RSI length can also be adjusted.
Indicator is not a financial advice tool, and offcourse, data can always change. Past price does not predict future price by defintion.
Quadratic Weighted Bands"Quadratic Weighted Bands" (QWB) is designed to identify and visualize market trends and volatility using quadratic weighted filtering techniques. It works by applying quadratic weighting to a selected data source over a specified length, enhancing the sensitivity and responsiveness of the indicator to recent market movements. A major advantage of this indicator is the ability to have a longer lookback period without having too much lag. This results in a smoother output that is still very responsive. Its about twice as fast as a normal average so adjust accordingly.
The indicator is customizable, allowing users to select between the normal Quadratic Weighting (QWF) and Volume Quadratic Weighting (VQWF), choose their data source, adjust the lookback period, and modify the deviation multiplier to fit their analysis needs. Additionally, users can customize the colors of the bands and center line.
The color of the central line changes based on the direction of the trend, as well as having a neutral (ranging) color. This visual aspect makes it easier for traders to quickly see the strength and direction of the market.
Style Select: Choose between "Normal Quadratic Weighting" or "Volume Quadratic Weighting" to adapt the indicator based on volume data or standard price data.
Source: This allows for the selection of the input source for the indicator, such as HL2, ensuring the analysis is aligned with specific trading preferences.
Length: Define the lookback period for the average, with the system automatically utilizing the maximum available length if the specified range exceeds available data, ensuring it always works.
Deviation Length: Optionally adjust the lookback period for calculating deviation, enhancing the indicator's sensitivity and accuracy in identifying market volatility.
Multiplier: Fine tune the deviation multiplier to control the width of the bands, allowing traders to adjust for market volatility and personal risk tolerance.
Top Color: Customize the color of the top band, which also affects the center line's appearance. Adjusting the brightness provides visual clarity and personalization.
Bottom Color: Similarly, select the color for the bottom band, which also influences the center line. The option to adjust brightness ensures the indicator's readability and aesthetic preference.
Neutral Color: Designate a color for indicating a ranging market.
Enjoy
Twin Range Filter VisualizedVisulaized version of @colinmck's Twin Range Filter version on TradingView.
On @colinmck's Twin Range Filter version, you can only see Long and Short signals on the chart.
But in this version of TRF, users can visually see the BUY and SELL signals on the chart with an added line of TRF.
TRF is an average of two smoothed Exponential Moving Averages, fast one has 27 bars of length and the slow one has 55 bars.
The purpose is to obtain two ranges that price fluctuates between (upper and lower range) and have LONG AND SHORT SIGNALS when close price crosses above the upper range and conversely crosses below lower range.
I personally combine the upper and lower ranges on one line to see the long and short signals with my own eyes so,
-BUY when price is higher or equal to the upper range level and the indicator line turns to draw the lower range to follow the price just under the bars as a trailing stop loss indicator like SuperTrend.
-SELL when price is lower or equal to the lower range levelline under the bars and then the indicator line turns to draw the upper range to follow the price just over the bars in that same trailing stop loss logic.
There are also two coefficients that adjusts the trailing line distance levels from the price multiplying the effect of the faster and slower moving averages.
The default values of the multipliers:
Fast range multiplier of Fast Moving Average(27): 1.6
Slow range multiplier of fSlow Moving Average(55): 2
Remember that if you enlarge these multipliers you will enlarge the ranges and have less but lagging signals. Conversely, decreasing the multipliers will have small ranges (line will get closer to the price and more signals will occur)
200 EMA Trend Strategy Anti meanDescription:
The "200 EMA Trend Strategy" is a versatile technical analysis tool designed for day trading and long-term investing. It aims to identify potential trend reversal points in the market based on the interaction between the price and the 200-period Exponential Moving Average (EMA). This strategy utilizes the 200 EMA, standard deviation bands, and basic trend analysis to generate buy and sell signals.
Key Features:
200-period Exponential Moving Average (EMA): The indicator plots the 200-period Exponential Moving Average, a reliable trend-following indicator that smooths out price data to identify the underlying trend direction.
Standard Deviation Bands: Upper and lower bands around the 200 EMA are calculated based on a specified standard deviation multiplier. These bands help identify potential overbought and oversold levels in the market.
Trend Signals: Buy signals are generated when the price crosses above the 200 EMA, indicating a potential bullish trend, while sell signals are generated when the price crosses below the 200 EMA, indicating a potential bearish trend.
Exit Signals: Exit signals are triggered when the price moves beyond the standard deviation bands in the opposite direction of the current trend. Most trades will be exited with minimal losses, aiming to grow the trading account over time. Multiple exit signals may be displayed, but only the first signal will be considered, ignoring subsequent signals to minimize drawdown.
Usage:
Day Trading: For intraday trading, traders can use a one-minute chart and fix the indicator's timeframe to five minutes. This allows for quick decision-making and minimizes drawdown by focusing on short-term price movements.
Long-Term Investing: For long-term investing, traders can utilize a four-hour or two-hour chart and fix the indicator's timeframe to daily or one-day timeframe. This provides a broader perspective of the market trends and allows for strategic positioning over longer time horizons.
Risk Management: Employ proper risk management techniques and position sizing strategies to mitigate losses and maximize profits. Use the indicator's exit signals to exit trades with minimal losses and allow profitable trades to grow the trading account over time.
Risk Disclosure: Trading involves risks, and this indicator should be used as part of a comprehensive trading strategy. It is essential to consider risk management principles and employ proper position sizing techniques when trading based on the signals generated by this indicator.
Heikin Ashi RSI + OTT [Erebor]Relative Strength Index (RSI)
The Relative Strength Index (RSI) is a popular momentum oscillator used in technical analysis to measure the speed and change of price movements. Developed by J. Welles Wilder, the RSI is calculated using the average gains and losses over a specified period, typically 14 days. Here's how it works:
Description and Calculation:
1. Average Gain and Average Loss Calculation:
- Calculate the average gain and average loss over the chosen period (e.g., 14 days).
- The average gain is the sum of gains divided by the period, and the average loss is the sum of losses divided by the period.
2. Relative Strength (RS) Calculation:
- The relative strength is the ratio of average gain to average loss.
The RSI oscillates between 0 and 100. Traditionally, an RSI above 70 indicates overbought conditions, suggesting a potential sell signal, while an RSI below 30 suggests oversold conditions, indicating a potential buy signal.
Pros of RSI:
- Identifying Overbought and Oversold Conditions: RSI helps traders identify potential reversal points in the market due to overbought or oversold conditions.
- Confirmation Tool: RSI can be used in conjunction with other technical indicators or chart patterns to confirm signals, enhancing the reliability of trading decisions.
- Versatility: RSI can be applied to various timeframes, from intraday to long-term charts, making it adaptable to different trading styles.
Cons of RSI:
- Whipsaws: In ranging markets, RSI can generate false signals, leading to whipsaws (rapid price movements followed by a reversal).
- Not Always Accurate: RSI may give false signals, especially in strongly trending markets where overbought or oversold conditions persist for extended periods.
- Subjectivity: Interpretation of RSI levels (e.g., 70 for overbought, 30 for oversold) is somewhat subjective and can vary depending on market conditions and individual preferences.
Checking RSIs in Different Periods:
Traders often use multiple timeframes to analyze RSI for a more comprehensive view:
- Fast RSI (e.g., 8-period): Provides more sensitive signals, suitable for short-term trading and quick decision-making.
- Slow RSI (e.g., 32-period): Offers a smoother representation of price movements, useful for identifying longer-term trends and reducing noise.
By comparing RSI readings across different periods, traders can gain insights into the momentum and strength of price movements over various timeframes, helping them make more informed trading decisions. Additionally, divergence between fast and slow RSI readings may signal potential trend reversals or continuation patterns.
Heikin Ashi Candles
Let's consider a modification to the traditional “Heikin Ashi Candles” where we introduce a new parameter: the period of calculation. The traditional HA candles are derived from the open 01, high 00 low 00, and close 00 prices of the underlying asset.
Now, let's introduce a new parameter, period, which will determine how many periods are considered in the calculation of the HA candles. This period parameter will affect the smoothing and responsiveness of the resulting candles.
In this modification, instead of considering just the current period, we're averaging or aggregating the prices over a specified number of periods . This will result in candles that reflect a longer-term trend or sentiment, depending on the chosen period value.
For example, if period is set to 1, it would essentially be the same as traditional Heikin Ashi candles. However, if period is set to a higher value, say 5, each candle will represent the average price movement over the last 5 periods, providing a smoother representation of the trend but potentially with delayed signals compared to lower period values.
Traders can adjust the period parameter based on their trading style, the timeframe they're analyzing, and the level of smoothing or responsiveness they prefer in their candlestick patterns.
Optimized Trend Tracker
The "Optimized Trend Tracker" is a proprietary trading indicator developed by TradingView user ANIL ÖZEKŞİ. It is designed to identify and track trends in financial markets efficiently. The indicator attempts to smooth out price fluctuations and provide clear signals for trend direction.
The Optimized Trend Tracker uses a combination of moving averages and adaptive filters to detect trends. It aims to reduce lag and noise typically associated with traditional moving averages, thereby providing more timely and accurate signals.
Some of the key features and applications of the OTT include:
• Trend Identification: The indicator helps traders identify the direction of the prevailing trend in a market. It distinguishes between uptrends, downtrends, and sideways consolidations.
• Entry and Exit Signals: The OTT generates buy and sell signals based on crossovers and direction changes of the trend. Traders can use these signals to time their entries and exits in the market.
• Trend Strength: It also provides insights into the strength of the trend by analyzing the slope and momentum of price movements. This information can help traders assess the conviction behind the trend and adjust their trading strategies accordingly.
• Filter Noise: By employing adaptive filters, the indicator aims to filter out market noise and false signals, thereby enhancing the reliability of trend identification.
• Customization: Traders can customize the parameters of the OTT to suit their specific trading preferences and market conditions. This flexibility allows for adaptation to different timeframes and asset classes.
Overall, the OTT can be a valuable tool for traders seeking to capitalize on trending market conditions while minimizing false signals and noise. However, like any trading indicator, it is essential to combine its signals with other forms of analysis and risk management strategies for optimal results. Additionally, traders should thoroughly back-test the indicator and practice using it in a demo environment before applying it to live trading.
The following types of moving average have been included: "SMA", "EMA", "SMMA (RMA)", "WMA", "VWMA", "HMA", "KAMA", "LSMA", "TRAMA", "VAR", "DEMA", "ZLEMA", "TSF", "WWMA". Thanks to the authors.
Thank you for your indicator “Optimized Trend Tracker”. © kivancozbilgic
Thank you for your programming language, indicators and strategies. © TradingView
Kind regards.
© Erebor_GIT
Groupped SMA with Custom Lenght by Mustafa KAPUZThis script is a custom implementation of grouped Simple Moving Averages (SMA) with added Bollinger Bands
Key Features:
Customizable Length (n): Allows users to set the length for the SMA calculation. The length is the number of bars used to calculate the average. This is input by the user and can be adjusted to analyze different time periods.
Standard Deviation Multiplier (StdDev): This input allows users to customize the width of the Bollinger Bands. A higher multiplier results in wider bands, and a lower multiplier results in narrower bands.
Grouped Calculation: Instead of calculating the SMA on a rolling basis, this script groups the data in sets of n (as per the user-defined length) and calculates the SMA for each group. After each group, the calculation resets.
Bollinger Bands: Based on the SMA calculated for each group, the script calculates the standard deviation of prices within the group. Using the standard deviation and the standard deviation multiplier (StdDev), it computes the upper and lower Bollinger Bands.
Dynamic Visualization: For each completed group of n bars, the script draws lines on the chart representing the upper band, lower band, and the SMA itself. These lines help visualize the volatility and the average price level for each group.
How It Works:
Data Grouping: For every candle/bar on the chart, the script sums up the closing prices and counts the number of bars until it reaches the user-defined length (n). It stores closing prices in an array for further calculations.
Average Calculation: Once the count reaches n, it calculates the average closing price for the group and resets the sum and count for the next group.
Standard Deviation and Bollinger Bands: With the average calculated, it then computes the standard deviation of the closing prices within the group. This standard deviation, multiplied by the user-defined StdDev multiplier, determines the distance of the Bollinger Bands from the average.
Drawing Lines: Finally, the script visually represents these calculations on the chart by drawing lines for the upper band, lower band, and the average itself for each group.
Purpose and Use:
This script is useful for traders and analysts who prefer to examine price movements and volatility in fixed intervals or groups of bars, rather than the continuous rolling averages provided by traditional SMA and Bollinger Band indicators. By adjusting the length and standard deviation multiplier, users can tailor the indicator to fit various trading strategies, time frames, and market conditions. This grouped approach can provide unique insights into market trends, potential reversals, and volatility patterns that might not be as evident with standard indicators.
Relative Strength Index(RSI)- Range (60-40)Custom RSI Indicator:
The Custom RSI Indicator is a technical analysis tool designed to assess the momentum of a financial instrument's price movements within a specified range. Unlike the traditional RSI, which typically operates within a range of 0 to 100, this customized version focuses on a narrower spectrum between 40 and 60, providing clearer signals for traders.
Key Features:
Bullish and Bearish Zones: The indicator delineates between bullish and bearish sentiment. When the RSI value climbs above 60, it signals bullish momentum, indicating potential uptrends in the price. Conversely, when the RSI dips below 40, it suggests bearish sentiment, signaling potential downtrends.
Overbought and Oversold Conditions: Additionally, the Custom RSI Indicator identifies extreme market conditions. When the RSI surpasses 80 , it denotes overbought territory, suggesting that the asset may be overvalued and prone to a reversal or correction. Conversely, when the RSI falls below 30 , it indicates oversold conditions, suggesting that the asset may be undervalued and ripe for a potential rebound.
Default RSI Comparison: The Custom RSI Indicator can be compared against the traditional RSI for added context. While the customized range provides more precise signals within the 60-40 spectrum, referencing the default RSI can offer broader insights into market dynamics.
Usage:
Trend Identification: Traders can utilize the Custom RSI Indicator to identify potential trend reversals or continuations based on shifts in momentum within the specified range.
Confirmation Tool: It can serve as a confirmation tool alongside other technical indicators or price action analysis, enhancing the overall reliability of trading decisions.
Risk Management: By recognizing overbought and oversold conditions, traders can implement risk management strategies such as setting stop-loss orders or adjusting position sizes to mitigate potential losses.
Conclusion:
The Custom RSI Indicator offers traders a focused perspective on market momentum within the 60-40 range, facilitating more accurate assessments of bullish and bearish sentiment as well as identifying extreme market conditions. By incorporating this tool into their analysis, traders can make informed decisions and potentially improve their trading outcomes.