Login Page - Create Account

Support Board


Date/Time: Fri, 04 Jul 2025 19:42:55 +0000



Post From: Disable Trading Time Formula

[2020-07-20 03:57:47]
Sawtooth - Posts: 4232
The J28 formula disables autotrading outside of your two time windows.
The H28 formula allows autotrading inside of your two time windows, plus J52 must be 0 inside the first time window, and J52 must be 1 inside the second time window.
J52 will be 0 at the start of the day, so H28 will be true inside of the first time window.
J52 will be 1 if a trade occurred in the first time window, so only one trade would occur inside the first time window, but will allow a trade in the second time window.
J52 will be 2 if a trade occurred in the second time window, so only one trade would occur inside the second time window.

If no trade occurred in the first time window, then no trade would occur in the second time window. If you want a trade in the second time window when none occurred in the first time window, use this formula instead in H28:
=OR(AND(FRACTIME(J41) > TIMEVALUE("00:00:00"), FRACTIME(J41) < TIMEVALUE("07:00:00"),J52<1), AND(FRACTIME(J41) > TIMEVALUE("09:00:00"), FRACTIME(J41) < TIMEVALUE("15:00:00"),J52<2))

Then you reference H28 in your K3/M3 formulas, like this:
=AND(YourEntryConditions,$H$28=1)