The computer just does what you tell it to do. If you tell it to enter a trade, it will enter a trade. Limiting the trades to certain hours or other conditions is up to your script. The backtest doesn't know your broker's market hours.