NariCapitalTrading

Kendall's Tau Correlation Regimes [NariCapitalTrading]

NariCapitalTrading アップデート済   
The "Kendall's Tau Correlation Regimes" indicator is designed to analyze price data and determine market regimes based on Kendall's Tau correlation coefficient. It provides insight into the strength and direction of the correlation between two data series: close price and a selected moving average.

User Inputs:

Period: Defines the lookback period for calculating Kendall's Tau correlation. It can be adjusted using the input slider, with a minimum value of 1.
Threshold: Sets the threshold for identifying bullish and bearish market regimes. The user can adjust this value within the range of 0.1 to 1.0 with step increments of 0.1.
MA Type: Allows users to select the type of moving average to be used in the correlation calculation. Options include Simple Moving Average (SMA), Exponential Moving Average (EMA), and Hull Moving Average (HMA).

Kendall's Tau Correlation Calculation:

Calculates Kendall's Tau correlation coefficient between the closing price and the selected moving average.
Kendall's Tau measures the strength and direction of the ordinal association between two data series. It assesses whether the data pairs are in the same order or not.
The calculation involves counting concordant and discordant pairs of data points and then computing the coefficient.

Market Regime Identification:

Based on the threshold defined by the user, the indicator identifies two market regimes: bullish and bearish.
A regime is considered bullish when the Kendall's Tau correlation coefficient is greater than the threshold.
A regime is considered bearish when the Kendall's Tau correlation coefficient is less than the negative of the threshold.

Plotting:

The indicator plots the calculated Kendall's Tau correlation coefficient as a blue line on a separate indicator pane.
It also highlights bullish regimes with a green background and bearish regimes with a red background.

Conclusion:
The "Kendall's Tau Correlation Regimes" indicator provides traders with a visual aid for assessing market regimes based on the strength of correlation between price and a selected moving average.

Disclaimer: This indicator is for educational and informational purposes only.
リリースノート:
def val threshold update

オープンソーススクリプト

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

免責事項

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

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