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

Re: [amibroker] AFL Mystery - 4th



PureBytes Links

Trading Reference Links

Hi Tomasz,

thanks for your quick response.
I suspected that it had to do with the filtering.
The question I have is how do I get the buyprice after
filtering: I understand that the filtering requires the sell.
The sell requires the buyprice. The buyprice - as you 
point out - requires the filtered buy.
And AFL requires predefined variables.

Is there a solution?

Cheers - Ralf

----- Original Message ----- 
From: Tomasz Janeczko <tj@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, May 18, 2001 5:15 AM
Subject: Re: [amibroker] AFL Mystery - 4th


> Hi Ralf,
> 
> The problem is that you FIRST get use not filtered buy
> for calculating of buy price and AFTER that you
> remove extra signals using ExRem().
> This is the reason why your buyprice changes
> when FILTERED buy does not happen.
> 
> > buy = isCci AND isBullish AND isUp ;
> > buyprice = valuewhen( buy, ref(open, 1), 1);
> > 
> > minGrowth = (close > buyprice * 1.08);
> > stopLoss = (close < buyprice * 0.97);
> > 
> > sell = minGrowth or stopLoss ;
> > 
> > buy = exrem(buy, sell);
> > sell = exrem(sell, buy);