jhmnk89

Histogram-based price zones

This indicator provides a new approach to creating price zones that can be used as support and resistance. The approach does not use pivot points or Fibonacci levels. Instead, it uses the frequency of occurence of local maxima and minima to determine zones of interest where price often changed direction.

The algorithm is as follows:
- Gather price data from the last Lookback trading periods
- Calculate rolling minima and rolling maxima along the price points with window size Window size
- Build a histogram from the rolling extrema which are binned into different zones. The number of bins and therefore the width of a zone can be adjusted with the parameter Zone width factor
- Select only the top fullest bins. The number of bins selected for plotting can be controlled with Zone multiplier

The result are a number of boxes that appear on the chart which mark levels of interest to watch for. You can combine multiple instances of this indicator on different settings to find zones that are very relevant.

Shown as an example is the Nasdaq 100 futures (NQ1!) on the D timeframe with levels built from the last 100 periods with default settings. The boxes are the only output of the indicator, no signals are created.
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?