OPEN-SOURCE SCRIPT

ZigCycleBarCount [MsF]

Updated
Japanese below / 日本語説明は英文の後にあります。
Based on "ZigZag++" indicator by DevLucem. Thanks for the great indicator.
-------------------------
This indicator that displays the candle count (bar count) at the peaks of Zigzag .
It also displays the price of the peaks.

You can easily count candles (bars) from peak to peak. Helpful for candles (bars) in cycle theory.

This logic of the indicator is based from the mt4 zigzag indicator .

Parameter:
Depth = depth (price range)
Backstep = Period
Deviation = Percentage of how much the price has wrapped around the previous line.

Example:
Depth = 12
Backstep = 3
Deviation = 5

In this case, the price range is updated by 12 pips or more (Depth), and after 3 or more candlesticks line up (Backstep), if the price deviates from the previous line by 5% or more (Deviation), a peak is added.
-------------------------
Zigzagの頂点にローソクカウント(バーカウント)を表示するインジケータです。
頂点の価格も表示します。

頂点から頂点までのローソク(バー)を容易にカウントすることができます。
サイクル理論のローソク(バー)に役立ちます。

Zigzagロジック自体はMT4のzigzagインジケータを流用しています。

<パラメータ>
Depth=深さ(値幅)
Backstep=期間
Deviation=価格がどれだけ直前のラインの折り返したかの割合

例:
Depth=12
Backstep=3
Deviation=5
この場合、値幅を12pips以上更新し(Depth)、ローソク足が3本以上並んだ後(Backstep)、価格が直前のラインの5%以上折り返せば(Deviation)、頂点を付けます。

<表示オプション>
Label_Style = "TEXT"…テキスト表示、"BALLOON"…吹き出し表示
Release Notes
Improvement:
- Pine script version up v4 to v5.
- Added to HH/LL belong to count bars in option. If you show HH/LL labels then select the 'Show HH/LL'.
Release Notes
Improvement:
- You can change the text color and the text size.
barcountingCyclescycletheoryZigzagZig Zag Indicator

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Also on:

Disclaimer