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

Re: [amibroker] AFL Mystery - 4th



PureBytes Links

Trading Reference Links

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);


Best regards,
Tomasz Janeczko
===============
AmiBroker - the comprehensive share manager.
http://www.amibroker.com


----- Original Message ----- 
From: "Ralf Wenske" <ralfw@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, May 17, 2001 8:57 AM
Subject: [amibroker] AFL Mystery - 4th


> Hi,
> 
> I had thought that meanwhile I had found a solution:
> 
> isCci = cci() > -100;
> isBullish = ema(c, 5) > ema(co, 21) and ema(co,21) > ema(co,45);
> isUp = ema(c, 5) > ema( ref(c, -2), 5);
> 
> 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);
> 
> filter = 1;
> numcolumns = 4;
> column0 = c; column0name = "c";
> column1 = buyprice; column1name = "buyprice";
> column2 = sell; column2name = "sell";
> column3 = buy; column3name = "buy";
> 
> But now I find that the 'buyprice' is sometimes correct and at other times
> it changes without 'buy' occurring.
> 
> Some ideas?
> 
> Cheers - Ralf
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
>