I may have missed something, but if you just want to know what the numeric value of today is, why not just use x = Day();
If you just want a "day number" that increases by 1 as each day passes, why not use x = cum(1); According to the help file, the Now() function gets "current" system date/time (emphasis added). Rick --- ytse12 <[EMAIL PROTECTED]> wrote: > Nah, that won't do. Barindex is no good. How will > you convert > Nowfunction into a barindex reference ? I need to > get a unique > number which can relate to Now function and that > unique number needs > to increment by one everyday. The problem is that at > the end of the > month, datenum for Now function increments by 70. > > I know how to get around it, but I just wanted to > know if there is a > simpler way to solve this problem. > > --- In [email protected], "Fred" > <[EMAIL PROTECTED]> wrote: > > > > If all you are wanting is relative zero bar number > and you are > using > > EOD data then BarIndex() should suffice ... > > > > If you are using intraday data then you can > construct your own > date > > oriented one i.e. > > > > DateNdx = Cum(IIf(DateNum() == Ref(DateNum(), -1), > 0, 1)); > > > > --- In [email protected], "ytse12" > <ytse12@> wrote: > > > > > > Thanks Graham for the feedback. Is there a > numeric function > which > > > has a continuity in evaluating dates from one > month to another > so > > > that you don't need to count a 70 increment jump > ? > > > > > > Right now, I had to do a lot of hoopla to take > this end of the > > month > > > increment into consideration. Thanks. > > > > > > > > > > > > --- In [email protected], Graham > <kavemanperth@> wrote: > > > > > > > > You are using the Datenum() format > > > > 1061031 = 106 10 31 ie 31st Oct 2006 > > > > > > > > -- > > > > Cheers > > > > Graham > > > > AB-Write >< Professional AFL Writing Service > > > > Yes, I write AFL code to your requirements > > > > http://www.aflwriting.com > > > > > > > > On 02/11/06, ytse12 <ytse12@> wrote: > > > > > > > > > > I've tried using the Now Function and having > some problems > with > > > it. > > > > > When I use it in the middle of the month, > the numeric value > > > > > increments by one as each day passes by. But > when it > switches > > to > > > a > > > > > different month, the numeric value > increments suddenly by 70 > > > after a > > > > > single day. For example, today's numeric > value for Nov 1, > 2006 > > > is 1 > > > > > 061 101, while yesterday's (Oct 31, 2006) > numeric value is 1 > > 061 > > > 031 > > > > > which gives a difference of 70. On other > days of the month, > the > > > > > increment is 1 for each day that goes by. > > > > > > > > > > That's obviously a huge problem if u're > using the Now > function > > > to do > > > > > some date checking . > > > > > > > > > > > > > > > > > > > > When I switch my system date back in time, > it seems that > this > > is > > > a > > > > > repeatable behavior. Everytime, date jumps > to the next > month, > > the > > > > > Now function numeric value increments by 70. > > > > > > > > > > Has anyone else had this problem and know a > way around this ? > > > > > > > > > > Thanks for any feedback. > > > > > > > > > > > > > > > > > > > > > > > > > Please note that this group is for > discussion between users > > only. > > > > > > > > > > To get support from AmiBroker please send an > e-mail directly > to > > > > > SUPPORT {at} amibroker.com > > > > > > > > > > For NEW RELEASE ANNOUNCEMENTS and other news > always check > > DEVLOG: > > > > > http://www.amibroker.com/devlog/ > > > > > > > > > > For other support material please check > also: > > > > > http://www.amibroker.com/support.html > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Rick Osborn & Associates 885 Sorrento Ave. Oshawa, Ontario L1J 6V6 (905) 728-8543 fax 728-0815 Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG: http://www.amibroker.com/devlog/ For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
