Support Board
Date/Time: Wed, 19 Mar 2025 23:43:56 +0000
Post From: Programming Spreadsheets - Exit/Entry Signal On Same Bar
[2022-10-14 01:43:17] |
Sawtooth - Posts: 4186 |
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. |