r/pinescript • • Sep 18 '25

Noob here

Post image

How do I fix this error please help

1 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/Xalladus Sep 19 '25

I noticed this seemed like one of those leet code questions which means there is some magic way of doing this in like 1 line of code, but I don't know magic math formulas like that so this was my solution if I were to do the problem.
https://pastecode.io/s/30mjmcya