Create trigger, see what the average is, place corresponding order outside of trigger so as not to give the game away, profit.