Login Page - Create Account

Technical Studies Reference

Sum (Bar)

This study calculates the sums of corresponding variables of two charts. Refer to the Multiple Chart Studies description for instructions to use this study.

Let \(X_t^{(1)}\) and \(X_t^{(2)}\) denote the value of any chart variable (listed below) at Index \(t\) of Chart 1 and Chart 2, respectively. Chart 1 (aka the Source Chart) is always the chart to which the Sum (Bar) study is applied, and Chart 2 (aka the Destination Chart) is the chart specified by the Chart 2 Number Input. \(X_t^{(1)}\) and \(X_t^{(2)}\) 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\) and \(v_2\) denote the Inputs Chart 1 Multiplier and Chart 2 Multiplier, respectively. Then the Sum (Bar) study calculates the following sums.

\(\displaystyle{v_1 \cdot X_t^{(1)} + v_2 \cdot X_t^{(2)}}\)

The sums 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 two charts do not match in both date and time, then this study uses the sc.GetNearestMatchForDateTimeIndex() to find a match.



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 Friday, 27th December, 2019.