# Technical Studies Reference

### Sum Charts From List

This study calculates the sums of corresponding variables of the charts specified by the List of Chart Numbers Input. Refer to the Multiple Chart Studies description for instructions to use this study.

Let the number of charts in the List of Chart Numbers be $$N$$, and let the Divisor Input be denoted as $$v$$. If a value of $$0$$ is entered for the Divisor, then the study automatically sets $$v$$ equal to $$N$$.

Let $$X_t^{(i)}$$ denote the value of any chart variable (listed below) at Index $$t$$ of Chart #$$i$$. Chart 1 (aka the Source Chart) is always the chart to which the Sum All Charts study is applied, while the other charts are Destination Charts. $$X_t^{(i)}$$ can represent any of the following variables.

• Open
• High
• Low
• Last
• Volume
• Number of Trades / Open Interest
• OHLC Avg
• HLC Avg
• HL Avg

It supported to specify a multiplier for each individual chart; we will denote these multipliers as $$v_i$$, $$i = 1,2,...,N$$. To specify the optional multiplier enter an asterisk (*) after the Chart Number, followed by the multiplier value. Example: 1*1.5, 2*.2, 3*1, 5*3. The general format is: [ChartNumber]*[Multiplier], [ChartNumber]*[Multiplier],... . The multiplier can also be negative; for example, if you want to subtract the value of a particular chart use a multiplier of -1. The Sum Charts From List study calculates the following sums for prices.

$$\displaystyle{\frac{1}{v}\sum_{List} v_i X^{(i)}_t}$$

For an explanation of the Sigma ($$\Sigma$$) notation for summation, refer to our description here. The subscript $$List$$ indicates that the sum is to be done over all the charts specified by the List of Chart Numbers Input.

Furthermore, the study calculates the following sums for Volume and Number of Trades / Open Interest.

$$\displaystyle{\frac{1}{v}\sum_{List} \frac{X^{(i)}_t}{v_i}}$$

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

#### Inputs

• Divisor: The sum of all charts is divided by this value. If you leave this value at 0, then it will equal the number of charts specified in your List of Chart Numbers.
• Synchronize Charts: When this is set to Yes, then the chart this study is applied to controls the time periods of the other charts, making them all the same time period per bar.
• List of Chart Numbers: This is a comma separated list of the charts that you want to sum. Each chart has a number, and it is shown after the number sign (#) in the Region Data Line in Chart Region 1 (this is at the top of the chart), and on the title bar of the chart window. Example: #4. These are the numbers that you enter in this list, and they need to be separated by commas. Example list: 1, 2, 3, 5. All of the charts need to be open and need to remain open. All of the charts also need to be in the same Chartbook that this study instance is contained within.