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

RE: [amibroker] Re: AFL help



PureBytes Links

Trading Reference Links

1      d1=Barssince(condp,1);
 2      fp=valuewhen(condp,H,1);
3a would need a loop I think, sorry haven't time to put one together, or
simply use the valuewhen and max to check last 2 occurences, you can add
more lines for more prior occurrences, or as I said a for and if loop would
do the job. Maybe someone quicker at it than me could help there.

       fp2=valuewhen(condp,H,2);
       fp3=valuewhen(condp,H,3);
       fpmax = max(fp2,fp3);
       fphigher = iif(fpmax>fp,fpmax,fp);

3b
       lastfp =  barssince(condp);
       priorfp = barssince(condp==fpmax);


I haven't checked these so they may not be exactly what you are looking for

Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia

-----Original Message-----
From: epintoem [mailto:epintoem@xxxxxxxxx] 
Sent: Tuesday, 6 May 2003 8:00 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: AFL help

kindly correct if I am wrong...Thanks
--- In amibroker@xxxxxxxxxxxxxxx, "Graham" <gkavanagh@xxxx> wrote:
> 1. BarsSince
      d1=Barssince(condp,1)>0

> 2. ValueWhen
       fp=valuewhen(condp,1)>0
> 3 a ValueWhen and Ref and BarsSince
       am stuck?
> 3b BarsSince and Valuewhen
> Use of these is in the help files
> 
> 
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
> 
> -----Original Message-----
> From: epintoem [mailto:epintoem@x...] 
> Sent: Tuesday, 6 May 2003 7:41 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] AFL help
> 
> Here is a condition
> 
> condT=Ref(L,-2) >= Ref(L,-1) AND L>Ref(L,-1) AND
Ref(L,-1)<Ref(Close,-3);
> 
> what is the code that I would assign that would tell me 
> 
> 1. number of bars since that condition was true
> 2. Value of high when that condition is true
> 3. a. Value of high when the condition was true previously and higher
> than the most recent occurrence.
>    b. the number of bars between the most recent occurrence of
> Condition and the Next most recent occurrence where the high was
> greater than the most recent occurrence.
> 
> TIA
> 
> 
> 
> 
> 
> 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
http://docs.yahoo.com/info/terms/



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/O10svD/Me7FAA/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/