Here: https://www.mql5.com/en/docs/function_indices you have a list of all function and you can search (Ctrl+f) for book to find the functions that are dealing with the book market like: https://www.mql5.com/en/docs/marketinformation/marketbookget.

Documentation on MQL5: List of MQL5 Functions
- www.mql5.com
List of MQL5 Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
You can print messages already on Init – and print out all historical prices or any other information. You can also use OnTimer – and print data on every second or millisecond.
So any print in that method, will be executed at each new tick.
However I need to figure out how to get all the prices in the book, without waiting for the price change of the exchange rate on which the expert was loaded.