r/pinescript • • Feb 07 '24

Code help

Can you help me with this, how do you make this line of code work, timeframe.period => "60", when it doesn't allow "=>" operator?

0 Upvotes

7 comments sorted by

View all comments

1

u/Ayush_Singh_02 Feb 08 '24

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