blackcat1402

[blackcat] L1 Reverse Choppiness Index

blackcat1402 アップデート済   
The Choppiness Index is a technical indicator that is used to measure market volatility and trendiness. It is designed to help traders identify when the market is trending and when it is choppy, meaning that it is moving sideways with no clear direction. The Choppiness Index was first introduced by Australian commodity trader E.W. Dreiss in the late 1990s, and it has since become a popular tool among traders.

Today, I created a reverse version of choppiness index indicator, which uses upward direction as indicating strong trend rather than a traditional downward direction. Also, it max values are exceeding 100 compared to a traditional one. I use red color to indicate a strong trend, while yellow as sideways. Fuchsia zone are also incorporated as an indicator of sideways. One thing that you need to know: different time frames may need optimize parameters of this indicator. Finally, I'd be happy to explain more about this piece of code.

The code begins by defining two input variables: `len` and `atrLen`. `len` sets the length of the lookback period for the highest high and lowest low, while `atrLen` sets the length of the lookback period for the ATR calculation.

The `atr()` function is then used to calculate the ATR, which is a measure of volatility based on the range of price movement over a certain period of time. The `highest()` and `lowest()` functions are used to calculate the highest high and lowest low over the lookback period specified by `len`.

The `range`, `up`, and `down` variables are then calculated based on the highest high, lowest low, and closing price. The `sum()` function is used to calculate the sum of ranges over the lookback period.

Finally, the Choppiness Index is calculated using the ATR and the sum of ranges over the lookback period. The `log10()` function is used to take the logarithm of the sum divided by the lookback period, and the result is multiplied by 100 to get a percentage. The Choppiness Index is then plotted on the chart using the `plot()` function.

This code can be used directly in TradingView to plot the Choppiness Index on a chart. It can also be incorporated into custom trading strategies to help traders make more informed decisions based on market volatility and trendiness.

I hope this explanation helps! Let me know if you have any further questions.
リリースノート:
upgrade to v5

Avoid losing contact!Don't miss out! The first and most important thing to do is to join my Discord chat now! Click here to start your adventure: discord.com/invite/ZTGpQJq 防止失联,请立即行动,加入本猫聊天群: discord.com/invite/ZTGpQJq
オープンソーススクリプト

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。

免責事項

これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。

チャートでこのスクリプトを利用したいですか?