how to fetch swing high/low time

33 Views Asked by At

How do I get time at which swing high was formed (want this time as input) in pinescript?

I tried this:

last_sh_active_time = ta.change(sh) ? time : na

// Convert epoch time to human-readable time
normal_time = timestamp(last_sh_active_time)

but this did not work

0

There are 0 best solutions below