this script is the bottom indicator in the chart.
It shows price as a multiple of Stock to Flow model value
Code only shows data accurately for Monthly time frame for some reason.
I published a fixed version of this:
According to pine script documentation you need to use := for variable reassignment + you can't use the security function inside and if statement. I also tried to use a normal string variable like timeframe = 'W' which gets reassigned through an if statement like var and use it in the security function, but you're appearently not allowed to do that either.
So I used the input function, which works.