10y3mYieldInversion
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © faizmaricar

//@version=5
indicator("10y3mYieldInversion", overlay = true)
tenYearYield = request.security('US10Y', '', close)
threeMonthYield = request.security('US03MY', '', close)
inversion = if threeMonthYield[1] < tenYearYield[1] and threeMonthYield[0] > tenYearYield[0]
    line.new(bar_index , close, bar_index, close * 1.01, extend = extend.both, color = color.green, style = line.style_solid, width = 1)