Before_trading_start

The special function before_trading_start is called at a preset time before the market opens, every day.  Exactly what time it runs? 9am, 9:15am, or 9:28am?

If you are running a backtest, it is called at 08:45 hrs. For live trading, it will be called 30 minutes before the market open (if you started before that) or the next minute after initialize called (if you started after after). You should not make an assumption in your strategy on the exact time of the call - either in backtest or live run.