OPEN-SOURCE SCRIPT
已更新 Plot the close-spread relationship between two price series

This indicator plots the close-spread relationship between two price series by calculating the change across two price series as a spread for each. Each spread is the rate of change in yesterday's closing price and the prior day's closing price. By default, weekend prices are defined to be 0.0 but can be included as user-definable input, if required.
User input:
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
發行說明
Changes as follows:- 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.
發行說明
Changes as follows:- 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
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。