Reverse PMAR & PMARPIntroducing the Reverse PMAR & 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 PMAR/PMARP will cross a particular scale value.
I have employed those functions here to give the "crossover" price levels for :
Upper alert level
Upper test level
Mid-Line
Lower test level
Lower alert 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: using the reverse engineered upper test price level, to set take a take profit limit order on a long trade, which was entered when PMARP was low.
The indicator displays either the PMAR or PMARP as a line plot with optional signal moving average.
It also plots optional visual alert level lines, test level lines, background signal bars, and a display panel with reverse engineered prices.
Main Properties :
Price Source :- Choice of price values or external value from another indicator ( default *Close ).
Indicator :- Choice between PMAR or PMARP ( default *PMAR ).
Price Moving Average Ratio Properties :
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 ).
PMAR Multiplier :- User defined multiplier which moves the decimal place to the right in order to make the scale readable in PMAR mode ( default *x1 ).
Price Moving Average Ratio Percentile Properties :
PMARP Length :- The lookback period to be used in calculating the Price Moving Average Ratio Percentile ( default *350 ).
PMAR Levels :
Hi PMAR Alert :- High alert level ( default *1.02 ).
Hi PMAR Test :- High test level ( default *1.01 ).
Lo PMAR Test :- Low test level ( default *0.99 ).
Lo PMAR Alert :- Low alert level ( default *0.98 ).
PMARP Levels :
Hi PMARP Alert :- High alert level ( default *99 ).
Hi PMARP Test :- High test level ( default *70 ).
Lo PMARP Test :- Low test level ( default *30 ).
Lo PMARP Alert :- Low alert level ( default *1 ).
Line Plot Settings :
Color Type :- User choice from dropdown between "solid" or "spectrum" line coloring ( default *Solid ).
Solid Color :- Color selection box ( default *Yellow ).
Spectrum :- User choice from dropdown between "high to low", or "high to mid to low" spectrum line coloring ( default *high to mid to low ).
High Color :- Color selection box ( default *Red ).
Mid Color :- Color selection box ( default *Green ).
Low Color :- Color selection box ( default *Blue ).
Line Width :- Defines the width of the signal line from 1 - 4 ( default *1 ).
Signal Moving Average Settings :
Signal MA Length :- The time period to be used in calculating the signal Moving Average for the Line Plot ( default *20 ).
Signal 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 ( default *White ).
Dual Color :- Color selection box ( default *Red ). Note: Defines the color of the signal MA when the MA is falling in "dual" line coloring mode.
Line Width :- Defines the width of the signal line from 1 - 4 ( default *1 ).
Visual Alert Level Settings :
Checkboxes and color selection boxes for Upper/Lower alert lines, midline & test lines.
Signal Bars Transparency :- Sets the transparency of the vertical signal bars ( default *50 ).
Checkboxes and color selection boxes for Upper/Lower signal bars.
Panel Properties :
Checkboxes and color selection boxes for the various info. panel components.
Text Size :- User choice from dropdown between Tiny, Small, Normal and Large ( default *Normal ).
Decimal Places :- Sets the decimal places shown for the values in the info. panel ( default *2 ).
Krownscryptocave
Simple Bollinger Band Width PercentileI'm a big fan of The_Caretaker's BBWP and wanted to add it as a volatility indicator to some of my scripts, but since it is over 100 lines of code (plus spacing and comments) I wanted to find if there was a simpler way to get comparable results. SBBWP uses Pine 5 built in functions that I don't believe were available when The_Caretaker wrote BBPW. The main limitations compared to The_Caretaker's version is that it can only use SMA as its Basis Type and the colors are also not as pretty. I have not included alerts or scale lines since I'm not trying to replace BBWP, just give a simple example that you can easily build in to your scripts.
Full credit and respect to The_Caretaker!
Reverse Cutlers Relative Strength Index On ChartIntroduction
The Reverse Cutlers Relative Strength Index (RCRSI) OC is an indicator which tells the user what price is required to give a particular Cutlers Relative Strength Index ( RSI ) value, or cross its Moving Average (MA) signal line.
Overview
Background & Credits:
The relative strength index ( RSI ) is a momentum indicator used in technical analysis that was originally developed by J. Welles Wilder Jr. and introduced in his seminal 1978 book, “New Concepts in Technical Trading Systems.”.
Cutler created a variation of the RSI known as “Cutlers RSI” using a different formulation to avoid an inherent accuracy problem which arises when using Wilders method of smoothing.
Further developments in the use, and more nuanced interpretations of the RSI have been developed by Cardwell, and also by well-known chartered market technician, Constance Brown C.M.T., in her acclaimed book "Technical Analysis for the Trading Professional” 1999 where she described the idea of bull and bear market ranges for RSI , and while she did not actually reveal the formulas, she introduced the concept of “reverse engineering” the RSI to give price level outputs.
Renowned financial software developer, co-author of academic books on finance, and scientific fellow to the Department of Finance and Insurance at the Technological Educational Institute of Crete, Giorgos Siligardos PHD . brought a new perspective to Wilder’s RSI when he published his excellent and well-received articles "Reverse Engineering RSI " and "Reverse Engineering RSI II " in the June 2003, and August 2003 issues of Stocks & Commodities magazine, where he described his methods of reverse engineering Wilders RSI .
Several excellent Implementations of the Reverse Wilders Relative Strength Index have been published here on Tradingview and elsewhere.
My utmost respect, and all due credits to authors of related prior works.
Introduction
It is worth noting that while the general RSI formula, and the logic dictating the UpMove and DownMove data series has remained the same as the Wilders original formulation, it has been interpreted in a different way by using a different method of averaging the upward, and downward moves.
Cutler recognized the issue of data length dependency when using wilders smoothing method of calculating RSI which means that wilders standard RSI will have a potential initialization error which reduces with every new data point calculated meaning early results should be regarded as unreliable until enough calculation iterations have occurred for convergence.
Hence Cutler proposed using Simple Moving Averaging for gain and loss data which this Indicator is based on.
Having "Reverse engineered" prices for any oscillator makes the planning, and execution of strategies around that oscillator far simpler, more timely and effective.
Introducing the Reverse Cutlers RSI which consists of plotted lines on a scale of 0 to 100, and an optional infobox.
The RSI scale is divided into zones:
• Scale high (100)
• Bull critical zone (80 - 100)
• Bull control zone (62 - 80)
• Scale midline (50)
• Bear control zone (20 - 38)
• Bear critical zone (0 - 20)
• Scale low (0)
The RSI plots which graphically display output closing price levels where Cutlers RSI value will crossover:
• RSI (eq) (previous RSI value)
• RSI MA signal line
• RSI Test price
• Alert level high
• Alert level low
The info box displays output closing price levels where Cutlers RSI value will crossover:
• Its previous value. ( RSI )
• Bull critical zone.
• Bull control zone.
• Mid-Line.
• Bear control zone.
• Bear critical zone.
• RSI MA signal line
• Alert level High
• Alert level low
And also displays the resultant RSI for a user defined closing price:
• Test price RSI
The infobox outputs can be shown for the current bar close, or the next bar close.
The user can easily select which information they want in the infobox from the setttings
Importantly:
All info box price levels for the current bar are calculated immediately upon the current bar closing and a new bar opening, they will not change until the current bar closes.
All info box price levels for the next bar are projections which are continually recalculated as the current price changes, and therefore fluctuate as the current price changes.
Understanding the Relative Strength Index
At its simplest the RSI is a measure of how quickly traders are bidding the price of an asset up or down.
It does this by calculating the difference in magnitude of price gains and losses over a specific lookback period to evaluate market conditions.
The RSI is displayed as an oscillator (a line graph that can move between two extremes) and outputs a value limited between 0 and 100.
It is typically accompanied by a moving average signal line.
Traditional interpretations
Overbought and oversold:
An RSI value of 70 or above indicates that an asset is becoming overbought (overvalued condition), and may be may be ready for a trend reversal or corrective pullback in price.
An RSI value of 30 or below indicates that an asset is becoming oversold (undervalued condition), and may be may be primed for a trend reversal or corrective pullback in price.
Midline Crossovers:
When the RSI crosses above its midline ( RSI > 50%) a bullish bias signal is generated. (only take long trades)
When the RSI crosses below its midline ( RSI < 50%) a bearish bias signal is generated. (only take short trades)
Bullish and bearish moving average signal Line crossovers:
When the RSI line crosses above its signal line, a bullish buy signal is generated
When the RSI line crosses below its signal line, a bearish sell signal is generated.
Swing Failures and classic rejection patterns:
If the RSI makes a lower high, and then follows with a downside move below the previous low, a Top Swing Failure has occurred.
If the RSI makes a higher low, and then follows with an upside move above the previous high, a Bottom Swing Failure has occurred.
Examples of classic swing rejection patterns
Bullish swing rejection pattern:
The RSI moves into oversold zone (below 30%).
The RSI rejects back out of the oversold zone (above 30%)
The RSI forms another dip without crossing back into oversold zone.
The RSI then continues the bounce to break up above the previous high.
Bearish swing rejection pattern:
The RSI moves into overbought zone (above 70%).
The RSI rejects back out of the overbought zone (below 70%)
The RSI forms another peak without crossing back into overbought zone.
The RSI then continues to break down below the previous low.
Divergences:
A regular bullish RSI divergence is when the price makes lower lows in a downtrend and the RSI indicator makes higher lows.
A regular bearish RSI divergence is when the price makes higher highs in an uptrend and the RSI indicator makes lower highs.
A hidden bullish RSI divergence is when the price makes higher lows in an uptrend and the RSI indicator makes lower lows.
A hidden bearish RSI divergence is when the price makes lower highs in a downtrend and the RSI indicator makes higher highs.
Regular divergences can signal a reversal of the trending direction.
Hidden divergences can signal a continuation in the direction of the trend.
Chart Patterns:
RSI regularly forms classic chart patterns that may not show on the underlying price chart, such as ascending and descending triangles & wedges , double tops, bottoms and trend lines etc.
Support and Resistance:
It is very often easier to define support or resistance levels on the RSI itself rather than the price chart.
Modern interpretations in trending markets:
Modern interpretations of the RSI stress the context of the greater trend when using RSI signals such as crossovers, overbought/oversold conditions, divergences and patterns.
Constance Brown, CMT , was one of the first who promoted the idea that an oversold reading on the RSI in an uptrend is likely much higher than 30%, and that an overbought reading on the RSI during a downtrend is much lower than the 70% level.
In an uptrend or bull market, the RSI tends to remain in the 40 to 90 range, with the 40-50 zone acting as support.
During a downtrend or bear market, the RSI tends to stay between the 10 to 60 range, with the 50-60 zone acting as resistance.
For ease of executing more modern and nuanced interpretations of RSI it is very useful to break the RSI scale into bull and bear control and critical zones.
These ranges will vary depending on the RSI settings and the strength of the specific market’s underlying trend.
Limitations of the RSI
Like most technical indicators, its signals are most reliable when they conform to the long-term trend.
True trend reversal signals are rare, and can be difficult to separate from false signals.
False signals or “fake-outs”, e.g. a bullish crossover, followed by a sudden decline in price, are common.
Since the indicator displays momentum, it can stay overbought or oversold for a long time when an asset has significant sustained momentum in either direction.
Data Length Dependency when using wilders smoothing method of calculating RSI means that wilders standard RSI will have a potential initialization error which reduces with every new data point calculated meaning early results should be regarded as unreliable until calculation iterations have occurred for convergence.
Reverse Cutlers Relative Strength IndexIntroduction
The Reverse Cutlers Relative Strength Index (RCRSI) is an indicator which tells the user what price is required to give a particular Cutlers Relative Strength Index (RSI) value, or cross its Moving Average (MA) signal line.
Overview
Background & Credits:
The relative strength index (RSI) is a momentum indicator used in technical analysis that was originally developed by J. Welles Wilder Jr. and introduced in his seminal 1978 book, “New Concepts in Technical Trading Systems.”.
Cutler created a variation of the RSI known as “Cutlers RSI” using a different formulation to avoid an inherent accuracy problem which arises when using Wilders method of smoothing.
Further developments in the use, and more nuanced interpretations of the RSI have been developed by Cardwell, and also by well-known chartered market technician, Constance Brown C.M.T., in her acclaimed book "Technical Analysis for the Trading Professional” 1999 where she described the idea of bull and bear market ranges for RSI, and while she did not actually reveal the formulas, she introduced the concept of “reverse engineering” the RSI to give price level outputs.
Renowned financial software developer, co-author of academic books on finance, and scientific fellow to the Department of Finance and Insurance at the Technological Educational Institute of Crete, Giorgos Siligardos PHD. brought a new perspective to Wilder’s RSI when he published his excellent and well-received articles "Reverse Engineering RSI " and "Reverse Engineering RSI II " in the June 2003, and August 2003 issues of Stocks & Commodities magazine, where he described his methods of reverse engineering Wilders RSI.
Several excellent Implementations of the Reverse Wilders Relative Strength Index have been published here on Tradingview and elsewhere.
My utmost respect, and all due credits to authors of related prior works.
Introduction
It is worth noting that while the general RSI formula, and the logic dictating the UpMove and DownMove data series as described above has remained the same as the Wilders original formulation, it has been interpreted in a different way by using a different method of averaging the upward, and downward moves.
Cutler recognized the issue of data length dependency when using wilders smoothing method of calculating RSI which means that wilders standard RSI will have a potential initialization error which reduces with every new data point calculated meaning early results should be regarded as unreliable until enough calculation iterations have occurred for convergence.
Hence Cutler proposed using Simple Moving Averaging for gain and loss data which this Indicator is based on.
Having "Reverse engineered" prices for any oscillator makes the planning, and execution of strategies around that oscillator far simpler, more timely and effective.
Introducing the Reverse Cutlers RSI which consists of plotted lines on a scale of 0 to 100, and an optional infobox.
The RSI scale is divided into zones:
• Scale high (100)
• Bull critical zone (80 - 100)
• Bull control zone (62 - 80)
• Scale midline (50)
• Bear critical zone (20 - 38)
• Bear control zone (0 - 20)
• Scale low (0)
The RSI plots are:
• Cutlers RSI
• RSI MA signal line
• Test price RSI
• Alert level high
• Alert level low
The info box displays output closing price levels where Cutlers RSI value will crossover:
• Its previous value. (RSI )
• Bull critical zone.
• Bull control zone.
• Mid-Line.
• Bear control zone.
• Bear critical zone.
• RSI MA signal line
• Alert level High
• Alert level low
And also displays the resultant RSI for a user defined closing price:
• Test price RSI
The infobox outputs can be shown for the current bar close, or the next bar close.
The user can easily select which information they want in the infobox from the setttings
Importantly:
All info box price levels for the current bar are calculated immediately upon the current bar closing and a new bar opening, they will not change until the current bar closes.
All info box price levels for the next bar are projections which are continually recalculated as the current price changes, and therefore fluctuate as the current price changes.
Understanding the Relative Strength Index
At its simplest the RSI is a measure of how quickly traders are bidding the price of an asset up or down.
It does this by calculating the difference in magnitude of price gains and losses over a specific lookback period to evaluate market conditions.
The RSI is displayed as an oscillator (a line graph that can move between two extremes) and outputs a value limited between 0 and 100.
It is typically accompanied by a moving average signal line.
Traditional interpretations
Overbought and oversold:
An RSI value of 70 or above indicates that an asset is becoming overbought (overvalued condition), and may be may be ready for a trend reversal or corrective pullback in price.
An RSI value of 30 or below indicates that an asset is becoming oversold (undervalued condition), and may be may be primed for a trend reversal or corrective pullback in price.
Midline Crossovers:
When the RSI crosses above its midline (RSI > 50%) a bullish bias signal is generated. (only take long trades)
When the RSI crosses below its midline (RSI < 50%) a bearish bias signal is generated. (only take short trades)
Bullish and bearish moving average signal Line crossovers:
When the RSI line crosses above its signal line, a bullish buy signal is generated
When the RSI line crosses below its signal line, a bearish sell signal is generated.
Swing Failures and classic rejection patterns:
If the RSI makes a lower high, and then follows with a downside move below the previous low, a Top Swing Failure has occurred.
If the RSI makes a higher low, and then follows with an upside move above the previous high, a Bottom Swing Failure has occurred.
Examples of classic swing rejection patterns
Bullish swing rejection pattern:
The RSI moves into oversold zone (below 30%).
The RSI rejects back out of the oversold zone (above 30%)
The RSI forms another dip without crossing back into oversold zone.
The RSI then continues the bounce to break up above the previous high.
Bearish swing rejection pattern:
The RSI moves into overbought zone (above 70%).
The RSI rejects back out of the overbought zone (below 70%)
The RSI forms another peak without crossing back into overbought zone.
The RSI then continues to break down below the previous low.
Divergences:
A regular bullish RSI divergence is when the price makes lower lows in a downtrend and the RSI indicator makes higher lows.
A regular bearish RSI divergence is when the price makes higher highs in an uptrend and the RSI indicator makes lower highs.
A hidden bullish RSI divergence is when the price makes higher lows in an uptrend and the RSI indicator makes lower lows.
A hidden bearish RSI divergence is when the price makes lower highs in a downtrend and the RSI indicator makes higher highs.
Regular divergences can signal a reversal of the trending direction.
Hidden divergences can signal a continuation in the direction of the trend.
Chart Patterns:
RSI regularly forms classic chart patterns that may not show on the underlying price chart, such as ascending and descending triangles & wedges, double tops, bottoms and trend lines etc.
Support and Resistance:
It is very often easier to define support or resistance levels on the RSI itself rather than the price chart.
Modern interpretations in trending markets:
Modern interpretations of the RSI stress the context of the greater trend when using RSI signals such as crossovers, overbought/oversold conditions, divergences and patterns.
Constance Brown, CMT, was one of the first who promoted the idea that an oversold reading on the RSI in an uptrend is likely much higher than 30%, and that an overbought reading on the RSI during a downtrend is much lower than the 70% level.
In an uptrend or bull market, the RSI tends to remain in the 40 to 90 range, with the 40-50 zone acting as support.
During a downtrend or bear market, the RSI tends to stay between the 10 to 60 range, with the 50-60 zone acting as resistance.
For ease of executing more modern and nuanced interpretations of RSI it is very useful to break the RSI scale into bull and bear control and critical zones.
These ranges will vary depending on the RSI settings and the strength of the specific market’s underlying trend.
Limitations of the RSI
Like most technical indicators, its signals are most reliable when they conform to the long-term trend.
True trend reversal signals are rare, and can be difficult to separate from false signals.
False signals or “fake-outs”, e.g. a bullish crossover, followed by a sudden decline in price, are common.
Since the indicator displays momentum, it can stay overbought or oversold for a long time when an asset has significant sustained momentum in either direction.
Data Length Dependency when using wilders smoothing method of calculating RSI means that wilders standard RSI will have a potential initialization error which reduces with every new data point calculated meaning early results should be regarded as unreliable until calculation iterations have occurred for convergence.
Price Moving Average Ratio & PercentileIntroducing the Price Moving Average Ratio & Percentile indicator
A simple indicator which calculates :
The ratio between a chosen source price and a user defined moving average ( PMAR ) or
The percentile of the ratio between the chosen source price and a user defined moving average over an adjustable lookback period ( PMARP )
It then displays either the PMAR or PMARP as a line plot with optional user defined signal moving average.
It also plots an optional Visual Alert Level line and background signal bars.
Indicator Settings
Main Properties :
Source Price .. choice of price values or external value from another indicator ( default )
Line Plot Type .. choice between PMAR or PMARP ( default PMAR )
Price Moving Average Ratio Settings :
PMAR Length ..The time period to be used in calculating the Moving Average for the Price Moving Average Ratio and the PMAR component of the PMARP. ( default )
PMAR Type ..The type of Moving Average which creates the MA for the Price Moving Average Ratio and the PMAR component of the PMARP. ( default )
Price Moving Average Ratio Percentile Settings :
PMARP Lookback .. The lookback period to be used in calculating the Price Moving Average Ratio Percentile.
Line Plot Color Settings :
Gives a choice between a user defined solid color, and a choice of "Blue Green Red", or "Blue Red" spectrum palettes.
Signal Moving Average Settings :
Signal MA Length ..The time period to be used in calculating the Signal Moving Average for the Line Plot ( default )
Signal MA Type ..The type of Moving Average which creates the Signal Moving Average for the Line Plot ( default )
Signal Moving Average Color Settings :
Gives a choice between a user defined solid color, and a choice of "Blue Green Red", or "Blue Red" spectrum palettes.
Visual Alert Level Settings :
Alert level .. Level which activates the background signal bars ( default )
Typical Use case for the Price Moving Average Ratio
Traders and Technical Analysts will typically use the PMAR as an accumulation signal generator.
To do this....
Set a level below 1 where it has been historically profitable to accumulate the asset in question on the chosen timeframe.
Typical Use case for the Price Moving Average Ratio Percentile
Traders and Technical Analysts will look at the PMARP to judge how far away current PA is away from the defined MA based on a statistical measure of the lookback period in a percentile format.
Traders and Technical Analysts will typically use the PMAR as an accumulation signal generator.
To do this...
Set a low level where it has been historically profitable to accumulate the asset in question on the chosen timeframe.
Note : The default settings are specifically set up for use on the daily timeframe with a MA of 140 equating (approximately) to the 20 week moving average.
This is not a stand alone indicator and should be used in combination with volatility and momentum indicators for a more effective trading edge.
Bollinger Band Width PercentileIntroducing the Bollinger Band Width Percentile
Definitions :
Bollinger Band Width Percentile is derived from the Bollinger Band Width indicator.
It shows the percentage of bars over a specified lookback period that the Bollinger Band Width was less than the current Bollinger Band Width.
Bollinger Band Width is derived from the Bollinger Bands® indicator.
It quantitatively measures the width between the Upper and Lower Bands of the Bollinger Bands.
Bollinger Bands® is a volatility-based indicator.
It consists of three lines which are plotted in relation to a security's price.
The Middle Line is typically a Simple Moving Average.
The Upper and Lower Bands are typically 2 standard deviations above, and below the SMA (Middle Line).
Volatility is a statistical measure of the dispersion of returns for a given security or market index, measured by the standard deviation of logarithmic returns.
The Broad Concept :
Quoting Tradingview specifically for commonly noted limitations of the BBW indicator which I have based this indicator on....
“ Bollinger Bands Width (BBW) outputs a Percentage Difference between the Upper Band and the Lower Band.
This value is used to define the narrowness of the bands.
What needs to be understood however is that a trader cannot simply look at the BBW value and determine if the Band is truly narrow or not.
The significance of an instruments relative narrowness changes depending on the instrument or security in question.
What is considered narrow for one security may not be for another.
What is considered narrow for one security may even change within the scope of the same security depending on the timeframe.
In order to accurately gauge the significance of a narrowing of the bands, a technical analyst will need to research past BBW fluctuations and price performance to increase trading accuracy. ”
Here I present the Bollinger Band Width Percentile as a refinement of the BBW to somewhat overcome the limitations cited above.
Much of the work researching past BBW fluctuations, and making relative comparisons is done naturally by calculating the Bollinger Band Width Percentile.
This calculation also means that it can be read in a similar fashion across assets, greatly simplifying the interpretation of it.
Plotted Components of the Bollinger Band Width Percentile indicator :
Scale High
Mid Line
Scale Low
BBWP plot
Moving Average 1
Moving Average 2
Extreme High Alert
Extreme Low Alert
Bollinger Band Width Percentile Properties:
BBWP Length
The time period to be used in calculating the Moving average which creates the Basis for the BBW component of the BBWP.
Basis Type
The type of moving average to be used as the Basis for the BBW component of the BBWP.
BBWP Lookback
The lookback period to be used in calculating the BBWP itself.
BBWP Plot settings
The BBWP plot settings give a choice between a user defined solid color, and a choice of "Blue Green Red", or "Blue Red" spectrum palettes.
Moving Averages
Has 2 Optional User definable and adjustable moving averages of the BBWP.
Visual Alerts
Optional User adjustable High and low Signal columns.
How to read the BBWP :
A BBWP read of 95 % ... means that the current BBW level is greater than 95% of the lookback period.
A BBWP read of 5 % .... means that the current BBW level is lower than 95% of the lookback period.
Proposed interpretations :
When the BBWP gets above 90 % and particularly when it hits 100% ... this can be a signal that volatility is reaching a maximum and that a macro High or Low is about to be set.
When the BBWP gets below 10 % and particularly when it hits 0% ...... this can be a signal that volatility is reaching a minimum and that there could be a violent range breakout into a trending move.
When the BBWP hits a low level < 5 % and then gets above its moving average ...... this can be an early signal that a consolidation phase is ending and a trending move is beginning.
When the BBWP hits a high level > 95 % and then falls below its moving average ... this can be an early signal that a trending move is ending and a consolidation phase is beginning.
Essential knowledge :
The BBWP was designed with the daily timeframe in mind, but technical analysists may find use for it on other time frames also.
High and Low BBWP readings do not entail any direction bias.
Deeper Concepts :
In finance, “mean reversion” is the assumption that a financial instrument's price will tend to move towards the average price over time.
If we apply that same logic to volatility as represented here by the Bollinger band width percentile, the assumption is that the Bollinger band width percentile will tend to contract from extreme highs, and expand from extreme lows over time corresponding to repeated phases of contraction and expansion of volatility.
It is clear that for most assets there are periods of directional trending behavior followed by periods of “consolidation” ( trading sideways in a range ).
This often ends with a tightening range under reducing volume and volatility ( popularly known as “the squeeze” ).
The squeeze typically ends with a “breakout” from the range characterized by a rapid increase in volume, and volatility when price action again trends directionally, and the cycle repeats.
Typical Use Cases :
The Bollinger Band Width Percentile may be especially useful for Options traders, as it can provide a bias for when Options are relatively expensive, or inexpensive from a Volatility (Vega) perspective.
When the Bollinger Band Width Percentile is relatively high ( 85 percentile or above ) it may be more advantageous to be a net seller of Vega.
When the Bollinger Band Width Percentile is relatively low ( 15 percentile or below ) it may be advantageous to be net long Vega.
Here we examine a number of actionable signals on BTCUSD daily timeframe using the BBWP and a momentum oscillator ( using the TSI here but can equally be used with Bollinger bands, moving averages, or the traders preferred momentum oscillator ).
In this first case we will examine how a spot trader and an options trader could each use a low BBWP read to alert them to a good potential trade setup.
note: using a period of 30 for both the Bollinger bands and the BBWP period ( approximately a month ) and a BBWP lookback of 350 ( approximately a year )
As we see the Bollinger Bands have gradually contracted while price action trended down and the BBWP also fell consistently while below its moving average ( denoting falling volatility ) down to an extremely low level <5% until it broke above its moving average along with a break of range to the upside ( signaling the end of the consolidation at a low level and the beginning of a new trending move to the upside with expanding volatility).
In this next case we will continue to follow the price action presuming that the traders have taken or locked in profit at reasonable take profit levels from the previous trade setup.
Here we see the contraction of the Bollinger bands, and the BBWP alongside price action breaking below the BB Basis giving a warning that the trending move to the upside is likely over.
We then see the BBWP rising and getting above its moving average while price action fails to get above the BB Basis, likewise the TSI fails to get above its signal line and actually crosses below its zeroline.
The trader would normally take this as a signal that the next trending move could be to the downside.
The next trending move turns out to be a dramatic downside move which causes the BBWP to hit 100% signaling that volatility is likely to hit a maximum giving good opportunities for profitable trades to the skilled trader as outlined.
Limitations :
Here we will look at 2 cases where blindly taking BBWP signals could cause the trader to take a failed trade.
In this first example we will look at blindly taking a low volatility options trade
Low Volatility and corresponding low BBWP levels do not automatically mean there has to be expansion immediately, these periods of extreme low volatility can go on for quite some time.
In this second example we will look at blindly taking a high volatility spot short trade
High volatility and corresponding high BBWP levels do not automatically mean there has to be a macro high and contraction of volatility immediately, these periods of extreme high volatility can also go on for quite some time, hence the famous saying "The trend is your friend until the end of the trend" and lesser well known, but equally valid saying "never try to short the top of a parabolic blow off top"
Markets are variable and past performance is no guarantee of future results, this is not financial advice, I am not a financial advisor.
Final thoughts
The BBWP is an improvement over the BBW in my opinion, and is a novel, and useful addition to a Technical Analysts toolkit.
It is not a standalone indicator and is meant to be used in conjunction with other tools for direction bias, and Good Risk Management to base sound trades off.
John Bollinger has suggested using Bolliger bands, and its related indicators with two or three other non-correlated indicators that provide more direct market signals.
He believes it is crucial to use indicators based on different types of data.
Some of his favored technical techniques are moving average divergence/convergence (MACD), on-balance volume and relative strength index (RSI).
Thanks
Massive respect to John Bollinger, long-time technician of the markets, and legendary creator of both the Bollinger Bands® in the 1980´s, and the Bollinger band Width indicator in 2010 which this indicator is based on.
His work continues to inspire, decades after he brought the original Bollinger Bands to the market.
Much respect also to Eric Crown who gave me the fundamental knowledge of Technical Analysis, and Options trading.
Bollinger Band Calculation ToolIntroducing the Bollinger Band Calculation Tool
What are Bollinger Bands ?
According to Investopedia ....
"In the 1980s, John Bollinger, a long-time technician of the markets, developed the technique of using a moving average with two trading bands above and below it.
Unlike a percentage calculation from a normal moving average, Bollinger Bands® simply add and subtract a standard deviation calculation.
Standard deviation is a mathematical formula that measures volatility, showing how the stock price can vary from its true value.
By measuring price volatility, Bollinger Bands® adjust themselves to market conditions.
This is what makes them so handy for traders; they can find almost all of the price data needed between the two bands."
Classic interpretations of Bollinger bands from Fidelity Investments....
"When the bands tighten during a period of low volatility, it raises the likelihood of a sharp price move in either direction.
This may begin a trending move. Watch out for a false move in opposite direction which reverses before the proper trend begins.
When the bands separate by an unusual large amount, volatility increases and any existing trend may be ending.
Prices have a tendency to bounce within the bands' envelope, touching one band then moving to the other band.
You can use these swings to help identify potential profit targets.
For example, if a price bounces off the lower band and then crosses above the moving average, the upper band then becomes the profit target.
Price can exceed or hug a band envelope for prolonged periods during strong trends.
On divergence with a momentum oscillator, you may want to do additional research to determine if taking additional profits is appropriate for you.
A strong trend continuation can be expected when the price moves out of the bands.
However, if prices move immediately back inside the band, then the suggested strength is negated."
This indicator contains a standard set of Bollinger Bands with the addition of a Test Closing Price calculation function.
It displays a standard set of Bollinger Bands by default.
How do I use the Test Closing Price function ?
Enter a test price in the Test Closing Price box in the settings, and then click the "Use Test Price" button.
The indicator will then replace the current Bollinger upper, lower and basis-lines with plots showing the resultant lines if price were to close at the Test Closing Price.
An information panel will appear which displays the test closing price and the resulting Bollinger-upper, Bollinger-lower and basis-line prices.
Can display up to 10 decimal places and has adjustable label offset.
It will also plot lines outlining the resultant closed candle body for clarity.
To return to "Standard Bollingers" just click off the "Use Test Price" button.
Knowing exactly what the Bollinger bands and Basis will do if a particular closing price is met can be useful in a variety of ways to traders who use Bollinger Bands® in their trading.
It is possible to work out exactly what closing price is required to get above or below a Bollinger band which is normally difficult as Bollingers react to the change in price.
Users can also experiment with different Test Closing Prices [/i to see exactly what effect this would have on the Basis moving average and on the Bollinger bands themselves.
Reverse Stochastic Momentum Index On ChartIntroducing the Reverse Stochastic Momentum Index "On Chart" version
According to Investopedia :
“The Stochastic Momentum Index (SMI) is a more refined version of the stochastic oscillator, employing a wider range of values and having a higher sensitivity to closing prices.”
The SMI is considered a refinement of the stochastic oscillator developed by William Blau and introduced in 1993 in an attempt to provide a more reliable indicator, less subject to false swings.
It calculates the distance of the current closing price as it relates to the median of the high/low range of price.
The SMI has a normal range of values between +100 and -100.
When the present closing price is higher than the median, or midpoint value of the high/low range, the resulting value is positive.
When the current closing price is lower than that of the midpoint of the high/low range, the SMI has a negative value.
Here I have reverse engineered the SMI formula to derive 2 functions.
One function calculates the chart price at which the SMI will reach a particular SMI scale value.
The second function calculates the chart price at which the SMI will crossover its signal line.
I have employed those functions here to give the "crossover" price levels for :
Upper alert level ( default 40, color : aqua blue )
Mid-Line ( default value 0, color : white )
Lower alert level ( default -40, color : purple )
Signal line ( default 13, colors : bright red & lime green )
And also to give the SMI eq price ( colors : red & green )
The midline, upper and lower alert levels return the closing price which would make SMI equal to their respective values
The user can infer from this that.....
Closing above these prices will cause the Stochastic Momentum Index to cross above the associated levels
Closing below these prices will cause the Stochastic Momentum Index to cross below the associated levels
Signal line returns the closing price where Stochastic Momentum Index is equal to its signal line
The user can infer from this that.....
Closing above this price will cause the Stochastic Momentum Index to cross above the signal line
Closing below this price will cause the Stochastic Momentum Index to cross below the signal line
SMI eq price returns the closing price which would make the SMI equal to its previous value
The user can infer from this that.....
Closing above this price will cause the Stochastic Momentum Index to increase
Closing below this price will cause the Stochastic Momentum Index to decrease
Note : all returned prices have a returned value filter to replace any values below zero with zero to help prevent auto focus issues.
These levels are displayed as plotted lines on the chart and also as an optional infobox with choice of displayed info.
This allows the user to see directly on the chart the interplay between the various crossover levels and price action and to precisely plan entries, exits and stops for their SMI based trades.
Traditionally traders and analysts will consider:
Positives values above 40 indicate a bullish trend
Negative values below -40 indicate a bearish trend .
Common traditional ways to derive signals from the SMI :
When the SMI crosses below -40 and then moves back above it, a buy signal is generated.
When the SMI crosses above +40 and then moves back below it, a sell signal is generated.
When the SMI line crosses above the signal line. A signal to buy is generated
When the SMI line crosses below the signal line signal to sell is generated.
When the SMI crosses above the zeroline, signal line and the SMI eq level many interpret that as a full bullish bias signal and take trades only in that direction, vice versa for bearish bias.
Traders also look for divergences between the SMI and price action.
The SMI is often used in conjunction with the Chande Momentum Oscillator or R squared indicator to determine overall market trendiness where the SMI is used to determine the direction of the trend, and also with volume indicators to show if the momentum carries significant selling or buying pressure.
CT Reverse MACD CrossIntroducing the Reverse MACD Cross
MACD.... short for moving average convergence/divergence, is a trading indicator used in technical analysis of stock prices, created by Gerald Appel in the late 1970s.
It is designed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock's price.
Prior work by Johny Dough showed how we can compute the price level required to make the MACD stay at its current level,
and also how to compute the price level required for the MACD to cross the zero line.
I have brought that idea to it logical conclusion for the MACD by creating a new function which also computes the price level required to cross the MACD with its signal line.
This allows the user to quickly see all of the most relevant information from the MACD and the actual price levels where the indicator will change its posture.
The MACD indicator (or "oscillator") is a collection of three time series calculated from historical price data, most often the closing price.
These three series are:
the MACD series proper shown here in blue
the "Signal Line" or "average" series shown here in red
the "Divergence" series which is the difference between the two shown here as a histogram.
There is also usually a baseline set at zero.
The MACD series is the difference between a "fast" (short period) exponential moving average (EMA), and a "slow" (longer period) EMA of the price series.
The average series (signal line) is an EMA of the MACD series itself.
The MACD indicator thus depends on three parameters, namely the time periods of the three EMAs.
The notation "MACD ( a, b, c )" usually denotes the standard indicator where the MACD series is the difference of EMAs with characteristic times a and b, and the average series is an EMA of the MACD series with characteristic time c.
There is an infobox which displays...
Whether the MACD is falling or rising
the price level which will make the MACD to change from rising to falling or vice versa
the price level which will cause the MACD to cross the signal line
the price level which will cause the MACD to cross the zero line
The most commonly used values are 12 for the fast, 26 for the slow, and 9 for the signal line, that is, MACD ( 12, 26, 9 ) .
The MACD and average series are customarily displayed as continuous lines in a plot whose horizontal axis is time oscillating above and below a zero line, whereas the divergence is commonly shown as a bar graph / histogram.
A fast EMA responds more quickly than a slow EMA to recent changes in a stock's price.
By comparing EMAs of different periods, the MACD series can indicate changes in the trend of a stock.
It is claimed that the divergence series can reveal subtle shifts in the stock's trend.
Since the MACD is based on moving averages, it is a lagging indicator. As a future metric of price trends, the MACD is less useful for stocks that are not trending (trading in a range) or are trading with unpredictable price action.
Krown Moving Averages & Crossover LevelsIntroducing Krown Moving Averages with Crossover levels.
This indicator
Plots 5 Ema's and 3 SMA's ( Default Krown Periods )
It calculates the price levels at which each pair of moving averages would be equal .
That means that if price closes the other side of that level the pair of moving will cross also.
These levels can therefore be considered as " crossover levels....( the price level where each pair of moving averages will cross)
It can give crossover levels for
SMA crossing SMA
EMA crossing EMA
EMA crossing SMA
Plots optional Labels for all crossover levels....(off by default needs to be turned on in the settings)
Plots optional crossover levels as lines and dots colored as the 2 colors of the pair of moving averages.....(off by default needs to be turned on in the settings)
This indicator is aimed at traders who use simple and exponential moving average crossovers as part of their trading plan or edge.
It takes the guesswork out of knowing at what price level a pair of moving averages will cross which helps to improve entries and risk management.
There is an optional "Cutoff" function and user adjustable "limit factor" which cuts the plots off once they are too far below or above the current price to prevent chart auto focus issues.
There is a decimal place truncation option to set the decimal places depending on the asset type and price accuracy required.
Inspired by a request from a community member after one of my recent reverse engineered indicator publications.
I am publishing this open source in the hopes that some newer coders will find the functions interesting and useful.
Anticipated Simple Moving Average Crossover IndicatorIntroducing the Anticipated Simple Moving Average Crossover Indicator
This is my Pinescript implementation of the Anticipated Simple Moving Average Crossover Indicator
Much respect to the original creator of this idea Dimitris Tsokakis
This indicator removes one bar of lag from simple moving average crossover signals with a high degree of accuracy to give a slight but very real edge.
Moving Averages
A moving average simplifies price data by smoothing it out by averaging closing prices and creating one flowing line which makes seeing the trend easier.
Moving averages can work well in strong trending conditions, but poorly in choppy or ranging conditions.
Adjusting the time frame can remedy this problem temporarily, although at some point, these issues are likely to occur regardless of the time frame chosen for the moving average(s).
While Exponential moving averages react quicker to price changes than simple moving averages. In some cases, this may be good, and in others, it may cause false signals.
Moving averages with a shorter look back period (20 days, for example) will also respond quicker to price changes than an average with a longer look back period (200 days).
Trading Strategies — Moving Average Crossovers
Moving average crossovers are a popular strategy for both entries and exits. MAs can also highlight areas of potential support or resistance.
The first type is a price crossover, which is when the price crosses above or below a moving average to signal a potential change in trend.
Another strategy is to apply two moving averages to a chart: one longer and one shorter.
When the shorter-term MA crosses above the longer-term MA, it's a buy signal, as it indicates that the trend is shifting up. This is known as a "golden cross."
Meanwhile, when the shorter-term MA crosses below the longer-term MA, it's a sell signal, as it indicates that the trend is shifting down. This is known as a "dead/death cross."
MA and MA Cross Strategy Disadvantages
Moving averages are calculated based on historical data, and while this may appear predictive nothing about the calculation is predictive in nature.
Moving averages are always based on historical data and simply show the average price over a certain time period.
Therefore, results using moving averages can be quite random.
At times, the market seems to respect MA support/resistance and trade signals, and at other times, it shows these indicators no respect.
One major problem is that, if the price action becomes choppy, the price may swing back and forth, generating multiple trend reversal or trade signals.
When this occurs, it's best to step aside or utilize another indicator to help clarify the trend.
The same thing can occur with MA crossovers when the MAs get "tangled up" for a period of time during periods of consolidation, triggering multiple losing trades.
Ensure you use a robust risk management system to avoid getting "Chopped Up" or "Whip Sawed" during these periods.
[CM]EMA Trend Cross STRATVISUALLY REPRESENTS THE CROSSING OF 8,13,21,55 EMA'S FROM KROWNS TA PROGRAM
Hello everybody! I was curious and wanted to see how the Strat described in one of the modules would look coded. So here we are, a clear cut visual representation of the methods talked about in the course from the EMA Module. Enjoy!
(Instructions)
Whenever the 8,13,21 all cross above the 55ema that constitutes a long signal.
On the flip side, whenever the 8,13,21 all cross below the 55ema that constitutes a short signal.
(Description)
This indicator shows the cross described in the TA program using the EMAS 8,13,21,55.
The Ema's are editable.(Color)
It plots the entry and exit parameters.
This allows for a more visual representation of the ideology described in the course.
This indicator also doesn't leave room for ambiguity in terms of where a cross happens.
The EMA's can be toggled to show certain ones at certain times.
The indicator can be used as a trend analysis tool.
***In terms of an exit, I find it to be better to use your own judgement, taking account the greater trend.
For example, in a bull market I would advise looking for long signals, rather than try to hop on a counter trend play. Vice Versa in a bear market. It's better for jumping in to the greater momentum.