sabricat

[-_-] Volatility Calibrated ATR

sabricat Uppdaterad   
Description:
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
Versionsinformation:
Description:
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

Release notes:
- v1.1 : fixed the "invalid value of the length argument (0) in the wma function" error by making sure that length cannot be less than 1
Versionsinformation:
Release notes:
- v1.2 : fixed the title in plotshape() functions to match the correct conditions (as was pointed out by /u/markmiotke)
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?