[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Peaks and Troughs detection



PureBytes Links

Trading Reference Links

Franco,
Your code and your gif DOES NOT find the most recent peak [trough] 
which is higher [lower] than the recent Close.
It is doing something different.
Single points localization is not the easiest AFL sport.
Thanks to its first quality structure, AFL can solve various 
interesting problems.
DT 
--- In amibroker@xxxx, franco fornari <ffpsi@xxxx> wrote:
> Tomasz,
> 
> look, please, at the attached chart. You will see two
> lines wich represent resistance and support
> respectively. They are obtained by the formulas:
> 
> res = ref(Peak(H, 2.5, 1), -1);
> sup = ref(Trough(L, 2.5, 1), -1);
> 
> My purpose is to use them depending on level of the
> last closing price. Since a support, once broken,
> became a resistance and vice versa, I need a formula
> wich is able to find the lowest (and nearest) peak or
> trough, but higher than the last closing price.
> On the attached chart, the nearest resistance is,
> actually, as you can see, an old support previously
> broken (yellow line).
> All that is for long trades, the opposite for short,
> obviously.
> Hoping to have been more clear,
> 
> best regards and thanks in advance
> 
> Franco
> 
> 
______________________________________________________________________
> Vinci i Mondiali - La Grande Sfida dei Mondiali FIFA
> http://it.yahoo.com/mail_it/foot/?http://lasfida.yahoo.net/