# 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.
{"ft_lang_label":"__label__en","ft_lang_prob":0.7742313,"math_prob":0.9986756,"size":2002,"snap":"2021-43-2021-49","text_gpt3_token_len":502,"char_repetition_ratio":0.13563563,"word_repetition_ratio":0.029239766,"special_character_ratio":0.27272728,"punctuation_ratio":0.075675674,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.999848,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-12-03T01:04:48Z\",\"WARC-Record-ID\":\"<urn:uuid:747deabc-566d-4636-a1d9-c39ab1339301>\",\"Content-Length\":\"19077\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:83c9ac85-9585-49e2-b52a-62d5a7fbea1a>\",\"WARC-Concurrent-To\":\"<urn:uuid:16f9b14c-dd89-47c1-83c3-b288715c80ff>\",\"WARC-IP-Address\":\"95.216.233.104\",\"WARC-Target-URI\":\"https://www.sierrachart.com/index.php?page=doc/StudiesReference.php&ID=85&Name=Ratio_-_Single_Line\",\"WARC-Payload-Digest\":\"sha1:HFZVOAIFJP65O5DMQ3CMHEPNAS2ZT34W\",\"WARC-Block-Digest\":\"sha1:5LICTUXVBMD2PB2JQHBYS2VZJVBWYTP6\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-49/CC-MAIN-2021-49_segments_1637964362571.17_warc_CC-MAIN-20211203000401-20211203030401-00615.warc.gz\"}"}