alexgrover

Vertical Horizontal Moving Average [AneoPsy & alexgrover]

Moving average adapting to the strength of the trend, this is made possible by using the square of the vertical-horizontal filter as a smoothing factor. Alerts are included with two different types of conditions available to the user.

Settings

  • Length : Period of the moving average
  • Src : Input data for the indicator
  • Alerts : Types of conditions to be used in the alerts, when set to "VHMA Direction Change" alerts are triggered once the VHMA is either rising or declining, else the alerts are based on the crosses between Src and the VHMA

Usage

The VHMA can be used as a fast or slow-moving average in a moving average crossover system, or as input for other indicators.


VHMA of with length = 25 and sma with length = 200.


VHMA with length = 25 used as input for the RSI with length = 14.

Details

The vertical-horizontal filter is a measure of the strength of the trend and lay in a (0,1) range, to calculate it you just need to divide the rolling range over with the rolling sum of the absolute price changes, squaring the result allow to get lower results with higher values of length.


Squared vertical horizontal filter with length = 50, the value is low when the market is ranging and high when trending.

To set the alerts go in the alert panel, click on create alert, and select VHMA in "condition", choose between the buy or sell alert. If Src = closing price or another indicator dependant on the closing price select in options "once per bar close", if the indicator using the opening or lagged closing prices values as input select "One per bar" instead.

Thanks

Thanks to AneoPsy for adding the color change, the idea to use two kinds of conditions for the alert, and for its feedback, you can follow him

www.tradingview.com/u/AneoPsy/

and finally thanks to you for reading and for your support, only one last script left for the month, then we'll start July with some pretty interesting indicators, I hope you'll like them ^^/


Check out the indicators we are making at luxalgo: www.tradingview.com/u/LuxAlgo/
오픈 소스 스크립트

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

면책사항

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

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