PureBytes Links
Trading Reference Links
|
Herman,
As for Last bar date you managed to do what you
wanted
Just for completeness: There is a function called
DayOfWeek():
<FONT face=Arial
color=#ff0000>function<FONT
color=#000000> DayString( D ) {
DayNames = <FONT
color=#ff00ff>"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"<FONT
size=2>; <FONT
color=#ff0000>return
<FONT
color=#0000ff>StrExtract<FONT face=Arial
color=#000000>(DayNames, D); }
LastBarDayOfWeek = DayString( LastValue( DayOfWeek)
);
As for today's weekday name:
EnableScript<FONT
color=#000000>("jscript"<FONT
face="Courier New">); <% d = new <FONT
color=#0000ff>Date();
AFL("tweek"<FONT
face="Courier New"> ) = d.getDay(); %>
function<FONT
face="Courier New"> DayString( D ) {
DayNames = <FONT
color=#ff00ff>"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"<FONT
face="Courier New">; <FONT
color=#800000>return<FONT
color=#000000> <FONT
color=#0000ff>StrExtract<FONT face="Courier New"
color=#000000>(DayNames, D); } DayString(tweek);
Hope this helps.
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Herman van den
Bergen
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">AmiBroker
Sent: Sunday, February 08, 2004 8:24
AM
Subject: [amibroker] When every day is
Saturday...
Hello,
I would like to
show the names of days for today and the last data
bar on some of my charts. Can somebody help me complete code for
Today's Weekday?
<FONT
color=#ff0000>function<FONT
face=Arial> DayString( D )
{ DayNames = <FONT
color=#ff00ff>"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday"<FONT
face=Arial>;
return<FONT
color=#000000> <FONT
color=#0000ff>StrExtract<FONT
size=2>(DayNames, D); }
TodaysWeekDay = DayString(Now<FONT
color=#000000>(3<FONT
color=#000000>)-LastValue<FONT
color=#000000>(DateNum<FONT
color=#000000>())); // <<<< WRONG
- HELP NEEDED!!!<FONT
color=#000000> <FONT
face=Arial>LastDataWeekDay =
DayString(LastValue<FONT
color=#000000>(ValueWhen<FONT
color=#000000>(BarIndex<FONT
color=#000000>()==(BarCount<FONT
color=#000000>-1<FONT
color=#000000>),<FONT
color=#0000ff>DayOfWeek<FONT
size=2>()))); LastDataDate = <FONT
color=#0000ff>LastValue(<FONT
color=#0000ff>DateTime<FONT
size=2>()); <FONT
color=#ff0000>Title =
"Today's Date: "<FONT
color=#000000>+TodaysWeekday+" "<FONT
color=#000000>+Now<FONT
color=#000000>(1<FONT
face=Arial>)+
"\nLast
Data: "+LastDataWeekDay+<FONT
color=#ff00ff>" "+<FONT
color=#0000ff>NumToStr(LastDataDate,<FONT
color=#ff0000>formatDateTime);
many thank!
hermanSend 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
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
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|