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.
Skrip sumber terbuka

Dalam semangat TradingView yang sebenar, penulis skrip ini telah menerbitkannya dengan menggunakan sumber terbuka supaya pedagang-pedagang dapat memahami dan mengesahkannya. Sorakan kepada penulis! Anda dapat menggunakannya secara percuma tetapi penggunaan semula kod ini dalam penerbitan adalah dikawalselia oleh Peraturan Dalaman. Anda boleh menyukainya untuk menggunakannya pada carta.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.

Ingin menggunakan skrip ini pada carta?