When you changed it to ldow(), you should get different values since they are then sampled over a completely different period.

If static variables would not work in C, someone would probably have noticed this meanwhile. Your problem, as far as I understood it, was wrong return values of dayLow/dayHigh calls. But I could not reproduce that either. I could not even start your script due to the error messages. So obviously something is missing in either your version or mine. But it started ok here after fixing the ldow() issue, and all variables looked fine to me. Let's synchronize our tests:

- use your posted full script with this modification:

if ( is_week_day && ldow(ET,0) != cur_day){ // new day
cur_day = ldow(ET,0);

- use the latest Zorro version 1.50, that's the version I tested it with

- use EUR/USD for the asset.

Then run a test again and check all times and variables. When you still see something suspicious, please upload the complete log here and I'll look into it again.

You can also check the source code of dayHigh() and dayLow() in the indicators.c script. They are simple functions, at least I do not see a code part that would depend on the order of calls. Which does not mean that there is none.