Add condition that closed deal in backtesting deal log

Pretty self-explanatory, just like in the paper trader deal history logs. This would be a huge time saver as well for optimizing bots