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

RE: [amibroker] ValueWhen



PureBytes Links

Trading Reference Links

x=barssince(condition)==5 and c < valuewhen(condition,c);
 
Anthony
 
-------Original Message-------
 
From: amibroker@xxxxxxxxxxxxxxx
Date: Wednesday, April 30, 2003 11:03:00 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] ValueWhen
 
Rick,
Change your condition to include your new filter.......
 
x=barssince(condition)==5 and c<ref(c,-1) 
 
Jayson 
-----Original Message-----
From: ricko8294_98 [mailto:ricko@xxxxxxxxxx]
Sent: Wednesday, April 30, 2003 5:18 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] ValueWhen
 
 
I am trying to write code which will count the number of times a 
situation occurred across the price data range.
 
For example = I know how to count the occurance of a "condition" by 
using 
 
count = CUM(condition);
 
I want to find, for only those bars where "condition" was true, how 
many times the close, 5 days later, was lower.
 
when I try
 
  testcount = CUM(ValueWhen(C < Ref(condition,-5),C,1));
 
the result is considerably higher than the number of times the 
condition was true. - not a count of the number of times the "test" 
was true.
 
Any help would be most appreciated
 
Rick
 
 
 
 
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. 
 
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. 
 
 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/KXUxcA/fNtFAA/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/