Optimization of Automated Trading System's Interaction with Market Environment