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. קרא עוד בתנאים וההגבלות.

רוצה להשתמש בסקריפ זה בגרף?