PureBytes Links
Trading Reference Links
|
Here is one response, hope it helps.
Markus
----- Original Message -----
From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, April 28, 2003 11:16 AM
Subject: [amibroker] Re: Resetting counter
Here is two IB alternatives
Cond=MACD()>Signal();// put your condition here
CondCounter=IIf(Cond,BarsSince(NOT(Cond)),0);
Plot(Cond,"Cond",1,2);Plot(CondCounter,"CondCounter",4,1);
Cond=MACD()>Signal();// put your condition here
CondCounter=Cond*BarsSince(NOT(Cond));
Plot(Cond,"Cond",1,2);Plot(CondCounter,"CondCounter",4,1);
DT
--- In amibroker@xxxxxxxxxxxxxxx, "IVA GmbH" <funnybiz@xxxx> wrote:
> Hello,
>
> Iīm in search of a code for a code that acts like a counter: it
counts the consecutive bars that a condition is met and resets back
to zero every time a condition is NOT met.
>
> For instance, I want to count the number of consecutive bars that
are greater than bar # 1,000 and that have a higher low than (say
100).
>
> Every time the above condition is NOT met the counter should be
reset to zero and start counting the bars again when the condition
takes place.
>
> I thought of flip function but still canīt get it together...
>
> Markus
>
>
>
>
> but somehow canīt get it to work
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/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/aM1XQD/od7FAA/uetFAA/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/
|