Home >> (Table of Contents) Studies and Indicators >> Technical Studies Reference >> Study Subgraphs Divide - Ratio
Technical Studies Reference
- Technical Studies Reference
- Common Study Inputs (Opens a new page)
- Using Studies (Opens a new page)
Study Subgraphs Divide/Ratio
This study calculates and displays the Ratio of two study Subgraphs. These can be part of different studies on the chart.
Let \(X^{(1)}\) and \(X^{(2)}\) be random variables respectively denoting the Input Study 1 and Input Study 2 Inputs, and let \(X^{(1)}_t\) and \(X^{(2)}_t\) be their respective values at Index \(t\). Let the Input Study 2 Subgraph Offset be denoted as \(k\).
If \(k = 0\), then the displayed value of Study Subgraphs Divide at Index \(t\) is given by \(\displaystyle{\left\{ \begin{matrix} X^{(1)}_t / X^{(2)}_t & X^{(2)}_t \neq 0 \\ 0 & X^{(2)}_t = 0 \end{matrix}\right.}\). If \(k \neq 0\), then the displayed value of Study Subgraphs Divide is given by \(\displaystyle{\left\{ \begin{matrix} X^{(1)}_t / X^{(2)}_0 & X^{(2)}_0 \neq 0 \\ 0 & X^{(2)}_0 = 0 \end{matrix}\right.}\) for \(t \leq k\), and \(\displaystyle{\left\{ \begin{matrix} X^{(1)}_t / X^{(2)}_{t - k} & X^{(2)}_{t - k} \neq 0 \\ 0 & X^{(2)}_{t - k} = 0 \end{matrix}\right.}\)\(\) for \(t > k\).
If the Draw Zeros Input is set to No, then Study Subgraphs Divide is not drawn at Index \(t\) if its value is zero. Otherwise, it is drawn at Index \(t\) even if its value is zero.
Inputs
- Input Study 1: Use this Input to select the study and study Subgraph for Study Subgraph 1 used in the ratio calculation.
- Input Study 2: Use this Input to select the study and study Subgraph for Study Subgraph 2 used in the ratio calculation.
- Study 2 Subgraph Offset: This Input specifies the offset, in chart bars, from the current bar when determining the value for Study Subgraph 2.
- Draw Zeros: When this Input is set to Yes, then zero values from the study Subgraph will be drawn. Otherwise, they will not be.
*Last modified Monday, 03rd October, 2022.