
Stock Technical Analysis Question
Quote:
>Got a question for you programmers that work with stock technical analysis.
>If each point on the graph represents the stock's closing price of the day,
>to determine a UP trend, one examines evenly spaced points at intervals
>and checks to see that each subsequent point is greater than the previous.
>Similarly, finding a DOWN trend is simple enough.
>I'm wondering if anyone has suggestions as to what tests I should include
>in my program to determine conditions as illustrated below, where the
>close price is near the low of a trading range with at least 2 similar
>waves having occurred earlier?
> *
> * * * * *
> * * * * * *
> * * * * * *
> * * * * * *
> * * * * * *
> * * * * * *
>* * * * * * <-close
>-any ideas are appreciated
>-dan
Dan,
The way to do it is to assign to each bar a pivit point...so, you have
a close price array, and a corresponding pivot point array.
Each day, if the close is higher than both the close immediately
before, and the close immediately after, assign a value of 1 to pp()
for that day....if it's lower than the close immediately before as
well as immediately after it, assign pp() a value of -1.
Now, go back to the beginning of the data...repeat the process, only
instead of looking at each day, look only at the pivot point days
which are positive. If a positive pp day is higher than the positive
pp day immediately before it and immediately after it, assign it a
value of 2...likewise with negative pp days...
Continue in theis fashion....In so doing, you can do do all types of
wave analysis questions, chart formation stuff, all in the data
itself. Good Luck, Ralph Vince