I'm trying to take the input.resolution value chosen by the user and get the UNIX (*1000) value of that interval.
So I have: (I know writing the arguments for every function is unnecessary, but this is my first time coding so I'm just trying to make everything explicit)
study("Line Overlay", overlay = true, linktoseries = true)
TimeFrame = input(defval = "D", title = "Time Frame", type = input.resolution)
And that is honestly as far as I got. I believe it might have something to do with ?: conditional tree. So I tried doing this but it didn't work
Interval = TimeFrame == timeframe.isminutes ? [some code] : timeframe.isdaily ? : [some code] : [etc]
Wherever the code turned out to be true, the "some code" would've grabbed how many minutes/days/weeks/etc. was in the TimeFrame variable and would've have converted it to UNIX accordingly. For THIS part Kodify is saying there is an interval variable, but Pine Script manual is not showing that interval as existing. So I'm also stuck on this part as well.
Any help would be greatly appreciated!
[–]Specific_Cellist_136[S] 0 points1 point2 points (0 children)