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

Re: [amibroker] Resetting counter



PureBytes Links

Trading Reference Links




TJ,
 
Iīll try out your suggestion and will re-study the 
mentioned chapter!
 
Many thanks
 
Markus
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Tomasz Janeczko 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Tuesday, April 29, 2003 4:36 
  PM
  Subject: Re: [amibroker] Resetting 
  counter
  
  
  Markus,
   
  The answer is very short:
   
  YourCondition = Close > ValueWhen( BarIndex() == 1000, 
  Close ) AND Low > 100;
   
  Counter = BarsSince( NOT YourCondition );
  
      
  BTW: I suggest to read "Tutorial: Understanding how AFL 
  works" 
   
  Best regards,Tomasz Janeczkoamibroker.com
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    IVA GmbH 
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">Amibroker (Yahoo-Forum) 
    Sent: Monday, April 28, 2003 1:11 
    AM
    Subject: [amibroker] Resetting 
    counter
    
    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 
    workSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend 
    SUGGESTIONS to 
    suggest@xxxxxxxxxxxxx-----------------------------------------Post 
    AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: 
    <A 
    href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
    group FAQ at: <A 
    href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
    Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.