Pine Script 4 complains line 36: zigzag = na with this error: "Value with NA type cannot be assigned to a variable that was defined without type keyword".
Figured out to modify it to this:
Hi @sherwind
Firstly, thank you so much for your great work, because based on your script I've made my own indicator.
Is it possible to change something in your script do draw current trend line? I've tried to use bartstate.isrealtime but it doesn't work like I want.
Did you intend to reproduce or emulate the built in zigzag indicator?
Nice initiative but your script does not work when I compare both on the same chart, and peak/trough are odd
Hi this is great, However when I ran the code there was an error compiling "Script could not be translated from: |B|trend := na(trend", I shall be please if you kindly tell me how this could be solved please
Comments
Figured out to modify it to this:
36| float zigzag = na
to get it passed.
Firstly, thank you so much for your great work, because based on your script I've made my own indicator.
Is it possible to change something in your script do draw current trend line? I've tried to use bartstate.isrealtime but it doesn't work like I want.
Nice initiative but your script does not work when I compare both on the same chart, and peak/trough are odd