Federal Funds Rate Projections [tedtalksmacro]
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © tedtalksmacro

//@version=5
indicator("Federal Funds Rate Projections [tedtalksmacro]", overlay = false, format = format.percent)

// Calculate
currentfedfunds = (request.security("ZQ1!", "1", close) - 100) * -1
octoberfedfunds = (request.security("ZQV2023", "1", close) - 100) * -1
novemberfedfunds = (request.security("ZQX2023", "1", close) - 100) * -1
decemberfedfunds = (request.security("ZQZ2023", "1", close) - 100) * -1
jan24fedfunds = (request.security("ZQF2024", "1", close) - 100) * -1
feb24fedfunds = (request.security("ZQG2024", "1", close) - 100) * -1
march24fedfunds = (request.security("ZQH2024", "1", close) - 100) * -1

// plot projections
plot(currentfedfunds, style = plot.style_line, linewidth=2, color= color.new(color.black, 0), title = 'Current')
plot(octoberfedfunds, style = plot.style_line, linewidth=2, color= color.new(color.gray, 0), title = 'OCT 2023')
plot(novemberfedfunds, style = plot.style_line, linewidth=2, color= color.new(color.fuchsia, 0), title = 'NOV 2023')
plot(decemberfedfunds, style = plot.style_line, linewidth=2, color= color.new(color.lime, 0), title = 'DEC 2023')
plot(jan24fedfunds, style = plot.style_line, linewidth=2, color= color.new(color.teal, 0), title = 'JAN 2024')
plot(feb24fedfunds, style = plot.style_line, linewidth=2, color= color.new(color.olive, 0), title = 'FEB 2024')
plot(march24fedfunds, style = plot.style_line, linewidth=2, color= color.new(color.silver, 0), title = 'MAR 2024')