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

RE: [amibroker] Sequence of two conditions



PureBytes Links

Trading Reference Links




<SPAN 
class=181005522-24032003>Markus,
<SPAN 
class=181005522-24032003> 
The 
Flip() function keeps a signal active for every bar between the specified start 
and end of the signal.
The 
Exrem() function does the opposite. It makes a signal active only on the first 
occurance.
<SPAN 
class=181005522-24032003> 
Oops, 
replace && with AND. Sorry, I sometimes confuse the operators in 
different programming languages.
<SPAN 
class=181005522-24032003> 
<SPAN 
class=181005522-24032003>Perhaps this will work for you now:
<SPAN 
class=181005522-24032003> 
startOfCond1 = 
...endOfCond1 = ...
 
startOfCond2 = 
...endOfCond2 = ... cond1 = flip(startOfCond1, 
endOfCond1);cond2 = exrem(startOfCond2, endOfCond2); detection 
= cond1 AND cond2;
<SPAN 
class=181005522-24032003>Cheers,
<SPAN 
class=181005522-24032003>-Steve

  <FONT face=Tahoma 
  size=2>-----Original Message-----From: funnybiz@xxxxxx 
  [mailto:funnybiz@xxxxxx]Sent: Monday, March 24, 2003 4:59 
  PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
  Sequence of two conditions
  Steve,
   
  what is the flip function trying to acomplish in 
  this context?
   
  Plus, what does the double "&&" function, 
  please?
   
  Markus
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    Steve 
    Davis 
    To: <A 
    href="" 
    title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
    Sent: Monday, March 24, 2003 9:10 
    PM
    Subject: RE: [amibroker] Sequence of 
    two conditions
    
    <SPAN 
    class=342020920-24032003>try this:
    <SPAN 
    class=342020920-24032003> 
    <SPAN 
    class=342020920-24032003>startOfCond1 = ...
    <SPAN 
    class=342020920-24032003>endOfCond1 = ...
    <SPAN 
    class=342020920-24032003> 
    <SPAN 
    class=342020920-24032003>cond1 = flip(startOfCond1, 
    endOfCond1);
    <SPAN 
    class=342020920-24032003>cond2 = ...
    <SPAN 
    class=342020920-24032003> 
    <SPAN 
    class=342020920-24032003>detection = cond1 && 
    cond2;
    
      <FONT face=Tahoma 
      size=2>-----Original Message-----From: <A 
      href="">funnybiz@xxxxxx 
      [mailto:funnybiz@xxxxxx]Sent: Monday, March 24, 2003 12:04 
      PMTo: <A 
      href="">amibroker@xxxxxxxxxxxxxxxSubject: 
      [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
       
      MarkusSend 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. 
    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


  ADVERTISEMENT









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.