in chart, it is easy to use eyes to pick a trend, reversal. draw a line. or find a resistance. how do you define those mathmatically purely based on numbers, not graphs?

they are all relative to timeframes. you can just do a least squares line of best fit over some time interval for trend. and a least squares line of best fit over the major peaks and valleys for s/r lines, limiting which peaks you use by normalizing to the trend and only taking the top / bottom X% into consideration. thats just one idea that took me 30 seconds of thinking. i am sure there are plenty of other more complex ones.

Trig functions and comparing the area of price above and below a detrended time series. In an uptrend the area above the detrended time series will be greater than the area below. The ratio of up/down areas will tell you how strong the trend is. Changes in the areas over time can tell you when the trend is changing. More detailed but still very simple is to use changes in phase, amplitude, and frequency over the time series. Resistance and support can be defined as price levels of previous maximum trade volume. Good luck,

Support and resistance for the current time period can be calculated from the previous time period (high/low/close) by using pivot points. Pivot points will not usually correspond to the peaks and troughs on a chart however, if that's what you wish to define.

volume traded/ apply concepts from physics ...high density =support/resistance , negative acceleration = top/bottom

A brain is a kind of computer. I ask myself "what is my mind doing when it recognizes a pattern"? Then I might write computer programs that duplicate what my mind does.

Please examine the attached graph, write what you recognize as the trend and identify some support or resistance values. Thanks.