Let me know if you want a custom script written or if you have a special request for me
1. "period := im != 0 and re != 0 ? 360 / atan(im / re) : 0" , I understand "360 " here should be changed into "2*pi".
2. "period := im != 0 and re != 0 ? 360 / atan(im / re) : 0
period := min(max(period, 0.67 * nz(period)), 1.5 * nz(period))
period := min(max(period, 6), 50)
period := (0.2 * period) + (0.8 * nz(period))" , the order of 'period' assignment, i remember "min 1.5 * nz(period)" should be first handled. However, i am not sure whether it will contribute to different results or not.
3. "length = ceil(cycPart * smoothPeriod)", 'ceil' function here should be 'round', but when i changed it, pine reported an error of nagtive value. I have no idea why this happen.
could you look into them and check whether they are valid or not? thanks in advance!