Anyway, I like to know what’s going on with my system when I’m away. The system writes out a log of errors, trades, finished processes, etc, and also emails me important events like Trader Workstation shutting down, and executed trades. These go to my Blackberry wherever I am. To send emails from/to a Gmail account…
Anyway, I like to know what’s going on with my system when I’m away. The system writes out a log of errors, trades, finished processes, etc, and also emails me important events like Trader Workstation shutting down, and executed trades. These go to my Blackberry wherever I am. To send emails from/to a Gmail account, which I like to use because it has a lot of storage and can be searched easily, I had to write a little script (code at the bottom) to add to the Python logging library since Gmail uses a special kind of authentication not supported by the standard library.
import logginglogging.config.fileConfig(“/yourdirectorystructure/logging.conf“)logging.debug(‘Live trading online’)logging.critical(strategy_name+’ ‘+signal+’ ‘+position_size+’ ‘+etf)

Leave a Review