Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Spread - 4 Chart
Technical Studies Reference
- Technical Studies Reference
- Common Study Inputs (Opens a new page)
- Using Studies (Opens a new page)
Spread - 4 Chart
This study calculates spreads of corresponding variables of four charts. Refer to the Multiple Chart Studies description for instructions to use this study.
Let \(X_t^{(1)}\), \(X_t^{(2)}\), \(X_t^{(3)}\), and \(X_t^{(4)}\) denote the value of any chart variable (listed below) at Index \(t\) of Chart 1, Chart 2, Chart 3, and Chart 4, respectively. Chart 1 (aka the Source Chart) is always the chart to which the Sum (Bar) study is applied, and Charts 2, 3, and 4 (aka the Destination Charts) are the charts specified by the Chart 2 Number, Chart 3 Number, and Chart 4 Number Inputs, respectively. \(X_t^{(1)}\), \(X_t^{(2)}\), \(X_t^{(3)}\), and \(X_t^{(4}\) can represent any of the following variables.
- Open
- High
- Low
- Last
- Volume
- Number of Trades / Open Interest
- OHLC Avg
- HLC Avg
- HL Avg
Let \(v_1\), \(v_2\), \(v_3\), and \(v_4\) denote the Inputs Chart 1 Multiplier, Chart 2 Multiplier, Chart 3 Multiplier, and Chart 4 Multiplier respectively. Then the Spread - 4 Chart study calculates the following spreads.
\(\displaystyle{\left(v_1 \cdot X_t^{(1)} - v_2 \cdot X_t^{(2)}\right) - \left(v_3 \cdot X_t^{(3)} - v_4 \cdot X_t^{(4)}\right)}\)
The spreads are displayed only for Open, High, Low, and Close. These are displayed in the form of OHLC Bars by default, and the price graph draw type can be changed through the Graph Draw Type setting in the Study Settings window for the study.
When corresponding bars in the three charts do not match in both date and time, then this study uses the sc.GetNearestMatchForDateTimeIndex() to find a match.
Inputs
- Chart 2 Number: Determines which chart is to be used in the second terms of the calculated spreads.
- Chart 3 Number: Determines which chart is to be used in the third terms of the calculated spreads.
- Chart 4 Number: Determines which chart is to be used in the fourth terms of the calculated spreads.
- Chart 1 Multiplier
- Chart 2 Multiplier
- Chart 3 Multiplier
- Chart 4 Multiplier
Spreadsheet
The spreadsheet below contains the formulas for this study in Spreadsheet format. Save this Spreadsheet to the Data Files Folder.
Open it through File >> Open Spreadsheet.
*Last modified Monday, 03rd October, 2022.