FX:GBPJPY   British Pound / Japanese Yen
/@version=5
indicator("MesinRumputCzarmel Target Price Calculator", overlay=true)

// Input variables
ir_a = input.float(title="Interest Rate Currency A", defval=4.75)/10
ir_b = input.float(title="Interest Rate Currency B", defval=-0.1)/10
base_mrkt_price_ir = input.float(title="Base Market Price for Interest Rate Target", defval=1.25)
inf_a = input.float(title="Inflation Rate Currency A", defval=6.4)/100
inf_b = input.float(title="Inflation Rate Currency B", defval=4.0)/100
base_mrkt_price_inf = input.float(title="Base Market Price for Inflation Target", defval=1.35)

// Calculations
target_price_ir = (1 + ir_a) / (1 + ir_b) * base_mrkt_price_ir
target_price_inf = (1 + inf_a) / (1 + inf_b) * base_mrkt_price_inf

// Plot horizontal lines for target prices
plot(target_price_ir, color=color.blue, title="Interest Target Price")
plot(target_price_inf, color=color.red, title="Inflation Target Price")

Related Ideas

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.