OPEN-SOURCE SCRIPT
Updated [dharmatech] U.S. Treasury Yield Curve

This indicator displays the U.S. Treasury Securities Yield Curve.
This is a fork of the US Treasury Yield Curve indicator by @longflat. Thank you for sharing your work!
There are already so many yield curve indicators on TradingView.
What makes this one different?
Update to version 5 of Pine Script
Add RRP%
Add 4 month
Add 20 year
Show previous day's yield curve
Options for prior yield curves
The thick red line shows the latest yield curve.
The yellow line shows the yield curve 1 bar ago.
So, if your timeframe is set to 1 day, the yellow line will show yesterday's yield curve.
This is a fork of the US Treasury Yield Curve indicator by @longflat. Thank you for sharing your work!
There are already so many yield curve indicators on TradingView.
What makes this one different?
Update to version 5 of Pine Script
Add RRP%
Add 4 month
Add 20 year
Show previous day's yield curve
Options for prior yield curves
The thick red line shows the latest yield curve.
The yellow line shows the yield curve 1 bar ago.
So, if your timeframe is set to 1 day, the yellow line will show yesterday's yield curve.
Release Notes
Hardcoded timeframe of securities to 1D.Without this, RRP doesn't load at lower timeframes.
Also, without this, at lower timeframes, the yield curve difference is sometimes hardly noticeable.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
For quick access on a chart, add this script to your favorites — learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.