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

RE: [amibroker] How to access quote date array in AFL?



PureBytes Links

Trading Reference Links

Trouble when I get to thinking about something I tend to see different ways
of doing something
Here is something to try
AddTextColumn(StrRight(WriteVal(DateNum(),1),2)+"/"+StrRight(WriteVal(Prec(D
ateNum()/100,0),1),2)+"/"+StrRight(WriteVal(Prec(DateNum()/10000,0)+1900,1),
2),"");

For yesterday etc replace Datenum() with ref(Datenum(),-1)

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

-----Original Message-----
From: Graham [mailto:gkavanagh@xxxxxxxxxxxxx] 
Sent: Sunday, 27 April 2003 3:56 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] How to access quote date array in AFL?

Try this, then you just need to add some iif statements (or writeif( )) to
change the months etc when they change for tomorrow or yesterday
AddTextColumn(WriteVal(Ref(Day(),-1),1) + "/" + WriteVal(Month(),1) + "/" +
StrRight(WriteVal(Year(),1),2),"");     //yesterday
AddTextColumn(WriteVal(Day(),1) + "/" + WriteVal(Month(),1)+ "/" +
StrRight(WriteVal(Year(),1),2),"");                              //today

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

-----Original Message-----
From: uenal.mutlu@xxxxxxxxxxx [mailto:uenal.mutlu@xxxxxxxxxxx] 
Sent: Sunday, 27 April 2003 3:45 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] How to access quote date array in AFL?

Thanks Graham. 
It would be good if there were also another function 
which either gives dates in "usual" format (as string)
or converts the Datenum() result to a "normal" date field
much like in the same format like the 2nd column (Date) 
which gets autom. added to the results table. Ie. using
the users regional settings.
UM

----- Original Message ----- 
From: "Graham" <gkavanagh@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, April 27, 2003 9:33 AM
Subject: RE: [amibroker] How to access quote date array in AFL?


> Datenum() is the way to do that the easiest
> Ref(datenum(),-1)
> Ref(datenum(),1)
> 
> Cheers,
> Graham
> http://groups.msn.com/ASXShareTrading
> http://groups.msn.com/FMSAustralia
> 
> -----Original Message-----
> From: uenal.mutlu@xxxxxxxxxxx [mailto:uenal.mutlu@xxxxxxxxxxx] 
> Sent: Sunday, 27 April 2003 3:24 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] How to access quote date array in AFL?
> 
> Hi,
> I would like to put the "previous" and "next" date (ie. using Ref(d,n))
> to the results table in Explore mode using AddColumn() or AddTextColumn().
> How can I in AFL access the date of a quotation much
> like with the Open,High,Low,Close,OpenInterest fields?
> UM




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/ 



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/AG3JAA/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/