Algorithm to decide on electricity price is high or low based on historical prices