TradingView
sabricat
13 Des 2022 pukul 03.48

[-_-] Volatility Calibrated ATR 

Bitcoin / TetherUSBinance

Deskripsi

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

Catatan Rilis

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 [19 Aug 2023]: fixed the "invalid value of the length argument (0) in the wma function" error by making sure that length cannot be less than 1

Catatan Rilis

Release notes:
- v1.2 : fixed the title in plotshape() functions to match the correct conditions (as was pointed out by /u/markmiotke)
Komentar
PuterNerd
I love this indicator, thank you for making it open source 🦾🦾🦾
markmiotke
On the plotshape you have down associated with the title Uptrend begins, and on the alertcondition you have down associated with Downtrend begins. I used an arrow for the plotshape instead of a square and it was pointing in the opposite direction of what I expected. Choosing the arrow pointing in the opposite direction is my fix for now.
sabricat
@markmiotke, Hi. Indeed you're right, thank you for pointing that out. I've updated the script.
deltannihilation
hey im trying to replicate bitmexstorms indi any tips ?
this is what i have so far
//@version=4

study("im bored", overlay=true)
src= input(hl2)
atr_len = input(10)
std_dev_len = input(18)
mult = input(1.1)
normal_ma_len = input(106)
enable_ha = input(false)
times_two_or_sum = input(true)

ha_t = heikinashi(syminfo.tickerid)
ha_open = security(ha_t, timeframe.period, open)
ha_high = security(ha_t, timeframe.period, high)
ha_hl2= security(ha_t, timeframe.period, hl2)
ha_low = security(ha_t, timeframe.period, low)
ha_close = security(ha_t, timeframe.period, close)

true_ha = na(ha_high[1])? ha_high-ha_low : max(max(ha_high - ha_low, abs(ha_high - ha_close[1])), abs(ha_low - ha_close[1]))

ult_tr = enable_ha ? true_ha : tr

double_tr = times_two_or_sum ? ult_tr*2 : ult_tr+ult_tr[1]

dev_stop_rma = mult*stdev(double_tr,std_dev_len) + rma(double_tr, atr_len)

ma_1 = rma(ha_close, normal_ma_len)
mixed_signal_1 = ((src - dev_stop_rma) + ma_1)/2

plot(mixed_signal_1)
sportoman
Hi, friend! Thanks for your hard work! I looked at the indicator code above and I want to say that it is different from the latest version? Is it possible to get the latest version of your indicator open source! I would really like to make its analogue for MT4. Thank you.
hadi5153
Hi , the indicator not work properly in time frame of 30 min , 1hr an upper time frames for example it is not ok in symbol of AERGOBUSD ,lease check it out kindly, thanks
JackHertz
So wanted to try this indicator! Getting study error though! Request you to kindly check. Thank you.
sabricat
@JackHertz, Hi, please let me know on what symbol and timeframe you tried to use the indicator, as well as the parameters you set?
alphaXiom
@-_-, "Study Error on bar 4998 : Invalid value of the 'length' argument (0) in the 'wma' function. It must be > 0". Apple on Nasdaq Daily, default params. The same error appears on almost any ticker on higher timeframes, for 4H up. Its beating me.
Lebih lanjut