Support Board
Date/Time: Wed, 19 Mar 2025 23:25:45 +0000
Post From: Programming Spreadsheets - Exit/Entry Signal On Same Bar
[2022-10-28 03:32:05] |
Sawtooth - Posts: 4186 |
Try this in J28: =AND(J8 = 0, OR(FRACTIME(J41) < TIMEVALUE("09:24:59"), FRACTIME(J41) > TIMEVALUE("09:35:00"))) You might also try this: =AND(J8 = 0, OR(FRACTIME(J41) < TIME(9,24,59,999), FRACTIME(J41) > TIME(9,35,0))) or some variation thereof. I'm not sure exactly what's going on, but something is not aligning at 09:25:00.000 A chart's time does not advance by the second or the millisecond; it advances at the next chart update. J41 doesn't tick off each millisecond, it updates when the next price moves in the market. You might also need to have your session times encompass 09:25:00, where the session start time is earlier. If your bar period produces a bar on a 5 min interval, you might use A3 instead of J41: =AND(J8 = 0, OR(FRACTIME(A3) < TIMEVALUE("09:25:00"), FRACTIME(A3) > TIMEVALUE("09:35:00"))) |