I might be mistaken but if you plot first and set the color second then I think the new color doesn't take affect until the next bar is plotted. I always code color changes before the plot statements so I can't confirm your way lags by a bar but in theory it sure looks like it would.
On...
You can combine the entry and exit into 1 strategy even though they're using different ideas. That's not a problem.
There's several ways to solve the multiple timeframe thing. The easiest is load the same symbol in the higher timeframe into the same chart and reference it as data2. Then...
It's easy if you combine both indicators within 1 new indicator. Then the variable list in the new indicator contains all the variables from both indicators.
Pick a name for a variable.
var: myVariable(0);
Set the variable equal to your indicator.
myVariable=myIndicator;
If your indicator is average(c,5) that part looks like this.
myVariable=average(c,5);
To call your indicator within a second indicator use it's name in the place you...