Plot the close-spread relationship between two price series

User input:
- Symbol for price series 1 - defaults to BITFINEX:BTCUSD
- Symbol for price series 2 - defaults to NASDAQ:NDX
- Market session time (string) - defaults to 00:00 to 23:59
- Timezone - defaults to UTC-4
- Added vertical bars (default of gray) to visual show weekend/out of session times
- Changed user-input for session times to use input.session
- Removed user-input option for “include out of session data” - to the nature of session handling and determining of a bar is within market hours is dependent on the market that the main chart is plotting. For example, bars for equity markets are not provided if they fall outside of market hours, so the option is meaningless in this context.
- The reference ticker can be specified by the user. Defaults to NDX. The 2nd ticker plot is linked to the main chart ticker.
- Changed plot of closing price spread for main asset and comparison asset to be a bar chart
- Added assertion pass/fail rates as a label in the top right
- Added configurable look-back. Defaults to all prices in the series (-1) but can be changed in the config panel.
Indicator works best with BTC as the main chart series and NDX (or other market) as the comparison series
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.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.
Penafian
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.
Untuk akses pantas pada carta, tambah skrip ini kepada kegemaran anda — ketahui lebih lanjut di sini.