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

Re: Peak function



PureBytes Links

Trading Reference Links

Hi Witold ,
Additional conditions will not change the problem.
And the problem is that the truth of a condition like
Dno1 > Dno2 
is perhaps known some days later.
Please read #5290, #5292, #5293 messages I wrote for Nate.
See also att. gifs
Dimitris Tsokakis
--- In amibroker@xxxx, Witold Dabrowski <witold_dabrowski@xxxx> wrote:
> Hi,
> 
> Dimitri is right, however we can use 'peak()' or
> 'trough()' functions with realistic results but with
> some additional conditions. Here's example of buy
> signal of trend following system:
> 
> /* Growing Bottoms */
> chg = 3;
> Czynnik = Close;
> /* You may use what you want: 'rsi()', 'ma(C,2)'
> etc. */
> 
> Dno1 = Trough(Czynnik, chg, 1); /* last trough */
> Dno2 = Trough(Czynnik, chg, 2); /* previous trough */
> 
> Buy = 
> Dno1 > Dno2 AND /* last trough is higher than the
> previous */
> 
> /* additional conditions to make signals realistic */
> Czynnik >= Dno1 + (chg/100 * Dno1) AND
> /* Today price = last trough + chg% of last
> trough */
> Ref(Czynnik, -1) <= Dno1 + (chg/100 * Dno1);
> /* For prevent repeated buy signals */
> 
> 
> For sell signal usely I use Chandelier exit and the
> contrary of buy signal.
> 
> Dimitris Tsokakis wrote:
> > As you see, A or B or C are not YET peaks.
> > May be after some days of fluctuation you will
> notice
> > that C was a peak, but the "decision" will come with
> a
> > delay.
> 
> 
> __________________________________________________
> Do You Yahoo!?
> NEW from Yahoo! GeoCities - quick and easy web site hosting, just 
$8.95/month.
> http://geocities.yahoo.com/ps/info1