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

Re: [amibroker] Re: Now Function - system date



PureBytes Links

Trading Reference Links

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 <ytse12@xxxxxxxxx> 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 amibroker@xxxxxxxxxxxxxxx, "Fred"
> <ftonetti@xxx> 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 amibroker@xxxxxxxxxxxxxxx, "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 amibroker@xxxxxxxxxxxxxxx, 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


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006