OPEN-SOURCE SCRIPT
Cryptomarket Regime

This Pine Script indicator, titled "Cryptomarket Regime," aims to analyze the current market regime of the cryptocurrency market by considering various factors such as correlation, z-scores, and exponential moving averages (EMAs) for trend classification.
1. **Indicator Settings**:
- It allows users to toggle the display of bar colors, the EMA plot, and the exclusion of small-cap assets for a more focused analysis.
- Users can adjust parameters such as the length of the EMA, z-score, correlation length, and weight.
2. **Asset Data Retrieval**:
- The script retrieves daily close price data for various cryptocurrencies such as BTC, ETH, SOL, BNB, DOGE, ADA, and others, as well as market indices like TOTAL, TOTAL2, TOTAL3, and OTHERS.
3. **Correlation Calculation**:
- It calculates the correlation between each cryptocurrency and a specified benchmark symbol (e.g., TOTAL) over a given period.
- The correlation values are used to adjust z-scores later in the script.
4. **Z-Score Calculation**:
- Z-scores are calculated for each cryptocurrency based on its daily close price and a specified length.
- These z-scores represent the deviation of each asset's price from its mean in terms of standard deviations.
5. **Z-Score Market Sum**:
- The script computes a weighted sum of z-scores across selected assets, adjusting for correlation.
- Users can choose to include or exclude certain assets from this calculation.
6. **EMA Trend Analysis**:
- Exponential moving averages (EMAs) are calculated for each cryptocurrency based on a specified length.
- Crosses above or below these EMAs are identified to indicate potential trend changes. The trend number indicators how many bars have closed since the last crossover(bull) and crossunder (bear).
7. **Plotting**:
- The script plots the EMA of the primary charting asset (e.g., BTC/USD) if configured to do so.
- Additionally, it can display bar colors based on user preference.
8. **Overall Z-Score Calculation**:
- The final z-score is computed as a weighted combination of the market sum z-score and the z-score of the primary charting asset.
- This final z-score aims to provide a comprehensive assessment of the market regime, considering both the broader market context and the specific asset being analyzed.
Overall, this indicator offers a multi-dimensional analysis of the cryptocurrency market, considering correlations, z-scores, and trend indicators to provide insights into market conditions and potential trading opportunities. Users can customize the settings to align with their trading strategies and preferences.
1. **Indicator Settings**:
- It allows users to toggle the display of bar colors, the EMA plot, and the exclusion of small-cap assets for a more focused analysis.
- Users can adjust parameters such as the length of the EMA, z-score, correlation length, and weight.
2. **Asset Data Retrieval**:
- The script retrieves daily close price data for various cryptocurrencies such as BTC, ETH, SOL, BNB, DOGE, ADA, and others, as well as market indices like TOTAL, TOTAL2, TOTAL3, and OTHERS.
3. **Correlation Calculation**:
- It calculates the correlation between each cryptocurrency and a specified benchmark symbol (e.g., TOTAL) over a given period.
- The correlation values are used to adjust z-scores later in the script.
4. **Z-Score Calculation**:
- Z-scores are calculated for each cryptocurrency based on its daily close price and a specified length.
- These z-scores represent the deviation of each asset's price from its mean in terms of standard deviations.
5. **Z-Score Market Sum**:
- The script computes a weighted sum of z-scores across selected assets, adjusting for correlation.
- Users can choose to include or exclude certain assets from this calculation.
6. **EMA Trend Analysis**:
- Exponential moving averages (EMAs) are calculated for each cryptocurrency based on a specified length.
- Crosses above or below these EMAs are identified to indicate potential trend changes. The trend number indicators how many bars have closed since the last crossover(bull) and crossunder (bear).
7. **Plotting**:
- The script plots the EMA of the primary charting asset (e.g., BTC/USD) if configured to do so.
- Additionally, it can display bar colors based on user preference.
8. **Overall Z-Score Calculation**:
- The final z-score is computed as a weighted combination of the market sum z-score and the z-score of the primary charting asset.
- This final z-score aims to provide a comprehensive assessment of the market regime, considering both the broader market context and the specific asset being analyzed.
Overall, this indicator offers a multi-dimensional analysis of the cryptocurrency market, considering correlations, z-scores, and trend indicators to provide insights into market conditions and potential trading opportunities. Users can customize the settings to align with their trading strategies and preferences.
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
🔍 Access Investing Strategies & Indicators
📊 whop.com/marktquant
🌐 marktquant.com
Nothing shared on this page constitutes financial advice. All information, tools, and analyses are provided solely for informational and educational purposes.
📊 whop.com/marktquant
🌐 marktquant.com
Nothing shared on this page constitutes financial advice. All information, tools, and analyses are provided solely for informational and educational purposes.
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
🔍 Access Investing Strategies & Indicators
📊 whop.com/marktquant
🌐 marktquant.com
Nothing shared on this page constitutes financial advice. All information, tools, and analyses are provided solely for informational and educational purposes.
📊 whop.com/marktquant
🌐 marktquant.com
Nothing shared on this page constitutes financial advice. All information, tools, and analyses are provided solely for informational and educational purposes.
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。