RicardoSantos

[RS]Volatility Explosive Measure V0

EXPERIMENTAL:
Measures the volatility range of current price range, can help detect squeezes as well explosive moves
오픈 소스 스크립트

이 스크립트의 오써는 참된 트레이딩뷰의 스피릿으로 이 스크립트를 오픈소스로 퍼블리쉬하여 트레이더들로 하여금 이해 및 검증할 수 있도록 하였습니다. 오써를 응원합니다! 스크립트를 무료로 쓸 수 있지만, 다른 퍼블리케이션에서 이 코드를 재사용하는 것은 하우스룰을 따릅니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

면책사항

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

차트에 이 스크립트를 사용하시겠습니까?
//@version=2
study(title='[RS]Volatility Explosive Measure V0')
f_bullish_sequence()=>
    _output = 0
    _range = close - open
    _doji = _range == 0
    _up_bar = _range > 0 or _doji and _range[1] > 0
    _counter = barssince(not _up_bar)
    if (_up_bar)
        for _i = 0 to max(0, _counter - 1)
            _output := _output + _range[_i]
    _output

f_bearish_sequence()=>
    _output = 0
    _range = close - open
    _doji = _range == 0
    _up_bar = _range < 0 or _doji and _range[1] < 0
    _counter = barssince(not _up_bar)
    if (_up_bar)
        for _i = 0 to max(0, _counter - 1)
            _output := _output + _range[_i]
    _output

bull_seq = f_bullish_sequence()
bear_seq = f_bearish_sequence()

length = input(10)
bull_ma = ema(bull_seq, length)
bear_ma = ema(bear_seq, length)
width = bull_ma - bear_ma

plot(width, color=color(black, 0), style=area)
// plot(bull_seq, color=color(lime, 0), style=columns)
// plot(bear_seq, color=color(red, 0), style=columns)
// plot(bull_ma, color=color(purple, 25), style=area)
// plot(bear_ma, color=color(purple, 25), style=area)