konstantin.novik

USDRUB Budget Line

This indicator plots an estimated level of USDRUB rate according to the oil price in rubles to balance the budget. The indicator works at arbitrary timescales. You can change the estimated oil price level in rubles (default value is 3150 rubles/bbl) and the ticker for the oil.

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?
//@version=2
study(title = "USDRUB Budget Line", shorttitle = "BUDL", overlay = true, precision = 4)
oilLevel = input(title = "RUB Oil Level", type = float, defval = 3150.0, minval = 1.0, step = 1.0)
oilTicker = input(title = "Ticker for Oil", type = string, defval = "UKOIL")
rubLevel = security(oilTicker, period, oilLevel/close)
plot(rubLevel)