QuantNomad

High/Low Volume

In this indicator, I show you a better way to define high/low values of volume (or any other indicator).

Quite often, I get requests from my clients that an indicator level should be “high” or that it should be above a certain absolute level.
The first request is hard to interpret mathematically, but traders can easily spot it on the chart. The second one is not flexible, and it might not make sense in another market regime.

To solve that, you can compute dynamic high/low levels that represent unexpected extreme values that are adaptable to recent conditions.
There are two pretty simple methods I’m using quite often in my scripts percentiles and sigma (standard deviations).

Percentile looks back at X bars and computes the value under which a certain % of data points are located. So, for example, if we’re computing 90%tile and we’re looking at 100 bars, we’ll get a value under which we have values of precisely 90 bars for this indicator. It’s a good idea to use something like 5%tile for low level and 95%tile for high level.

Sigma(σ) is related to standard deviation. If we assume that our data is normally distributed, then 68% of data points should be in the range of mean +-1σ, 95% → mean +-2σ. So we can assume that something above 2σ is a pretty rare and extreme event.

In this script, I give you an example of how to compute both on volume, but you can easily change this to another indicator.

The issue with volume is that it’s not normally distributed, and your low level will be quite often too low to detect any low levels. Ideally, we have to use a more sophisticated formula that fits volume distribution better.

In this indicator, you can set the following parameters:

  • Choose type: Percentile or Sigma
  • Lookback Period
  • High/Low Percentiles
  • Sigmas #

You can also receive alerts for high/low volume events.

Disclaimer
Please remember that past performance may not indicate future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.

My First Live Course: qntly.com/101
Pine Programming v5: qntly.com/pineprog
Adv.Pine Use-Cases: qntly.com/advpine

Hire Me: qntly.com/hirepine
Telegram: qntly.com/tel
Open-source Skript

Ganz im Spirit von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es besser verstehen und überprüfen können. Herzlichen Glückwunsch an den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Veröffentlichung unterliegt den Hausregeln. Sie können es als Favoriten auswählen, um es in einem Chart zu verwenden.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.

Möchten Sie dieses Skript auf einem Chart verwenden?