Support Board
Date/Time: Thu, 03 Jul 2025 11:40:15 +0000
Post From: Programming Spreadsheets - Exit/Entry Signal On Same Bar
[2022-10-14 01:43:17] |
Sawtooth - Posts: 4231 |
Is there a way to avoid this?
You might also need to disable entries just before the flatten time. Try this:I don't use J85-J89. Instead I use J28 and J29, like this: J28: =AND(J8 = 0, OR(FRACTIME(J41) < TIMEVALUE("09:30:00"), FRACTIME(J41) > TIMEVALUE("16:00:00"))) J29: =FRACTIME(J41) > TIMEVALUE("16:15:00") Including J8=0 in the J28 formula disallows entries after 16:00, but allows exits. And since Autotrading is not disabled (J28) until you are flat, J29 is not disabled and can execute. This assumes that the time in J29 is >= the later time in J28. |