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.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
🔍 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.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
🔍 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.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.