GamCP Multi-timeframe v0.1Measures compression on different timeframes, on demand. A high compression precedes high volatilty.
v0.1 - by mufaxor
Полосы и каналы
RSI with Keltner Channel (+EMA Ribbon)Note that the EMA Ribbon is not embedded into the custom RSI with KC. In the future I plan to embed it. The EMA Ribbon I use is the following:
This is my very first attempt at modifying an indicator. I basically attempted to add a Keltner Channel around RSI.
This was used as an alternative channel to the standard Bollinger Band. KC goes hand-in-hand with the EMA Ribbon. KC also helps to better pinpoint relative-overbought/oversold conditions.
In my belief, the 20-80 levels don't behave as overbought/oversold levels. An exponential chart would always be overbought. So a Keltner Channel could in theory (and in practice) give us greater understanding on chart analysis.
This custom indicator is a bodge . It has lots of extra calculations that can be removed. I post this rough indicator for the community to give feedback on how I can improve it, or perhaps give an idea to some of you. Please don't judge me, I wouldn't post it but lately some have asked me about it.
In the future I would like to embed an EMA ribbon in this RSI indicator, just like I did in the following idea.
During this period, I don't really have the time to fix this indicator to my standards. So I will leave it as is for the foreseeable future.
If you have the will and knowledge however, feel free to built upon this indicator and share it!
Tread lightly, for this is hallowed ground.
-Father Grigori
PS. In this indicator, I would replace all the moving averages with an EMA Ribbon "average".
Oliver Velez IndicatorOliver Velez is a well-known trader and educator who has developed multiple trading strategies. One of them is the 20-200sma strategy, which is a basic moving average crossover strategy. The strategy involves using two simple moving averages (SMAs) - a short-term SMA with a period of 20 and a long-term SMA with a period of 200 - on a 2-minute timeframe chart.
When the short-term SMA crosses above the long-term SMA, it signals a potential bullish trend and traders may look for opportunities to enter a long position. Conversely, when the short-term SMA crosses below the long-term SMA, it signals a potential bearish trend and traders may look for opportunities to enter a short position.
Traders using this strategy may also look for additional confirmations, such as price action signals or other technical indicators, before entering or exiting a trade. It is important to note that no trading strategy can guarantee profits, and traders should always use risk management techniques to limit potential losses.
This script is an implementation of the 2 SMA's (can also choose other types of MA's), with Elephant Bar Indicator (EBI) and the Tail Bars Indicator in TradingView.
The Elephant Bar Indicator is a technical indicator used in trading to identify potential trend reversals in the market. It is named after the large size of the bullish or bearish candlestick that it represents. The Tail Bars Indicator is a pattern recognition technique that identifies candlestick patterns with long tails or wicks.
The script starts by defining the input parameters for both indicators. For the Elephant Bar Indicator, the user inputs the lookback period and the size multiplier. For the Tail Bars Indicator, the user inputs the tail ratio and opposite wick ratio.
Next, the script calculates the moving averages of the closing price over the defined short and long periods using the Moving Average function. The script then calculates the average candle size and volume over the lookback period.
The script then identifies the Elephant Bars and Tail Bars using the input parameters and additional conditions. For Elephant Bars, the script identifies bullish and bearish bars that meet certain criteria, such as a size greater than the average candle size and volume greater than the average volume.
For Tail Bars, the script identifies bullish and bearish bars that have long tails or wicks and meet certain criteria such as opposite wick size less than or equal to the tail size multiplied by the input opposite wick ratio.
Finally, the script plots the Elephant Bar and Tail Bar signals on the chart using different colors and shapes. The script also plots the moving averages and Keltner Channels to help traders identify potential trend reversals.
It is still under development, so please, if someone has ideas to add, more than welcome
Mora's Compression IndicatorIntroducing Mora's Price Compression indicator.
One of the biggest challenges in trading strategies is to differentiate between zones in which price is consolidated (so called squeezed) and zones of price expansion. Zones of consolidation can indicate traders' indecision or the creation of order blocks, but regardless of their mechanism, most indicators behave differently in those areas as oppose to times when price is trending.
A traditional indicator of consolidation zones is the so call Squeeze, which combines Bollinger Bands and Keltner’s Channels.. although broadly used, its interpretation is not quite straightforward.
Here a new indicator is introduced to identify areas of consolidation or expansion based on current and historical volatility.
Ultimately we know the price is consolidated (current volatility) when it starts raging within a narrower band that we are use to see (Historical volatility), so the ratio of the current to historical volatility becomes a straightforward identification of consolidation zones and that is what this indicator provides.
The indicator is scaled such that values near zero mean price is compressed and values near 100 price is over-extended. The indicators is designed to allow different time-frames, while avoiding repainting.
Linear Regression Volume ProfileLinear Regression Volume Profile plots the volume profile fixated on the linear regression of the lookback period rather than statically across y = 0. This helps identify potential support and resistance inside of the price channel.
Settings
Linear Regression
Linear Regression Source: the price source in which to sample when calculating the linear regression
Length: the number of bars to sample when calculating the linear regression
Deviation: the number of standard deviations away from the linear regression line to draw the upper and lower bounds
Linear Regression
Rows: the number of rows to divide the linear regression channel into when calculating the volume profile
Show Point of Control: toggle whether or not to plot the level with highest amount of volume
Usage
Similar to the traditional Linear Regression and Volume Profile this indicator is mainly to determine levels of support and resistance. One may interpret a level with high volume (i.e. point of control) to be a potential reversal point.
Details
This indicator first calculates the linear regression of the specified lookback period and, subsequently, the upper and lower bound of the linear regression channel. It then divides this channel by the specified number of rows and sums the volume that occurs in each row. The volume profile is scaled to the min and max volume.
Advanced RSI with Volatility Bands [RedWhite]English - Introduction
This indicator uses a standard RSI of 14 periods, however, instead of using static lines of 70 and 30 to identify overbought and oversold zones, a moving average band is added, similar to the Bollinger Bands indicator.
Español - Introducción
Este indicador utiliza un RSI estándar de 14 períodos, sin embargo, en lugar de utilizar líneas estáticas de 70 y 30 para identificar las zonas de sobrecompra y sobreventa, se agrega una banda de medias móviles similar al indicador de las Bandas de Bollinger.
English - Calculation
The moving average band is constructed by calculating a moving average (default of 70 periods) on the standard RSI of 14 periods. From this average, volatility bands are applied, drawing an upper and lower band by using a standard deviation (default of 1).
Español - Cálculo
La banda de medias móviles se construye calculando una media móvil (por defecto de 70 períodos) sobre el RSI estándar de 14 períodos. A partir de esta media, se aplican bandas de volatilidad, dibujando así una banda superior e inferior mediante el uso de una desviación estándar (por defecto de 1).
English - Interpretation
When the RSI surpasses the upper band, the chart's background is shaded by default (green) to signal a possible overbought situation. On the other hand, when the RSI surpasses the lower band, the chart's background is shaded by default (red) to signal a possible oversold situation. The indicator can be customized in terms of period length, moving average values, and standard deviations. In addition, background colors can be adjusted according to the user's preferences.
Español - Interpretación
Cuando el RSI supera la banda superior, el fondo del gráfico se sombra de un color por defecto (verde) para señalar una posible situación de sobrecompra. Por otro lado, cuando el RSI supera la banda inferior, el fondo del gráfico se sombrea de un color por defecto (rojo) para señalar una posible situación de sobreventa. El indicador se puede personalizar en cuanto a la longitud de los períodos, los valores de la media móvil y las desviaciones estándar. Además, los colores del fondo se pueden ajustar según las preferencias del usuario.
English - Conclusion
By incorporating moving average bands, the indicator can provide more precise signals that are adjusted to changing market conditions. Additionally, the function of coloring the background can help traders visualize overbought and oversold zones clearly and make informed decisions accordingly. It is important to note that this indicator is not infallible and should be used in conjunction with other indicators and market analysis to make informed trading decisions.
Español - Conclusión
Al incorporar bandas de medias móviles, el indicador puede proporcionar señales más precisas ajustadas a las condiciones cambiantes del mercado. Además, la función de colorear el fondo puede ayudar a los traders a visualizar claramente las zonas de sobrecompra y sobreventa y tomar decisiones informadas en consecuencia. Es importante tener en cuenta que este indicador no es infalible y debe ser utilizado junto con otros indicadores y análisis del mercado para tomar decisiones de trading informadas.
English: For comparison purposes, the standard 14-period RSI is presented above, and below it, the standard 14-period RSI with volatility bands is shown.
Español: Con fines comparativos, se presenta el RSI estándar de 14 períodos arriba, y debajo se muestra el RSI estándar de 14 períodos con bandas de volatilidad.
English: RSI of 14 periods with a band of moving averages of 70 periods and a standard deviation with a value of 1
Español: RSI de 14 periodos con una banda de medias móviles de 70 periodos y una desviación estándar con un valor de 1
English: RSI of 14 periods with a band of moving averages of 70 periods and a standard deviation with a value of 0
Español: RSI de 14 periodos con una banda de medias móviles de 70 periodos y una desviación estándar con un valor de 0
English - Note
This indicator is inspired by Blai5's "Advanced RSI".
Español- Nota
Este indicador está inspirado en el "RSI Avanzado" de Blai5.
WillyCycle Oscillator&DoubleMa/ErkOzi/"This code creates a technical analysis indicator used to calculate and visualize the WillyCycle oscillator and double moving average indicators on the price of a financial asset. The functionality can be summarized as follows:
*Calculate the WillyCycle oscillator: The WillyCycle is an oscillator calculated based on the highest and lowest values of an asset. This oscillator is used to measure overbought or oversold conditions of the asset.
*Calculate the double moving average: The double moving average helps determine trends by calculating the short-term and long-term moving averages of asset prices.
*Use the WillyCycle oscillator and double moving average indicators together: The WillyCycle oscillator is combined with the double moving averages to provide a clearer indication of overbought and oversold conditions.
*Visualize the indicator with color coding: The indicator is color-coded to show overbought and oversold conditions. Additionally, line and background colors are changed to make the indicator more readable.
Many parameters can be adjusted on the indicator: The indicator can be customized and modified by the user. For example, the period of the WillyCycle oscillator and the lengths of the double moving averages can be adjusted."
The strategy is based on two indicators - the WillyCycle oscillator and the double moving average. The WillyCycle oscillator measures overbought and oversold conditions of the asset based on its highest and lowest values. The double moving average calculates short-term and long-term moving averages of the asset's price, which can help identify trends.
The WillyCycle oscillator and the double moving average are combined in this strategy to provide a clearer indication of overbought and oversold conditions. When the WillyCycle oscillator indicates that the asset is oversold and the short-term moving average crosses above the long-term moving average, it may signal a buy opportunity. Conversely, when the WillyCycle oscillator indicates that the asset is overbought and the short-term moving average crosses below the long-term moving average, it may signal a sell opportunity.
To make it easier for traders to read and interpret the indicator, color-coding is used to indicate overbought and oversold conditions. The user can also customize the indicator by adjusting parameters such as the period of the WillyCycle oscillator and the lengths of the double moving averages.
*ıt provides successful buy and sell signals for price reversals.
*You can open counter trades in overbought and oversold areas by following the averages.
HT Momentum Indicator [ ZCrypto ]
The HT Momentum Indicator is a technical analysis tool that uses the Hyperbolic Tangent (tanh) function to measure momentum in a trading instrument.
This indicator is plotted as a histogram, with positive values indicating bullish momentum and negative values indicating bearish momentum.
Here are the main features and settings of the HT Momentum Indicator:
Source: This setting allows you to choose the price data used to calculate the momentum indicator. By default, the indicator uses the (High+Low+Close)/3 price, but you can select other options such as the open, high, or low prices.
Period: This setting determines the number of periods used in the momentum calculation. By default, the indicator uses a period of 14, but you can adjust this to suit your trading style and the market you are trading.
Show Fast/Slow/VWAP: These settings allow you to choose whether or not to display the fast and slow exponential moving averages (EMAs) and the volume-weighted average price (VWAP) on the chart.
Fast Length/Slow Length/VWAP Length: These settings allow you to adjust the length of the fast and slow EMAs and the VWAP calculation.
Bull Color/Bear Color: These settings allow you to choose the colors for the bullish and bearish histograms.
Zero Line: This indicator also includes a horizontal line at the zero level to help you identify when momentum is transitioning from bullish to bearish or vice versa.
The HT Momentum Indicator can be used to identify trends, momentum shifts, and potential buy/sell signals.
you can use the fast and slow EMAs to identify short-term and long-term trends, respectively, and the VWAP to gauge the strength of buying or selling pressure.
Additionally, the HT Momentum Indicator includes four pre-programmed alert conditions, which can notify you
when the fast EMA crosses above the slow EMA,
when the VWAP crosses above the zero line,
when the histogram transitions from negative to positive values.
when the histogram transitions from negative to positive values and VWAP above zero line
Leverage Liquidation Circles/dots/alertsThis plots liquidation alerts for different levels of leverage. The script calculates the liquidation prices for both long and short positions based on the inputted leverage values. Then, it plots dots on the chart where liquidation can occur for each level of leverage. Additionally, it plots circles on the chart only when a liquidation event occurs, at which point the circle changes color to indicate the level of leverage that triggered the liquidation.
The script allows traders to visualize potential liquidation events for different levels of leverage, which can be helpful in managing risk when trading on margin. The different colors of the circles can quickly communicate which level of leverage triggered the liquidation, allowing traders to quickly assess the situation and adjust their positions if necessary.
Bollinger Bands Weighted Alert System (BBWAS)The idea of this indicator is very similar to my previous published script called BBAS (Bollinger Bands Alert System).
Just with little additions. In this case, we're using a Weighted Moving Average (ta.wma) instead of Simple Moving Average to calculate the basis line.
A breakout in trading refers to a situation where the price of a security or asset moves beyond a defined level of support or resistance, which is typically indicated by technical analysis tools like Bollinger Bands. Bollinger Bands consist of three lines: the upper band, the lower band, and the middle band (or basis). The upper and lower bands are set at a specified number of standard deviations away from the middle band, and they help to define the range within which the price of an asset is expected to fluctuate.
When the price of the asset moves beyond the upper or lower band, it is said to have "broken out" of the range. If the price closes below the lower band, it is considered a bearish breakout, and if it closes above the upper band, it is considered a bullish breakout.
Once a breakout occurs, traders may look for a confirmation signal before entering a trade. In this case, crossing the middle line (or basis) after a breakout may signal a potential trend reversal and a good opportunity to enter a long or short trade, depending on the direction of the breakout.
Dear traders, while we strive to provide you with the best trading tools and resources, we want to remind you to exercise caution and diligence in your investing decisions.
It is important to always do your own research and analysis before making any trades. Remember, the responsibility for your investments ultimately lies with you.
Happy trading!
Ignition Band Angles are Bollinger Bands with numeric angleI developed Bollinger Bands that provide a numeric value indicating their strength. To achieve this, I used the degree of the angle of attack and color-coded the numbers. The top band displays the number in the upper corner of the chart, the bottom band in the bottom corner, and the Basis is in the left middle. These numbers quantify the slope of the bands, which can be difficult to discern on a chart because stretching out the x and y axis can flatten or exaggerate a slope. With my Bollinger Bands, you get a constant reading that provides an accurate measurement of the angle and strength of a trend. I hope this helps.
(Very promising) [Abdullah Ahmed] Momentum indicator V.1Description: MOM-LRC is a powerful technical analysis indicator designed to provide traders with signals based on the momentum of an asset's price and its deviation from its mean value. The indicator calculates the exponential RSI and uses a custom function to determine the percentage change from the mean. The upper and lower bands of the momentum channel are then calculated using linear regression of the rate of change from the mean. The channel multiplier can be adjusted to increase or decrease the sensitivity of the indicator.
How to use :
1 - Using MOM-LRC , look for buy signals when the price of the asset is below the lower border of the channel and retracing up. The opposite is true in the case of sell signals.
2 - It is also used in the case of negative and positive divergences, just as you use RSI
The indicator can be used on any time frame and any asset, making it a versatile tool for traders of all levels.
features:
Calculates exponential RSI and percentage change from the mean
Uses linear regression to calculate upper and lower bands of momentum channel
Adjustable channel multiplier for increased sensitivity
Suitable for any time frame and any asset
Happy trading!
SPX Fair Value Bands WSHOSHOThis is a variation of the SPX Fair Value Bands indicator which uses WSHOSHO instead of WALCL.
WSHOSHO only includes the 'Securities Held Outright' portion of the Fed balance sheet. This effectively eliminates the portions related to BTFP (Bank Term Funding Program).
Inter-Exchanges Crypto Price Spread Clouds (Tartigradia)Display variations in min-max and median values of high, low and close across exchanges. It's a kind of realized volatility indicator, as the idea is that in times of high volatility (high emotions, fear, uncertainty), it's more likely that market inefficiencies will appear for the same asset between different market makers, ie, the price can temporarily differ a lot. This indicator will catch these instants of high differences between exchanges, even if they lasted only an instant (because we use high and low values).
Compared with my other "Inter-Exchanges Crypto Price Spread Deviation" indicator, this one overlays directly on the chart, and offers a different take based on the same premisses. Instead of summarizing volatility via standard deviation, here we display clouds of the range of values that were observed.
A big advantage of this approach is that it can also be used to determine safe stop loss levels, especially the values of percentile rank (i.e., what are the high values that were observed in at least 50% of exchanges?).
Indeed, all price levels are displayed in the indicator's status bar:
green for high values,
red for low values,
aqua for median,
purple for average,
The first two values are max and min values of high across exchanges (in green).
The next two values are max and min of low across exchanges (in red).
The next two values are median (aqua) and average (purple).
The last two values are percentile rank values for high (green) and low (red) respectively.
Another advantage is that the high (green) vs low (red) clouds can be seen as representing the buying or selling pressure respectively across exchanges, and this may in itself provide a signal to know whether one side is winning.
Link to my other complementary indicator:
Compared to other inter-exchanges spread indicators, this one offers two major features:
The symbol automatically adapts to the symbol currently selected in user's chart. Hence, switching between tickers does not require the user to modify any option, everything is dynamically updated behind the scenes.
It's easy to add more exchanges (requires some code editing because PineScript v5 does not allow dynamical request.security() calls).
Limitations/things to know:
History is limited to what the ticker itself display. Ie, even if the exchanges specified in this indicator have more data than the ticker currently displayed in the user's chart, the indicator will show only a timeperiod as long as the chart.
The indicator can manage multiple exchanges of different historical length (ie, some exchanges having more data going way earlier in the past than others), in which case they will simply be ignored from calculations when far back in the past. Hence, you should be aware that the further you go in the past, the less exchanges will have such data, and hence the less accurate the measures will be (because the deviation will be calculated from less sources than more recent bars). This is thanks to how the array.* math functions behave in case of na values, they simply skip them from calculations, contrary to math.* functions.
Vertical Lines 2A vertical line plotting function is missing in Pinescript. This is another method to plot vertical line on a chart, and an improvement on my previous script "vertical lines" .
The script hacks the plotcandle function to display just the wicks without the body. This hack simulates a vertical line. The body of the candle is non-existing since the open and close are the same and its color is set to null. The wicks are abutting resulting in a continuous vertical line.
Drawbacks include inability to set width and transparency of the lines. The plotcandle function does not allow setting the width and transparency of the wicks. This feature would be desirable.
The crossing of the RSI of overbought and undersold zones is used as an example in this published script. Any indicator can be used and this script can be executed on any other indicator by using "add indicator" on the desired indicator, and selecting the indicator as the source. I added crossover lines on the plotted RSI as an example.
//////////////////////////////////////////////////////Breakdown of the script////////////////////////////////////////////////////////
The src input determines which price data is used for the highest value calculation. By default, it is set to the close price.
The length input determines the length of the RSI calculation. By default, it is set to 14.
The mult input determines the multiplier of the highest value that is used to determine the height of the vertical lines. By default, it is set to 100%, meaning the lines will reach the highest value in the dataset.
The top and bot inputs determine the overbought and oversold levels for the RSI. By default, they are set to 70 and 30, respectively.
The current_rsi and previous_rsi variables calculate the RSI values for the current bar and the previous bar, respectively.
The hi_value variable finds the highest value in the dataset, and the hi variable calculates the height of the vertical lines based on the highest value and the user-defined multiplier. The lo variable calculates the distance between the highest value and the current price data.
The uph, dnh, upl, and dnl variables determine the height and low of the vertical lines for when the RSI crosses overbought or oversold levels.
The if statements check if the RSI has crossed overbought or oversold levels and set the uph, dnh, upl, and dnl variables accordingly.
Finally, the plotcandle() function is used to plot the vertical lines on the chart. The open and close values are set to the src input, and the high and low values are set to the uph, dnh, upl, and dnl variables. The bordercolor argument is set to na to hide the borders of the lines, and the wickcolor argument is set to green or red, depending on whether the line is an overbought or oversold crossover.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Reverse Double Smoothed Relative Strength Index Bands[CC]The Reverse Double Smoothed Relative Strength Index Bands is a custom script of mine that is another part of my RSI indicator series, which I will be publishing over the next week or so. This takes my Double Smoothed Relative Strength Index script and applies the Reverse RSI formula to create a new Bollinger Bands type indicator. This concept can work for almost any oscillator with some slight tweaking. I have a reverse RSI being calculated for each major RSI level to give you an approximation of what the price would look like if that RSI level was hit. Feel free to tweak the RSI levels of course. I will publish more Reverse indicators since that doesn't seem to be a topic that is touched on very frequently. I have color coded the indicator to show darker colors when it is a strong signal and lighter colors for normal signals. Buy when the lines turn green and sell when they turn red.
This was a custom request from @kerpiciwuasile so let me know if you want to see me publish another custom script!
Blocky's EMA RibbonA classic EMA ribbon setup.
The script uses eight EMAs, with default lengths ranging from 21 to 55 periods, with an additional EMA with a default length of 200 periods.
The lengths of the EMAs can be customized, when customizing, the shortest time frame should be first and the longest time frame last.
The ribbons gradient strength is calculated based on the EMA's sequence, and their separation.
The color and transparency are set based on the calculated strength. The bolder the color, the stronger the strength.
Use the opacity multiplier to increase/decrease the strength of the gradient. BITSTAMP:BTCUSD
Shorting when Bollinger Band Above Price with RSI (by Coinrule)The Bollinger Bands are among the most famous and widely used indicators. A Bollinger Band is a technical analysis tool defined by a set of trendlines plotted two standard deviations (positively and negatively) away from a simple moving average ( SMA ) of a security's price, but which can be adjusted to user preferences. They can suggest when an asset is oversold or overbought in the short term, thus providing the best time for buying and selling it.
The relative strength index ( RSI ) is a momentum indicator used in technical analysis. RSI measures the speed and magnitude of a security's recent price changes to evaluate overvalued or undervalued conditions in the price of that security. The RSI can do more than point to overbought and oversold securities. It can also indicate securities primed for a trend reversal or corrective pullback in price. It can signal when to buy and sell. Traditionally, an RSI reading of 70 or above indicates an overbought situation. A reading of 30 or below indicates an oversold condition.
The short order is placed on assets that present strong momentum when it's more likely that it is about to reverse. The rule strategy places and closes the order when the following conditions are met:
ENTRY
The closing price is greater than the upper standard deviation of the Bollinger Bands
The RSI is less than 70.
EXIT
The trade is closed when the RSI is less than 70
The lower standard deviation of the Bollinger Band is less than the closing price.
This strategy was backtested from the beginning of 2022 to capture how this strategy would perform in a bear market.
The strategy assumes each order to trade 70% of the available capital to make the results more realistic. A trading fee of 0.1% is taken into account. The fee is aligned to the base fee applied on Binance, which is the largest cryptocurrency exchange by volume.
BB Mod + ForecastThis is a combination of two previous indicators; ALMA stdev band with fibs and Vector MACD.
Bollinger Band Mod fits the standard deviation on both sides of the center moving average ( ALMA +/- stdev / 2 ) and calculates Fibonacci ratios from stdev on both sides.
It is more averaging and more responsive at the same time compared to Bollinger Band.
Forecast is calculated from difference between origin ma ( ALMA from hl2 ) and six different period Hull moving averages averaged together and added to the center ma on both sides.
Fibonacci levels for 0.618 1.618 and 2.618 are added.
The dashed lines point towards the trend. Gives you a better idea of the current trend and momentum in the band.
Bollinger Band PW PackageThis script creates a Bollinger Band Package with Bollinger Band Percent and Width displayed on chart. The indicator also prints signals when price closes above or below the Bollinger Bands using shapes (circles by default). Bollinger Bands were created by John Bollinger, and consist of three lines plotted on a chart: the basis line (typically a moving average, 20 sma by default), an upper line (equal to the basis plus a certain number of standard deviations of the price, 2), and a lower line (equal to the basis minus the same number of standard deviations, 2 by default).
The script calculates the Bollinger Bands for a given input parameters by taking the length of the moving average and the number of standard deviations to use for the upper and lower bands. It then calculates the Bollinger Bands using these input parameters.
The script defines two functions: get_bb_percent() and get_bb_width(). The get_bb_percent() function calculates the percentage distance between the closing price and the lower band, as a percentage of the total distance between the upper and lower bands. This value is commonly referred to as the "Bollinger Band Percent". The get_bb_width() function calculates the percentage distance between the upper and lower bands, as a percentage of the basis line. This value is commonly referred to as the "Bollinger Band Width".
The script creates a table at the middle right of the chart, where the Bollinger Band Percent and Width values are displayed. The table is designed with two rows, one for the Bollinger Band Percent value and the other for the Bollinger Band Width value.
The script plots the three Bollinger Bands lines on the chart. The basis line is plotted in blue, the upper band line in red, and the lower band line in green.
The script then plots the shapes that signify closures above and below the bands using plotshape. The shapes and colors are customizable in the settings menu.
This indicator is designed to have all three components and a visual aid to assist Bollinger Band technical analysis in one script which can be helpful in determining potential trading opportunities. We thank John Bollinger for his contribution to technical analysis and trading.
Please give feedback and modify to your liking.
Role Reversal Detection Alert [MsF]Japanese below / 日本語説明は英文の後にあります。
-------------------------
When you draw a horizontal line on the W top or W bottom and be waiting for roll reversal, have you ever missed it when it rebounded at the horizontal line? It is a helpful indicator to prevent such oversight.
After the candle touches the horizontal line (including the touch of the leg), and then the candle body passes the alert judgment horizontal line, it will be alert.
The horizon line and the alert judment horizon line should be entered as parameters.
- Parameter
Input Horizontal Value: Enter the horizontal value
Band Range by pips : Enter the offset from horizontal line by pips
-------------------------
WトップやWボトムに水平線を引いてロールリバーサルを待ってる時に見事水平線で反発したのに見逃すことはありませんか?
そんな見落としを防止するためのお助け的なインジケーターです。
メイン水平線にローソク(ひげ含む)タッチ後、からアラート判定水平線を実体で抜けた場合にアラートを発報します。
メイン水平線とアラート判定水平線はそれぞれパラメータで入力する必要があります。
<パラメータ>
Input Horizontal Value:メイン水平線の価格を入力します
Band Range by pips :メイン水平線からアラート判定水平線のオフセットをpipsで入力します
+ Average Candle Bodies RangeACBR, or, Average Candle Bodies Range is a volatility and momentum indicator designed to indicate periods of increasing volatility and/or momentum. The genesis of the idea formed from my pondering what a trend trader is really looking for in terms of a volatility indicator. Most indicators I've come across haven't, in my opinion, done a satisfactory job of highlighting this. I kept thinking about the ATR (I use it for stops and targets) but I realized I didn't care about highs or lows in regards to a candle's volatility or momentum, nor do I care about their relation to a previous close. What really matters to me is candle body expansion. That is all. So, I created this.
ACBR is extremely simple at its heart. I made it more complicated of course, because why would I want anything for myself to be simple? Originally it was envisaged to be a simple volatility indicator highlighting areas of increasing and decreasing volatility. Then I decided some folks might want an indicator that could show this in a directional manner, i.e., an oscillator, so I spent some more hours tackling that
To start, the original version of the indicator simply subtracts opening price from closing price if the candle closes above the open, and subtracts the close from the open if the candle closes below the open. This way we get a positive number that simply measures candle expansion. We then apply a moving average to these values in order to smooth them (if you want). To get an oscillator we always subtract the close from the open, thus when a candle closes below its open we get a negative number.
I've naturally added an optional signal line as a helpful way of gauging volatility because obviously the values themselves may not tell you much. But I've also added something that I call a baseline. You can use this in a few ways, but first let me explain the two options for how the baseline can be calculated. And what do I mean by 'baseline?' I think of it as an area of the indicator where if the ACBR is below you will not want to enter into any trades, and if the ACBR is above then you are free to enter trades based on your system (or you might want to enter in areas of low volatility if your system calls for that). Waddah Attar Explosion is another indicator that implements something similar. The baseline is calculated in two different ways: one of which is making a Donchian Channel of the ACBR, and then using the basis as the baseline, while the other is applying an RMA to the cb_dif, which is the base unit that makes up the ACBR. Now, the basis of a Donchian Channel typically is the average of the highs and the lows. If we did that here we would have a baseline much too high (but maybe not...), however, I've made the divisor user adjustable. In this way you can adjust the height (or I guess you might say 'width' if it's an oscillator) however you like, thus making the indicator more or less sensitive. In the case of using the ACBR as the baseline we apply a multiplier to the values in order to adjust the height. Apologies if I'm being overly verbose. If you want to skip all of this I have tooltips in the settings for all of the inputs that I think need an explanation.
When using the indicator as an oscillator there are baselines above and below the zero line. One funny thing: if using the ACBR as calculation type for the baselines in oscillator mode, the baselines themselves will oscillate around the zero line. There is no way to fix this due to the calculation. That isn't necessarily bad (based on my eyeball test), but I probably wouldn't use it in such a way. But experiment! They could actually be a very fine entry or confirmation indicator. And while I'm on the topic of confirmation indicators, using this indicator as an oscillator naturally makes it a confirmation indicator. It just happens to have a volatility measurement baked into it. It may also be used as an exit and continuation indicator. And speaking of these things, there are optional shapes for indicating when you might want to exit or take a continuation trade. I've added alerts for these things too.
Lastly, oscillator mode is good for identifying divergences.
Above we have the indicator set to directional, or oscillator, mode. Baselines are Donchian Channels. I changed the default EMA length from 4 to 24 in this case, otherwise all the settings are default, as in the main image for the indicator (which is clearly set to non-directional). The indicator is set to requiring an advancing signal line for background and bar colors. Background color is not on by default. Candle colors, as you can see are aqua when above the top baseline (and only when the signal line is advancing, as per the settings), magenta when below the bottom baseline, and grey for anything else. The red and blue X's are exit signals. There are two types: one, when the signal line weakens and, two, when the ACBR crosses above or below the signal line. There are also arrows. These are continuation signals (ACBR crossing signal line).
Same image as above, but the baselines are set to ACBR rather than Donchian Channels.
Again, the same image, but with everything but the ACBR Baseline turned off. You can see how this might make for an excellent confirmation indicator, but for the areas of chap. Maybe run a second instance of the indicator on your chart as a volatility indicator, as you would not be using it in that way in this instance.
Here I have bar coloring turned off except for signal line crosses NOT requiring the signal line to be advancing. Background coloring is also turned on. You can see that these all line up with continuation signals, or exits for purple candles.
Same image as above but requiring the signal line to be advancing. You can see that continuation signals are not contingent upon the signal line to be advancing. I had it setup that way at first, but of course it still gave false signals, so I thought more signals (not that there are many) is better than fewer. To be sure, just because the indicator shows a continuation signal does not mean you should always take it.
Donchian Trend V1The Donchian Trend strategy is a trend-following approach that uses the Donchian Channels indicator to identify potential entry and exit points in a security. The Donchian Channels are formed by taking the highest high and the lowest low prices over a specified period and plotting them as upper and lower channels around the current price. The width of the channels indicates the level of volatility in the market.
In this strategy, the Donchian Channels are used as a trend filter to determine the direction of the market. When the price is above the upper channel, it suggests an uptrend, and when the price is below the lower channel, it indicates a downtrend. The length of the Donchian Channels is a key parameter in the strategy, as it determines the look-back period for identifying the high and low prices.
Additional Logic: To further refine the entry and exit signals, The script uses two moving averages, a fast one (MA5) and a slow one (MA45), to identify trends and generate trading signals. When the fast moving average crosses above the slow moving average, a buy signal is generated, indicating that the market is trending upwards. Conversely, when the fast moving average crosses below the slow moving average, a sell signal is generated, indicating that the market is trending downwards.
Evaluation: The script was backtested on historical price data for the pair. The backtest results showed that the script was able to generate a net profit of , with a profit factor of and a Sharpe ratio of . The script also includes metrics such as the number of winning and losing trades, the average trade, and the largest winning and losing trades.
The strategy is evaluated based on its net profit, gross profit, gross loss, max run-up, max drawdown, buy & hold return, Sharpe ratio, Sortino ratio, and profit factor. The parameters used in the backtest include a Donchian Channel length of 42, which corresponds to a weekly time with divide of 4h time frame, and a short-term MA of 5 and a long-term MA of 45 for more accurate entry and exit signals.
Disclaimer: This script is for educational and research purposes only and should not be used for trading with real money without further testing and validation. Past performance is not indicative of future results.