Exit ignored because signal predates already processed event

The message is correct and you do NOT need to “avoid” it.

It merely says: YOU CAN NOT TURN BACK TIME.

And it is there to clearly say that signal won’t be acted upon because it physically can’t (again no time travel possible).

Backtester internally remembers the ORDER in which signals occur within bar and if you already processed say 3rd signal in sequence you can not turn back time and process 2nd (earlier).

Also you do NOT need custom backtester. In 99% of cases there is no need for CBT and
if you are not experienced programmer, don’t use it. Signal matching is automatic and does not need CBT.

How do I know? I can see that from the code. I can detect skill of every person after looking at few lines of code.

Basic problem with your coding is not really the code itself, but pretty obvious mistake.
You are mixing midlevel with highlevel and you are attempting to process same signal twice.