Interest Rates | USA / EU / UK
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Realmix_mit_Soda

//@version=5
indicator('Interest Rates', shorttitle='IR')

var inSym1 = input.symbol('ECONOMICS:USINTR', title='US Interest Rates')
var inSym2 = input.symbol('ECONOMICS:EUINTR', title='EU Interest Rates')
var inSym3 = input.symbol('ECONOMICS:GBINTR', title='UK Interest Rates')
var inLen = input.int(1, title='MA(Length)', minval=1, maxval=400)
inSrc = input(close, title='Source')

sym1 = request.security(inSym1, '', inSrc)
sym2 = request.security(inSym2, '', inSrc)
sym3 = request.security(inSym3, '', inSrc)

symMa1 = ta.sma(sym1, inLen)
symMa2 = ta.sma(sym2, inLen)
symMa3 = ta.sma(sym3, inLen)

plot(symMa1, 'US Interest Rates', color=color.new(color.red, 0))
plot(symMa2, 'EU Interest Rates', color=color.new(color.blue, 0))
plot(symMa3, 'UK Interest Rates', color=color.new(color.white, 0))
