Cuban's Pair Trading Index

With highly correlated pairs, it can be a blessing or a curse during volatility when you're somehow stuck in the only lower beta pairs, or maybe you're market neutral and the wrong leg starts nuking.
This indicator was built as a visual way to track pair relationships.
Fundamentally, this script does the following:
- Plots the relative performance of the relationship between two assets across multiple time horizons
- Uses a consistent measurement of historical performance, regardless of asset -- currently standard deviations, may add log difference in the future
- Plots a custom Average Directional Index on the current chart ticker for current asset contextual momentum
- Plots the average 'rotation' of both the ADX and Pair Delta independently, over n numbers of rotations -- able to be specified using the 'Rotation Lookback' variable
If you've never pair traded crypto before (i.e. longDYDX, short
ETH), you might not be aware that most highly correlated alt asset returns tend to oscillate on a low timeframe rolling basis around the performance of the majors -- and more recently, predominantly $ETH. With this in mind and using this oscillator, we can track that relationship.
Users are given the ability to adjust the following: - Comparison Asset
- Fast and Slow Delta Lookbacks
- Whether to wait for one bar delay during security calls
- Rotation Lookback
- Rotation Threshold for Pair Delta and ADX independently
- ADX Lookback
- Whether to utilize the ADX on the current chart ticker or also net that off against the ADX of the comparison asset
TO DO: - Aesthetic update to Pair Delta plot
- Permanent fix for security call forced delay
- small logic fix
Skrip hanya-undangan
Hanya pengguna yang disetujui oleh penulis yang dapat mengakses skrip ini. Anda harus meminta dan mendapatkan izin untuk menggunakannya. Izin ini biasanya diberikan setelah pembayaran. Untuk detail lebih lanjut, ikuti petunjuk penulis di bawah ini atau hubungi cubantobacco secara langsung.
TradingView TIDAK menyarankan untuk membayar atau menggunakan skrip kecuali anda benar-benar percaya kepada pembuatnya dan memahami cara kerjanya. Anda juga dapat menemukan alternatif sumber terbuka yang gratis di skrip komunitas kami.
Instruksi penulis
Peringatan: harap baca panduan kami untuk skrip khusus undangan sebelum meminta akses.
Pernyataan Penyangkalan
Skrip hanya-undangan
Hanya pengguna yang disetujui oleh penulis yang dapat mengakses skrip ini. Anda harus meminta dan mendapatkan izin untuk menggunakannya. Izin ini biasanya diberikan setelah pembayaran. Untuk detail lebih lanjut, ikuti petunjuk penulis di bawah ini atau hubungi cubantobacco secara langsung.
TradingView TIDAK menyarankan untuk membayar atau menggunakan skrip kecuali anda benar-benar percaya kepada pembuatnya dan memahami cara kerjanya. Anda juga dapat menemukan alternatif sumber terbuka yang gratis di skrip komunitas kami.
Instruksi penulis
Peringatan: harap baca panduan kami untuk skrip khusus undangan sebelum meminta akses.