ProfitProgrammers

Volatility Bands

We used Marc Chaikin’s Chaikin Volatility as somewhat of a baseline for this indicator and then built on it. Like Chaikin Volatility, our indicator draws primarily upon high-low spreads to quantify a security’s volatility. It also has similarities to Keltner Channels as it uses ATR rather than standard deviations in its calculation of the different bands.

Inputs:
int ‘len0’, lookback window for fast EMA of high-low ranges.
int ‘len1’, lookback window for slow EMA of high-low ranges.
int ‘len2’, lookback window for slow EMA of closing prices.
float ‘m0’, ATR multiplier for first upper and lower volatility bands.
float ‘m1’, ATR multiplier for second upper and lower volatility bands.
float ‘m2’, ATR multiplier for third upper and lower volatility bands.
int ‘lenATR’, window length for ATR calculation.

Output: 3 Upper and Lower Volatility Bands (6 total).
1. Compute High Low Spread for current period.
hlr = (high – low)

2. Calculate Exponential Moving Average of HLR at length len0
fastEMA = ema(hlr, len0)

3. Calculate Exponential Moving average of HLR at length len1 (where len1 > len0)
slowEMA = ema(hlr, len1)

4. Get EMA of closing prices at length len2(where len2 > len1 and len1 > len0)
priceEMA = ema(close, len2)

5. Use adjusted Chaikin Volatility Formula to quantify volatility
v = (fastEMA – slowEMA) / slowEMA

6. Calculate three upper and three lower volatility bands (6 total):
ex:
upper0 = priceEMA + ((1 – cv) * (atrMult0 * atr(lenATR)))
lower0 = priceEMA – ((1 – cv) * (atrMult0 * atr(lenATR)))


One possible way to use this indicator is to enter a long position when the security’s price falls below the lowest volatility band and then exit when it crosses above the third upper band. This seems to get the best results for quick, high frequency trading. Another approach is to enter a position when the bands begin to break out from a compact state and the width between them increases.

Still tweaking the idea, so any feedback would be appreciated.

-Profit Programmers
www.profitprogrammer.com
보호된 스크립트입니다
이 스크립트는 클로즈 소스로 게시되며 자유롭게 사용할 수 있습니다. 당신은 스크립트를 차트에 사용하기 위해 그것을 즐겨찾기 할 수 있습니다. 소스 코드는 보거나 수정할 수 없습니다.
면책사항

이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.

차트에 이 스크립트를 사용하시겠습니까?