Im noticing that the script exits positions before 9am ET time. Currently the script is run on an amazon VPS set to New York time.

For instance today, it exited all the positions around 1am Monday morning.

This being the exit condition of the script, the intention is to exit at 9am New York time on the first trading day after the Friday.


if (ldow(ET) != 5 && dow() != 6 && dow() != 7 && lhour(ET) >= 9) {
exitLong();
exitShort();