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

[amibroker] Re: Now Function - system date



PureBytes Links

Trading Reference Links

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@xxx> 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
> > >
> > >
> > >
> > >
> > >
> >
>




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