Thanks for your notes.
QuantKey_Bruce is correct. You could track the time in a variable and compare the current time to the variable to see if 30 minutes have passed since the time you last checked. Also, you could run your script using Calculate.OnBarClose to have the OnBarUpdate() code run once at the end of each 30-minute bar.
Note that you would likely not need to re-check all the previous bars since you are just checking if a drawing tool changed from one 30-minute bar to the next.
Let us know if we may assist further.

Comment