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

RE: [amibroker] Please help!!



PureBytes Links

Trading Reference Links


<SPAN 
class=517260218-28102002>Markus,
<SPAN 
class=517260218-28102002> 
Since 
you cannot use Date() in an exploration perhaps you could live 
with....
<SPAN 
class=517260218-28102002> 
<SPAN 
class=517260218-28102002>
AddColumn(<FONT 
color=#0000ff>BarsSince(b <FONT 
color=#000000>AND <FONT 
color=#000000>C),<FONT 
color=#ff00ff>"condition date"<FONT 
color=#282828>);
the 
alternative would be to use Datenum() but I find the format to be a bit 
challenging as it is different then the usual 10/21/02 format 
.
datenum 
would return this as 1021021 where 102 is the year 2002 , 10 is the month and 21 
the day. 
not what 
you want but perhaps something you can 
adapt.....
 
Jayson 

<FONT face=Tahoma 
size=2>-----Original Message-----From: funnybiz@xxxx 
[mailto:funnybiz@xxxx]Sent: Monday, October 28, 2002 9:43 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Please 
help!!

Dear folks, 
I have two questions regarding the code below, if you 
care:
 
1./ I need to find out when a given condition happens 
in relation to its bar number, i.e. I -letīs say- want to find out where a 
condition happens closest to bar number 1000. Can I use the iif-function with 
"true result" being a cum-fun function which has multiple values.
 
2./ when I use this scan, I seem to get the proper 
results in terms of the low value and bar number, but the date Iī, given is 
always the last barīs date INSTEAD of the dateīs bar when the conditon happens. 
How can I get the conditionīs bar date, please?
Sorry for my ignorance and the waste of your 
time<g>.
Markus
 - - - - - - - - - - 
 
A=<FONT color=#0000ff 
face="Courier New">IIf<FONT color=#000000 
face="Courier New">(Low<<FONT color=#0000ff 
face="Courier New">Ref<FONT color=#000000 
face="Courier New">(Low,-<FONT color=#ff00ff 
face="Courier New">1),<FONT 
color=#0000ff face="Courier New">Cum<FONT color=#000000 
face="Courier New">(1<FONT 
color=#000000 face="Courier New">),<FONT color=#ff00ff 
face="Courier New">0);
B=A<1000<FONT 
color=#000000 face="Courier New">;
C=A>0<FONT 
color=#000000 face="Courier New">;
Filter=1<FONT 
color=#000000 face="Courier New">;<FONT color=#0000ff 
face="Courier New">
AddColumn(<FONT 
color=#0000ff face="Courier New">Cum<FONT color=#000000 
face="Courier New">(1<FONT 
color=#000000 face="Courier New">),<FONT color=#ff00ff 
face="Courier New">"total barnumber"<FONT color=#000000 
face="Courier New">,<FONT color=#ff00ff 
face="Courier New">1.3<FONT color=#000000 
face="Courier New">);
AddColumn(<FONT 
color=#0000ff face="Courier New">ValueWhen<FONT color=#000000 
face="Courier New">(B AND C,Low,<FONT color=#ff00ff 
face="Courier New">2),<FONT 
color=#ff00ff face="Courier New">"low"<FONT color=#000000 
face="Courier New">,<FONT color=#ff00ff 
face="Courier New">1.3<FONT color=#000000 
face="Courier New">);
AddColumn(<FONT 
color=#0000ff face="Courier New">ValueWhen<FONT color=#000000 
face="Courier New">(B AND C,<FONT color=#0000ff 
face="Courier New">Cum<FONT color=#000000 
face="Courier New">(1<FONT 
color=#000000 face="Courier New">),<FONT color=#ff00ff 
face="Courier New">2),<FONT 
color=#ff00ff face="Courier New">"condition bar number"<FONT 
color=#000000 face="Courier New">,<FONT color=#ff00ff 
face="Courier New">1.3<FONT color=#000000 
face="Courier New">);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.