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が提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。