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

[amibroker] Re: Sequence of two conditions



PureBytes Links

Trading Reference Links

For
cond1=a;
cond2=b;
you may have a sequence
a, a, b, b, b, a
with
cond11=exrem(cond1,cond2);
cond22=exrem(cond2,cond1);
you will have
a,    b,     , a
ie only the forst occurrence of each a or b.
Is this what you are looking for ?
DT
--- In amibroker@xxxxxxxxxxxxxxx, "IVA GmbH" <funnybiz@xxxx> wrote:
> Folks,
> 
> maybe you have a solution for the following:
> 
> Iīd like to detect the first occurence of cond2 after cond1 has 
happened.
> 
> I seemingly canīt use Valuewhen function since it calculates from 
the last bar, not from cond1 (i.e. I nedd a calculation forward 
rather than backward).
> 
> So, in case that there are several instances of cond2 after cond1, 
I might get a wrong result.
> 
> Could anyone help me, please?
> 
> Thanks a lot
> 
> Markus


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Your own Online Store Selling our Overstock.
http://us.click.yahoo.com/rZll0B/4ftFAA/46VHAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/