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.
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?