0% found this document useful (0 votes)
257 views9 pages

Fixed Reference Ratio Chart

Uploaded by

ShreePanicker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
257 views9 pages

Fixed Reference Ratio Chart

Uploaded by

ShreePanicker
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.

com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

Launch chart Watchlist S Upgrade now


14-DAY FREE TRIAL

Symbol Last Chg Chg%


Chart Trade Markets Screeners Community More
NIFTY 15721.50
−26.95 −0.17%

DJI 34483.43
191.13 0.56%

DXY 92.423 0.351 0.38%


Fixed Reference Ratio Chart
B bharatTrader Sep 9, 2020 NKY

UKX
E
28791.53
−21.08 −0.07%

7037.48−50.08 −0.71%

DAXD 15531.040
−159.550
−1.02%

Trend Analysis relativestrength


39

Sep 9, 2020 This study does a division ("/") between the ticker to benchmark symbol. It works only on day timeframe.

Often referred to as spread charts or ratio charts this is often used to measure the strength and performance of a
script vis-a-vis a benchmark index. In this study, the comparison is plotted from a fixed reference session. On the
current bar, the percentage change of the current ratio to the reference ratio is displayed as a label down icon,
rounded to nearest integer. There are options to plot either a candle plot or line plot. The reference date can also
be changed from the input dialog.

In the example above, 13-Feb-2020 is chosen as the reference date. Ratios are plotted from this reference date
onwards. At the latest bar, the "60%" displays the percentage difference between ratio on 13-Feb-2020 and current
date, 09-Sep-2020. This means RELIANCE performed 60% better than the benchmark NIFTY50 since 13-Feb-2020.

Sep 9, 2020 Release Notes:


Added an input option to hide label

Sep 9, 2020 Release Notes:


Fixed a small typo
Fixed Moving Average plot

1 of 9 01-07-2021, 12:49 am
Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

Sep 10, 2020 Release Notes:


Watchlist
Added an option for zero percentage line. This will help visualise the actual change in percentage.
Symbol Last Chg Chg%
Sep 10, 2020 Release Notes:
NIFTY 15721.50
−26.95 −0.17%
Now %change is correct up to 2 places of decimal
DJI 34483.43
191.13 0.56%

Sep 10, 2020 Release Notes: DXY 92.423 0.351 0.38%


Added separte option for "0%" label input control NKY E
28791.53
−21.08 −0.07%

UKX 7037.48−50.08 −0.71%


Sep 10, 2020 Release Notes:
DAXD 15531.040
−159.550
−1.02%
Removed option to display "0%" label
Added label to display no valid trading session date in input NI225 28791.46
−20.93 −0.07%
Made default option to true, to display the zero line BTCUSD34739.3−1183.1−3.29%

XRPUSD0.67859−0.02791
−3.95%
Sep 11, 2020 Release Notes:
ETHUSD2207.0040.90 1.89%
Moved the %change label to right, so that it is clearly observed
CIPLA 37

Sep 11, 2020 Release Notes: CIPLA LTD NSE


No trading session found error now label down Health Technology
A temporary change on short title. :) Pharmaceuticals: Other

Sep 11, 2020 Release Notes:


971.90 INR
−7.70 (−0.79%)
A little more change in title :)
MARKET CLOSED
(JUN 30 15:59 UTC+5:30)

Sep 17, 2020 Release Notes: 969.15 DAY'S RANGE 997.00


Shortened the short title :)
Made "Line" as default plot option 621.05 52WK RANGE 997.00
Option to plot historical CRS, beyond reference date

Key stats
The main highlight of this release is the ability to plot historical CRS beyond the reference date selected. This will
VOLUME 7.196M
help in doing a historical analysis of the scrip against the benchmark without the need to set the reference date.
This is an advanced feature and therefore turned off by default.

Sep 17, 2020 Release Notes:


Fixed default colour of historical CRS to fuchsia instead of white. Will help those not using the dark theme.

Sep 25, 2020 Release Notes:


Added %change in Price to the label, along with %CRS change from reference
Default line width of CRS plot is 2
Minor cosmetic changes

Sep 27, 2020 Release Notes:


Added "Performance Trend" plot. Read below for details.
Changed the short title of the indicator
Changed the name of Zero line to Reference line

2 of 9 01-07-2021, 12:49 am
Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

Watchlist

Symbol Last Chg Chg%

NIFTY 15721.50
−26.95 −0.17%

DJI 34483.43
191.13 0.56%

DXY 92.423 0.351 0.38%


E
NKY 28791.53
−21.08 −0.07%

UKX 7037.48−50.08 −0.71%

DAXD 15531.040
−159.550
−1.02%

NI225 28791.46
−20.93 −0.07%

BTCUSD34739.3−1183.1−3.29%

XRPUSD0.67859−0.02791
−3.95%

ETHUSD2207.0040.90 1.89%

CIPLA 37

CIPLA LTD NSE


Health Technology
Pharmaceuticals: Other

971.90 INR
−7.70 (−0.79%)
MARKET CLOSED
(JUN 30 15:59 UTC+5:30)

969.15 DAY'S RANGE 997.00

621.05 52WK RANGE 997.00

Key stats

VOLUME 7.196M

3 of 9 01-07-2021, 12:49 am
Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

Watchlist

Symbol Last Chg Chg%

NIFTY 15721.50
−26.95 −0.17%

DJI 34483.43
191.13 0.56%

DXY 92.423 0.351 0.38%


E
NKY 28791.53
−21.08 −0.07%

UKX 7037.48−50.08 −0.71%

DAXD 15531.040
−159.550
−1.02%

NI225 28791.46
−20.93 −0.07%

BTCUSD34739.3−1183.1−3.29%

XRPUSD0.67859−0.02791
−3.95%

ETHUSD2207.0040.90 1.89%

CIPLA 37

CIPLA LTD NSE


Health Technology
Pharmaceuticals: Other

971.90 INR
−7.70 (−0.79%)
MARKET CLOSED
(JUN 30 15:59 UTC+5:30)

969.15 DAY'S RANGE 997.00

621.05 52WK RANGE 997.00

Key stats

VOLUME 7.196M

4 of 9 01-07-2021, 12:49 am
Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

Watchlist

Symbol Last Chg Chg%

NIFTY 15721.50
−26.95 −0.17%

DJI 34483.43
191.13 0.56%

DXY 92.423 0.351 0.38%


E
NKY 28791.53
−21.08 −0.07%

UKX 7037.48−50.08 −0.71%

DAXD 15531.040
−159.550
−1.02%

NI225 28791.46
−20.93 −0.07%

BTCUSD34739.3−1183.1−3.29%

XRPUSD0.67859−0.02791
−3.95%

ETHUSD2207.0040.90 1.89%

CIPLA 37

CIPLA LTD NSE


Health Technology
Pharmaceuticals: Other

971.90 INR
−7.70 (−0.79%)
MARKET CLOSED
(JUN 30 15:59 UTC+5:30)

969.15 DAY'S RANGE 997.00

621.05 52WK RANGE 997.00

Key stats

VOLUME 7.196M

The Performance Trend Plot: This option plots the difference (in %) in the CRS (symbol/benchmark) ratio from
the reference date on a day-to-day basis till the current session. The plot is made as a histogram with color coding
that shall be explained in the document later on. It also displays additional information.

The Absolute Zero line is the absolute zero of the %change in CRS from the reference date. Therefore any bar
(Green or Red) above the zero line indicates that the symbol closed with a higher change in CRS from the
reference date CRS on that date. Similarly, any bars being plotted below the reference line indicate that the CRS
change was negative on that date with respect to reference date.

For the mathematically inclined, the formulae are:

5 of 9 01-07-2021, 12:49 am
Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

CRS on a particular day = symbol close / benchmark close


Watchlist
%CRS Change = (CRS today - CRS reference day) / CRS reference day * 100
Symbol Last Chg Chg%
So if CRS today > CRS reference day ===> Plot above zero line
NIFTY 15721.50
−26.95 −0.17%
And if CRS today < CRS reference day ===> Plot below zero line
DJI 34483.43
191.13 0.56%

Note that when in the “Performance Trend” mode, the indicator removes the “Reference Line”
DXY that is plotted
92.423 0.351 in 0.38%
the Line and Candle plots. Instead the absolute zero line is taken as a reference in this mode.
NKYE 28791.53
−21.08 −0.07%

UKX 7037.48−50.08 −0.71%


Color Coding
DAXD
There could be 4 colors for the bar, irrespective of whether they are above or below zero line. 15531.040
−159.550
−1.02%

NI225 28791.46
−20.93 −0.07%
The color is a shade of green (dark and bright) when the close of the symbol is greater than or equal to 34739.3
BTCUSD the close of the
−1183.1−3.29%
symbol the previous day.
XRPUSD0.67859−0.02791 −3.95%
The color is a shade of red (dark and bright) when the close of the symbol is less than the close of the symbol the
previous day. ETHUSD2207.0040.90 1.89%
A bright color (red or green) is applied when the trend of the performance (%CRS change) is going upwards. I.e. Current 37
CIPLA
day %CRS change > Previous day %CRS change
A dark color (red or green) is applied when the trend of the performance (%CRS change) is going CIPLA LTD
downwards. NSECurrent
I.e
day %CRS change < Previous day %CRS change Health Technology
Pharmaceuticals: Other

Label Information 971.90 INR


By default, the label in blue is displayed. This label displays (Delta CRS) the %CRS change as −7.70 (−0.79%)
of today with respect
MARKET CLOSED
to the reference date in % terms. Delta Price is the %Price change as of today with respect to(JUN
the30reference date in
15:59 UTC+5:30)
% terms.
969.15 DAY'S RANGE 997.00
Additional information is displayed when the mouse is hovered above the blue label. They are described as below:
CRS: Current CRS value
621.05 52WK RANGE 997.00
Eq Price: The Equilibrium Price as of today
Delta Eq Price: The difference in Eq Price and Current Price in % terms.

Key stats
Eq Price is the equilibrium price, the price at which the symbol would be at zero RS value with reference. For
more details on equilibrium price refer to this link. VOLUME 7.196M

Sep 27, 2020 Release Notes:


Fixed a bug around Delta Eq Price computation

Sep 29, 2020 Release Notes:


Fixed Delta Eq. Price (again) :)

If Delta Eq. Price (%) negative, it indicates that the price of the scrip should fall by this much % as of today in a
future date if it has to come down to CRS ratio of Reference Date. If it is positive, it means that the scrip needs to
rise by this much % to reach the CRS of Reference date.

Oct 11, 2020 Release Notes:


Changed default reference data for RS 3-July-2020

Dec 1, 2020 Release Notes:


Support for the newly introduced Time Input in Trading View (TV)
CRS Trend Indication based on Rate of Change (inbuilt roc method of TV)
Support on all time frames, limited to maximum loadable bars by TV for a resolution

Time Input
Instead of those dreary text boxes we now have an actual datetime input. The timezone is automatically adjusted
to the selected exchange timezone. No changes are required unless, you know what you are doing.

CRS Trend
The indicator now calculates internally the CRS trend. This is done by calculating the RateOfChange (roc) method

6 of 9 01-07-2021, 12:49 am
Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

of TV. The length for lookback of roc is user input, 13 by default. The output is displayed as "Up" or "Down" on the
Watchlist
label description. "Up" indicates that the trend of the CRS since the roc lookback is "positive". "Down" indicates
that the trend of the CRS since roc lookback is "negative". Symbol Last Chg Chg%

NIFTY 15721.50
−26.95 −0.17%
Time Frame Support
DJIis not
The indicator now adjusts to all timeframes, Daily, Weekly, Monthly, Hourly, Minutes. Seconds 34483.43
191.13
tested. 0.56%
In case
the exact reference date is not matched (for example ARS reference date is 3rd July and a Weekly timeframe
DXY 92.423 0.351is 0.38%
selected) then the next candle after the input reference date is selected as reference. The "adjusted" reference
NKYE 28791.53−21.08 −0.07%
date is indicated in the label text. In case of lower timeframes, if the last available bar is before the input ARS
UKX 7037.48−50.08 −0.71%
reference date, then a warning is displayed as a valid percentage deviation cannot be calculated. In this case only
DAXD can
the CRS trend and the plot is displayed. To mitigate this, either shift to a higher timeframe that 15531.040
−159.550
include the−1.02%
reference date or set the reference to a closer date. NI225 28791.46
−20.93 −0.07%

BTCUSD34739.3−1183.1−3.29%
Dec 31, 2020 Release Notes:
XRPUSD0.67859−0.02791
−3.95%
Added label color
ETHUSD2207.0040.90 1.89%
The color of the label is set based on Delta CRS > Reference Line. It helps in easy and quick identification,
CIPLA 37
especially if using on mobile device (Not recommended, though).
CIPLA LTD NSE
Health Technology
Jan 7 Release Notes: Pharmaceuticals: Other
Changed the trend indication calculation

971.90 INR
The CRS Trend ("UP" or "Down") earlier was calculated using the RoC method. It is now updated to use the linear
−7.70 (−0.79%)
regression slope instead. A negative slope indicates "Down" and a positive slope indicates "UP"
MARKET CLOSED
(JUN 30 15:59 UTC+5:30)

Feb 6 Release Notes: 969.15 DAY'S RANGE 997.00


Coloured bubbles on CRS Line (aka RS Line)
Soothing colours for label and text on it 621.05 52WK RANGE 997.00

Bubbles will be displayed on the CRS line with the following legend:
Orange: New high of CRS Line Key stats
Green: CRS Line crosses over the CRS mean line from below. CRS mean length is defined at "Moving Average
VOLUME 7.196M
Length" input
Maroon: CRS Line crosses below the CRS mean line from above.
Blue: Consistently rising CRS values for look-back period. Defined from input, max 500 bars only.

Also applied some smoothing to the colour of the labels and the label text for visual peace.

Feb 6 Release Notes:


Fixed colour combination of label text
Small typos in input box

Feb 10 Release Notes:


Changed ARS default date to reflect new ARS date from today
Removed an experimental feature leak

Mar 13 Release Notes:


Overhauled the input dialog, using the latest formatting options introduced in pinescript
Possible to select custom colors for the label box and text color
Separated MA X'over bubbles from RS high and RS rising bubbles

Now, the green and the maroon bubbles (MA X'over) bubbles have to be enabled from the input box. Both the
options must be turned on to view the MA X'over bubbles. If only interested in viewing the RS High and RS rising
bubbles, select the "Show Bubbles on CRS Line" only.

7 of 9 01-07-2021, 12:49 am
Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

Apr 6 Release Notes:


Watchlist
Some strange and unexplained problem with historical CRS plot.
Symbol Last Chg Chg%
Fixed by fluke :)
NIFTY 15721.50
−26.95 −0.17%
Apr 26 Release Notes: DJI 34483.43
191.13 0.56%
Fixed the overlapping label box, especially irritating during smaller time frames.
DXY 92.423 0.351 0.38%
E
NKY 28791.53
−21.08 −0.07%
May 17 Release Notes:
Change default reference date (aka ARS Date) UKX 7037.48−50.08 −0.71%
Current CRS color to purple DAXD 15531.040
−159.550
−1.02%

NI225 28791.46
−20.93 −0.07%

BTCUSD34739.3−1183.1−3.29%

XRPUSD0.67859−0.02791
−3.95%
Protected script
ETHUSD
This script is published closed-source and you may use it freely. You can favorite it to use it on a chart. You cannot view or 2207.0040.90 1.89%
modify its source
code. CIPLA 37

Want to use this script on a chart? CIPLA LTD NSE


Health Technology
Add to favorite indicators Pharmaceuticals: Other

971.90 INR
−7.70 (−0.79%)
MARKET CLOSED
Get your first Bitcoin with CoinDCX Go. (JUN 30 15:59 UTC+5:30)
Download the App and use the code COINDCXGO and get a chance to win free Bitcoin worth Rs.100.
969.15 DAY'S RANGE 997.00
Download CoinDCX Go and win free Bitcoin*
621.05 52WK RANGE 997.00

Key stats
Comments VOLUME 7.196M

Leave a comment that is helpful or encouraging. Let's master the markets together

Сomment with cheer Post Comment

akshaybothra Mar 31
How to know the percentage performance with respect to index of a particular stock. What is Delta CRS and Delta Price (when calculated
this doesn't show relative performance with the index). Can someone give a brief on this ? Thanks
+17 Reply

bharatTrader akshaybothra Jun 11


B @akshaybothra, Read the documentation on the indicator.
Reply

analysis2084 Jan 5
A What period you have used for ploting historical RS ?
+9 Reply

saachin Apr 24
S

8 of 9 01-07-2021, 12:49 am
Fixed Reference Ratio Chart — Indicator by bharatTrader — TradingVie... https://in.tradingview.com/script/EX0LJKPl-Fixed-Reference-Ratio-Chart/

S
Hello Niranjan Bhai,
Watchlist

i was seeing the video of Premal Bhai and Ref. Spread Chart shown on vide in e learn (paid version) and what parameters you have
Symbol Last Chgon the
Chg%
indicator is different. ca you help me out with the settings...
NIFTY 15721.50
−26.95 −0.17%
+5 Reply
DJI 34483.43
191.13 0.56%

DXY 92.423 0.351 0.38%


mfruitwala Sep 9, 2020
M How to use this in tradview NKY E
28791.53
−21.08 −0.07%

+1 Reply UKX 7037.48−50.08 −0.71%

DAXD 15531.040
−159.550
−1.02%
premanj Jun 14
P Amazing effort sir. Thanks a lot
NI225 28791.46
−20.93 −0.07%

BTCUSD34739.3−1183.1−3.29%
Reply
XRPUSD0.67859−0.02791
−3.95%

ETHUSD2207.0040.90 1.89%
nikunjkhemka Jun 11
N Dear Bharat Sir,
CIPLA 37

CIPLA LTD NSE


Request you to change the location of that info box which gives the data of CRS.... Please Health Technology
Pharmaceuticals: Other
Reply

971.90 INR
bharatTrader nikunjkhemka Jun 11 −7.70 (−0.79%)
B @nikunjkhemka, Why? Just disable option to display box. MARKET CLOSED
(JUN 30 15:59 UTC+5:30)
Reply
969.15 DAY'S RANGE 997.00

nikunjkhemka bharatTrader Jun 11 621.05 52WK RANGE 997.00


N @bharatTrader, Sir, We cant see proper crossover with MA and spread line with that box, We can disable but that info is also
Products Company Community For business
require so you given a option. But really thankful for you sir that you created this things for us. Thank you
Key stats
Chart Reply About Refer a friend Widgets
VOLUME 7.196M
Pine Script Features Ideas Advertising

Stock Screener Pricing


bharatTrader nikunjkhemka Jun 12 Scripts Website & broker solutions
B @nikunjkhemka, Simply turn off the box when viewing
Forex Screener Wall of Love StreamsMA crossover on Spread. Also, youCharting
do not need to "see" the
solutions
crossover. If you enable the option, a Green and Maroon bubble appears whenever there is a crossover or crossunder.
Crypto Screener Blog House rules Lightweight Charting Library
That info in that box is not realtime critical piece that one needs to correlate with MA on spread. Simply turn it on,
Economic Calendar Security
when you vulnerability
require to view again. Thanks. Moderators Brokerage integration

Earnings Calendar Status page


Reply Pine Wizards Partner program

Terms of use Chat Content streams & RSS

Disclaimer

Privacy policy

Cookies policy

DOW NLOA D

Desktop app

Select market data provided by ICE Data Services


© 2021 TradingView

9 of 9 01-07-2021, 12:49 am

You might also like