How to have FDC identify “tops” and “bottoms” for you

Many traders make their decisions based on recent extremes of market behavior, in which the first step is identifying the market’s recent ‘top’ or ‘bottom’.  This is something quite easily done by the human, but extremely difficult for a computer.  The reason it is difficult for the computer is that the human cannot adequately describe ‘top’ or ‘bottom’.  FDC is about to provide the solution.

In FDC, we have defined ‘top’ to be a point in a dataset which exceeds both the preceding and subsequent such points.  Likewise, ‘bottom’ has been defined to be a point which is exceeded by both the preceding and subsequent points. 

The above request will produce data that can be graphed as follows:

As anyone can see, the problem created by the above is that there are too many tops and bottoms.  That’s because market behavior is too erratic.  But the problem of erratic market behavior can easily be solved by smoothing the market data, preferably with a smoother that has as little lag as possible.  FDC has many such smoothers for you to experiment with, but for now we recommend using the moving trend (movtrend) for basic users of FDC, or the moving parabola (movparab) for users of FDCPRO

---------------------------------------------------------------------------------

reset

price: spx last 300

peak: ( hi price ) when (( hi price ) is 'top' )

valley: ( lo price ) when (( lo price ) is  'bottom' )

price, peak, valley

------------------------------

reset

price: spx last 300

surrogate: 25 movtrend midrange price

peak: ( hi price ) when ( surrogate is 'top' )

valley: ( lo price ) when ( surrogate is  'bottom' )

chart: 'bar_surrogate_peak_valley' setplot price, surrogate, peak, valley