OPEN-SOURCE SCRIPT
AltCoin Index Correlation

๐ง AltCoin Index Correlation โ Strategy Overview
AltCoin Index Correlation is a dynamic EMA-based trading strategy designed primarily for altcoins, but also adaptable to stocks and indices, thanks to its flexible reference index system.
๐งญ Strategy Philosophy
The core idea behind this strategy is simple yet powerful:
Price action becomes more meaningful when it aligns with broader market context.
This script analyzes the correlation between the assetโs trend and a reference index trend, using dual EMA (Exponential Moving Average) crossovers for both.
When both the altcoin and the reference index (e.g. Altcoin Dominance, BTC Dominance, Total Market Cap, or even indices like the NASDAQ 100 or S&P 500) are aligned in trend direction, the script considers it a high-confidence setup.
It also includes:
Optional inverse correlation logic (for contrarian setups)
Custom leverage settings (e.g., 1x, 1.8x, etc.)
A dynamic scale-out mechanism during weakening trends
Date filtering for controlled backtests
A live performance dashboard with equity, PnL, win rate, drawdown, APR, and more
โ๏ธ Default Settings & Backtest Results
Timeframe tested: 1H
Test date: May 20, 2025
Sample: 100 high-cap altcoins
Reference index: CRYPTOCAP:OTHERS.D (Altcoin Dominance)
Leverage: 1.8x (180% of capital used)
๐ With default settings:
Win rate: ~80%
Higher profits, due to increased exposure
Best suited for confident trend followers with higher risk tolerance
๐ With fixed capital or 1x leverage:
Win rate improves to ~90%
Lower returns, but greater capital preservation
Ideal for conservative or risk-managed trading styles
๐ Versatility
While tailored for altcoins, this strategy supports traditional markets as well:
Easily switch the reference index to OANDA:NAS100USD or S&P 500 for stock correlation trading
Adjust EMA lengths and leverage to match the asset class and volatility profile
๐งฉ Suggested Use
Best used on trending markets (not sideways)
Ideal for 1H timeframes, but adjustable
Suitable for traders who want a rules-based, macro-aware entry/exit system
Try it out, customize it to your style, try different settings and share your results with the community!
Feedback is welcome โ and improvements are always in progress.
๐ ### Check my profile for other juicy hints and original strategies. ### ๐
AltCoin Index Correlation is a dynamic EMA-based trading strategy designed primarily for altcoins, but also adaptable to stocks and indices, thanks to its flexible reference index system.
๐งญ Strategy Philosophy
The core idea behind this strategy is simple yet powerful:
Price action becomes more meaningful when it aligns with broader market context.
This script analyzes the correlation between the assetโs trend and a reference index trend, using dual EMA (Exponential Moving Average) crossovers for both.
When both the altcoin and the reference index (e.g. Altcoin Dominance, BTC Dominance, Total Market Cap, or even indices like the NASDAQ 100 or S&P 500) are aligned in trend direction, the script considers it a high-confidence setup.
It also includes:
Optional inverse correlation logic (for contrarian setups)
Custom leverage settings (e.g., 1x, 1.8x, etc.)
A dynamic scale-out mechanism during weakening trends
Date filtering for controlled backtests
A live performance dashboard with equity, PnL, win rate, drawdown, APR, and more
โ๏ธ Default Settings & Backtest Results
Timeframe tested: 1H
Test date: May 20, 2025
Sample: 100 high-cap altcoins
Reference index: CRYPTOCAP:OTHERS.D (Altcoin Dominance)
Leverage: 1.8x (180% of capital used)
๐ With default settings:
Win rate: ~80%
Higher profits, due to increased exposure
Best suited for confident trend followers with higher risk tolerance
๐ With fixed capital or 1x leverage:
Win rate improves to ~90%
Lower returns, but greater capital preservation
Ideal for conservative or risk-managed trading styles
๐ Versatility
While tailored for altcoins, this strategy supports traditional markets as well:
Easily switch the reference index to OANDA:NAS100USD or S&P 500 for stock correlation trading
Adjust EMA lengths and leverage to match the asset class and volatility profile
๐งฉ Suggested Use
Best used on trending markets (not sideways)
Ideal for 1H timeframes, but adjustable
Suitable for traders who want a rules-based, macro-aware entry/exit system
Try it out, customize it to your style, try different settings and share your results with the community!
Feedback is welcome โ and improvements are always in progress.
๐ ### Check my profile for other juicy hints and original strategies. ### ๐
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.