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

Re: [amibroker] Re: Determining cycles



PureBytes Links

Trading Reference Links

Herman,
Note here that, since Now() Returns current date,
a. For me [European date] it is a Sunday morning and I read 1040208.
b. It has nothing to do with trading bars.
c. Now() IS NOT A UNIVERSAL FUNCTION, some hours od the day Yuki will 
read 1040209 and I will still read 1040208.
d. Now(3)-LastValue(DateNum()) for Saturdays will be equal to 1, for 
Sundays will be equal to 2 and for the regular trading days will be 
equal to 1 or 0 [if you hit apply before 24:00 of a trading day will 
be equal to 0, at 00:01 will be 1]
Dimitris Tsokakis
PS. Nice title !!
--- In amibroker@xxxxxxxxxxxxxxx, "Herman van den Bergen" 
<psytek@xxxx> wrote:
> 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?
> 
>   function DayString( D )
>      {
>      DayNames 
= "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday";
>      return    StrExtract(DayNames, D);
>      }
> 
>   TodaysWeekDay = DayString(Now(3)-LastValue(DateNum())); // <<<< 
WRONG -
> HELP NEEDED!!!
> 
>   LastDataWeekDay =
> DayString(LastValue(ValueWhen(BarIndex()==(BarCount-1),DayOfWeek
())));
>   LastDataDate = LastValue(DateTime());
> 
>   Title =    "Today's Date: "+TodaysWeekday+" "+Now(1)+
>         "\nLast Data: "+LastDataWeekDay+"
> "+NumToStr(LastDataDate,formatDateTime);
> 
> many thank!
> 
> herman



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 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:
     http://docs.yahoo.com/info/terms/