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

RE: [amibroker] Re: Determining cycles



PureBytes Links

Trading Reference Links

Clever DT :-)

thank you, I think I'll use that approach!

herman.

-----Original Message-----
From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@xxxxxxxxx]
Sent: Sunday, February 08, 2004 5:15 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: When every day is Saturday...


Herman,
You will have the answer if the stock has had [at least] one trading
bar the last week.
Else ...

d=DateNum();Ld=LastValue(DateNum());
y=Now(3)-Ld;
z=LastValue(DayOfWeek());
zz=z+y;
Title=WriteIf(ZZ<=7,"Today is ","Try another stock")+
WriteIf(ZZ==7,"SUN",
WriteIf(ZZ==6,"SAT",
WriteIf(ZZ==5,"FRI",
WriteIf(ZZ==4,"THU",
WriteIf(ZZ==3,"WED",
WriteIf(ZZ==2,"TUE",
WriteIf(ZZ==1,"MON","")))))));

Dimitris Tsokakis

--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
wrote:
> 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









------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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 
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/