I am a heavy Pinescript coder and I trade intrabar but no matter what I do there are times alert() wont match the entry session, sometimes it will fire phantom alerts even if the alert function are using lock variables and are sandwiched between the if blocks. the condition is correct but the alert() function executes in a deviated manner sometimes a different trade direction as if it is not constrained by conditions.
I wonder why Trading View could not fix this bug. Pinescript is so inconsistent and a pain to debug. Why cant it follow the variables it is subjected to or at least the if block it is in. It behaves like it is outside the if block.
Such a crappy language, makes me think their software engineers are incompetent.