OPEN-SOURCE SCRIPT

Pivot Highs/Lows with Bar Counts

What does the indicator do?

This indicator adds labels to a chart at swing (a.k.a., "pivot") highs and lows. Each label may contain a date, the closing price at the swing, the number of bars since the last swing in the same direction, and the number of bars from the last swing in the opposite direction. A table is also added to the chart that shows the average, min, and max number of bars between swings.

OK, but how do I use it?

Many markets -- especially sideways-moving ones -- commonly cycle between swing highs and lows at regular time intervals. By measuring the number of bars between highs and lows -- both same-sided swings (i.e., H-H and L-L) and opposite-sided swings (i.e., H-L and L-H) -- you can then project the averages of those bar counts from the last high or low swing to make predictions about where the next swing high or low should occur. Note that this indicator does not make the projection for you. You have to determine which swing you want to project from and then use the bar counts from the indicator to draw a line, place a label, etc.

Example: Chart of BTC/USD

ảnh chụp nhanh

The indicator shows pivot highs and lows with bar counts, and it displays a table of stats on those pivots.

If you focus on the center section of the chart, you can see that prices were moving in a sideways channel with very regular highs and lows. This indicator counts the bars between these pivots, and you could have used those counts to predict when the next high or low may have occurred.

The bar counts do not work as well on the more recent section of the chart because there are no regularly time swings.
Cyclesforecastingpivotswing

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?


Steve Wehba

Thông báo miễn trừ trách nhiệm