builds up mainloop
implements avg_price
more log information
calculates sleep time