Hi liftoff, I'm very sorry I somehow missed your post in this thread. Must've been too much eggnog!

Anyway, feel free to reply back if you still have more questions about this.

Bitwise operators are not something I'm an expert at, but I spent some time studying them and decided they could be really useful in certain situations, such as finding optimal combinations. I think of them as a panel of dip switches... they can each be on or off, and there are many different combinations.

Code:
int dayclosecombobits = dayclosecombo+.5;

I need the value to be an integer and I also wanted it rounded. Sometimes optimizer returns non-whole numbers so I always want the closest integer. For example it could return 7.98 and in that case I would want to use integer 8. If you add .5 to any var, and then truncate the entire decimal portion, you always end up with the rounded integer (assuming you round from .5 or higher, as I do). Someone else on the forum pointed out that if you set an int to a var value, that Zorro will just truncate the decimal portion -- that saves a step of having to use a round function.

Code:
if ((dayclosecombobits & (1 << today)) && lhour(ET) >= 16)

The if operation is checking to see if the bit position assigned to "today" is currently set in dayclosecombobits. If it is, and if the current (Eastern) time is >= 16:00 hours, then the condition is true.