"AddLabel is not allowed in this context" and the OK button is grayed out when one attempts to use AddLabel() in scans, conditional orders, or other widgets.I know this is old but what's the solution?
The solution is to never stuff code written to create labels and plots on a chart into the Scan Hacker.
Here is a tutorial for the best way to use the Scan Hacker:
https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/