PureBytes Links
Trading Reference Links
|
Steve,
you may know the start of cond1, but, how do you know the end of
cond1 ?
For example, after a sequence B,B,S,B,S,S, you may have another Sell
and then another Sell etc. The Sell sequence will come to an end with
the first Buy. Then you will "know" that the Sell some bars ago was
the last Sell.
Exrem will eliminate all intermediate repetitions.
Note also that exrem() works with ANY cond1, cond2, not only with
Buy/Sell
DT
--- In amibroker@xxxxxxxxxxxxxxx, "Steve Davis" <sdavis@xxxx> wrote:
> try this:
>
> startOfCond1 = ...
> endOfCond1 = ...
>
> cond1 = flip(startOfCond1, endOfCond1);
> cond2 = ...
>
> detection = cond1 && cond2;
> -----Original Message-----
> From: funnybiz@xxxx [mailto:funnybiz@x...]
> Sent: Monday, March 24, 2003 12:04 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Sequence of two conditions
>
>
> 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
> ADVERTISEMENT
>
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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 the Yahoo! Terms of
Service.
------------------------ 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/
|