Write Automated Trades Into Database