- 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
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 with length = 200.
VHMA with length = 25 used as input for the with length = 14.
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 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 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
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 ^^/
« Je prendrai l’essor et je m’envolerai vers la mer.
« Je connaîtrai le goût des brises du large. J’entendrai les grands cris de la tempête.