Update bot.py

I couldn't test the lastest update because I'm only 7 hours into the 24 hour testing period. More updates will possibly follow after 24 or 48 hours. :-)
I'm thinking about a threshold modifier because the average price can move up or down between max and min price. A corrected threshold might mean more successful buy / sell orders.