Hi everyone!
I have a very simple task that I can't find a good neat solution to, and I'm sure there is one.
I want to use a Switch-statement with the input of how many bars there is since the last buy. This is to use different kind of stops depending on how long since the entry.
The BarsSince() looks right, but that returns an array and won´t work with the switch. So I need to drill it down to an integer, but I just can't find a way. And I would very much like to avoid for-loops.
I have searched the forum and there are similar posts, but none that goes from an array to a specific integer.
I'm probably missing something very obvious, so sorry about that, but thanks for any help