Hello I am writing a program and need to be able to determine if a market is currently on an upward and downward trend. Not predicting it but just determining if its currently on one over the past few hours to the past 24 hours. Anyone understand what I mean and be able to help?