I have a string nd dynamically assigning values to that string, I want to trigger the alert when the string content changes. I can't find any option to get the string length in pine script. Can you please suggest me. Thanks in advance.
I have a string nd dynamically assigning values to that string, I want to trigger the alert when the string content changes. I can't find any option to get the string length in pine script. Can you please suggest me. Thanks in advance.
There is no built-in function to extract the string length, but you can monitor if the string variables changed during the runtime by comparing current state with the previous one. However you'll be restricted to 1 time change / bar, or you'll have to create different monitor functions after each part of the code that could change the variable.
example: