I see no difference between static and local variables in your code, or in the log. But your code produces peeking errors and I suspect that your day function will not run at ET 10:30, but at GMT midnight. For detecting a new day in New York, use the ldow() function, not day(). day() is GMT time.