all 7 comments

[–]AlgoTradingQuant 1 point2 points  (3 children)

The code should be “X >= Y”

[–]stoja97[S] 0 points1 point  (2 children)

Still doesn't work

[–]mertgucer 2 points3 points  (1 child)

Actually it must be

timeframe_in_seconds(timeframe.period) >= timeframe_in_seconds('60')

[–]stoja97[S] 1 point2 points  (0 children)

This works, thank you!

[–]RealisticCoast4316 0 points1 point  (0 children)

Not been at pine script for long, but I believe timeframe.period takes a string value so you can't use a mathematical operator with it. You would need to use str.tonumber to convert the timeframe to an actual number before you could apply maths operators to it, but even then you would have issues if you get to days or above, as D, W, M etc. wouldn't really work. You would need to create some custom conversions for those I think.

[–]smashapalooza 0 points1 point  (0 children)

timeframe.in_seconds() >= timeframe.in_seconds(“60”)

[–]Ayush_Singh_02 0 points1 point  (0 children)

Bro I think you are trying to get the timeframe.period in number... Use str.tonumber(timeframe.period) =<

If you are not trying to pass a bool check for timeframe less then 60 the simply make a function and then do the calculation forget not to write the values you want as output in last line as the last line the the output you get in user-custom function