The Stochastic function is used in financial charts. It calculates the highest and lowest value on a given period and then:
value = (close - lowest ) / ( highest - lowest )