Login Page - Create Account

Technical Studies Reference


Ratio (Single Line)

This study calculates the ratio of the data specified by the Input Data Input of two charts. This is useful for comparing the relative strength of one chart to another. 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 the Input Data at Index \(t\) of Chart 1 and Chart 2, respectively. Chart 1 (aka the Source Chart) is always the chart to which the Ratio (Single Line) 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)}\) are both determined by a single Input Data Input.

Let \(v_1\) and \(v_2\) denote the Inputs Chart 1 Multiplier and Chart 2 Multiplier, respectively. Then the Ratio (Single Line) study calculates the following Ratio.

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

If \(X_t^{(1)} = 0\) or \(X_t^{(2)} = 0\), then a value of \(0\) is used for the Ratio.

If the Use Latest Source Data For Last Bar Input is set to Yes, and a replay is not running and at the last bar in the Destination Chart, then the study uses the data from the very latest bar in the Source Chart. If this Input is set to No, then this is not done.

Inputs

  • Input Data
  • Chart 2 Number: Determines which chart is to be used in the divisor of the calculated Ratio.
  • Chart 1 Multiplier
  • Chart 2 Multiplier
  • Use Latest Source Data For Last Bar: Determines whether the data from the last bar in the Source Chart is to be used.

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.

Ratio_-_Single_Line.85.scss


*Last modified Monday, 03rd October, 2022.