[-_-] Volatility Calibrated ATRDescription:
An indicator based on ATR adjusted for volatility of the market. It uses Heikin Ashi data to find short and long opportunities and displays a dynamic stop loss level. Additionally, it has alerts for when the trend changes (which is an entry signal).
How it works:
It works by dynamically calculating the Period for ATR which depends on current volatility level that is calculated by a function that uses Standard Deviation of price. ATR is then smoothed by Weighted Moving Average and multiplied by ATR Factor, resulting in a plot that changes its colour to red when we're in a downtrend and green when in an uptrend. This plot should be used as a dynamic Stop Loss level. Trend change is determined by price crossing the dynamic Stop Loss level. The squared red and green labels appear when the trend changes, and should be used as Entry signals.
Parameters:
- Source -> data used for calculations
- ATR Factor -> higher values produce less noise and longer trends, lower values give more signals
Adjusted
ln(close/20 sma) adjusted for time (BTC)(This indicator was designed for the BTC index chart)
Designed for Bitcoin. Plots the log of the close/20W SMA with a linear offset m*t, where m is the gradient I've chosen and t is the candle index. Anything above 1 is a mania phase/market cycle top. If it peaks around 0.92 and rolls over, it could be a local/market cycle top.
This will obviously not work at all in the long term as Bitcoin will not continue following the trend line on the log plot (you can even see it start to deviate in the Jan-Feb 2021 peaks where the indicator went to 1.15).
It identifies the 2011, 2013 (both of them), 2017 tops as being just above 1. It also identifies the 2019 local peak and 2021 market cycle top at ~0.94.
Feel free to change the gradient or even add a function to curve the straight line eventually. I made this for fun, feel free to use it as you wish.
SPX Excess CAPE YieldHere we are looking at the Excess CAPE yield for the SPX500 over the last 100+ years
"A higher CAPE meant a lower subsequent 10-year return, and vice versa. The R-squared was a phenomenally high 0.9 — the CAPE on its own was enough to explain 90% of stocks’ subsequent performance over a decade. The standard deviation was 1.37% — in other words, two-thirds of the time the prediction was within 1.37 percentage points of the eventual outcome: this over a quarter-century that included an equity bubble, a credit bubble, two epic bear markets, and a decade-long bull market."
assets.bwbx.io
In December of 2020 Dr. Robert Shiller the Yale Nobel Laurate suggested that an improvement on CAPE could be made by taking its inverse (the CAPE earnings yield) and subtracting the us10 year treasury yield.
"His model plainly suggests that stocks will do badly over the next 10 years, and that bonds will do even worse. This was the way Shiller put it in a research piece for Barclays Plc in October, (which can be found on SSRN Below):
In summary, investors expect a certain return in equities as compensation for investing in a riskier asset class, and as interest rates have declined, the relative expected return for equities has increased dramatically. We believe this may quantitatively help to explain investors current preference for equities over bonds, and as such the quick recoveries we are observing (with the exception of the UK), whilst still in the midst of a pandemic. In the US in particular, we are once again observing stretched valuations and high CAPE ratios compared to history."
Sources:
papers.ssrn.com
www.bloomberg.com
The standard trading view disclaimer applies to this post -- please consult your own investment advisor before making investment decisions. This post is for observation only and has no warranty etc. www.tradingview.com
Best,
JM
Moving Average Weighted, Volume AdjustedVAWMA = VWMA and WMA combined.
Simply put, this attempts to determine the average price per share over time, weighted heavier for recent values.
Uses triangular algorithm to taper off values in the past (same as WMA does).
Why use this?
Let's say the earliest bar of the VWMA has a huge amount of volume. That means that when the next bar arrives, there will be an abrupt change in the moving average that doesn't represent the current value properly. VAWMA eliminates this problem by triangular weighting each bar.
VAMA Volume Adjusted Moving Average FunctionThis indicator is a live analysis adaptation of Richard Arms' Volume Adjusted Moving Average coded as a single function. VAMA utilizes a period length that is based on volume increments rather than time. Settings are provided for using as a pair of fast and slow moving averages.
• SampleN - N volume bars used as sample to calculate average volume , 0 equals all bars.
• VAMA Source - Price used for volume weighted calculations.
• VAMA Length - Specified number of volume ratio buckets to be reached.
• VAMA VI Fct - Size of volume ratio buckets.
• VAMA Strict - Must meet desired volume requirements, even if number of bars has to exceed VAMA Length to do it.
Please see previous published example here for more details on VAMA's usage and inability to redraw the past on time based charts.
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!
VAMA Volume Adjusted Moving AverageRichard Arms' Volume Adjusted Moving Average
Settings:
• Inp Avg Vol: Input - Purist method but not intended for live analysis, to retroactively alter MA curve enter Avg Vol from value shown on label into Use Avg Vol field.
• Inp Avg Vol: Current - Live method using current volume , to retroactively alter past MA curve toggle any setting back and forth to force recalculation.
• Inp Avg Vol: Subset - Similar to Current, but uses a subset rather than all bars for avg vol.
• Use Avg Vol - Used for Inp Avg Vol: Input mode. Enter volume from Avg Vol label here after each new bar closes, label will turn green, else red.
• Subset Data - Lookback length used for Inp Avg Vol: Subset mode.
• VAMA Length - Specified number of volume ratio buckets to be reached.
• Volume Incr - Size of volume ratio buckets.
• VAMA Source - Price used for volume weighted calculations.
• VAMA Strict - Must meet desired volume requirements, even if N bars has to exceed VAMA Length to do it.
• Show Avg Vol Label - Displays label on chart of total chart volume.
Notes: VAMA was created by Richard Arms. It utilizes a period length that is based on volume increments rather than time. It is an unusual indicator in that it cannot be used in some platforms in realtime mode as Arms had originally intended. VAMA requires that the average volume first be calculated for the entire chart duration, then that average volume is used to derive the variable adaptive length of the moving average. The consequence of this is that with each new bar, the new average volume alters the moving average period for the entire history. Since Pine scripts evaluate all historical bars only once upon initial script execution, there is no way to automatically shift the previous moving average values retroactively once a new bar has formed. Thus the historical plot of the moving average cannot be updated in realtime, but instead can only plot through previous bar that existed upon load or reinitialization through changing some setting.
Setting Use Avg Vol to Input mode the average volume through previous bar shown in label can be entered (input) into the Inp Avg Vol setting after each new bar closes. Entering this total chart volume forces the script to reevaluate historical bars which in turn allows the historical moving average to update the plot. When using Input mode the color of the label is green when Inp Avg Vol value matches current label value, the label color red signifies Inp Avg Vol value has not been entered or is stale.
Setting Use Avg Vol to Current mode allows the script to correctly calculate and plot the correct moving average upon initial load and the realtime moving average moving forward, but can not retroactively alter the plot of the past moving average unless some change is made in the script settings, such as toggling the Use Avg Vol from Current to some other choice and then back to Current .
Setting Use Avg Vol to Subset mode uses a rolling window of volume data to calculate the average volume and can be used in realtime, but should be noted it is a deviation from Richard Arms' original specification.
VAMA info: "Trading Without Fear" by Richard W Arms, Jr, www.fidelity.com
NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have read and understood that this is for research purposes only and I am not responsible for any financial losses you may incur by using this script!