That's not a restriction. Define when you start
in the buy statement - e.g., buy = iif(time >= timestart and (buy
condition), 1, 0)
Bill
----- Original Message -----
Sent: Wednesday, June 13, 2007 9:35
AM
Subject: Re: [amibroker] question about
counting signals
Thanks bill, But this is an intraday system, and I
want to count from the start of the day, rather than from the start of all the
data.
Itmwh
----- Original Message -----
Sent: Tuesday, June 12, 2007 11:36 PM
Subject: Re: [amibroker] question about
counting signals
How about -
buy = ...
plot(cum(buy), ...
Bill
----- Original Message -----
Sent: Tuesday, June 12, 2007 10:49
AM
Subject: [amibroker] question about counting
signals
>I am trying to count buy signals with the following code . At the
> beginning of the trading day ( session start time 8:30 am) , I set
> the buynum to zero. > > The following code
works find ,except that the plotted signal always > comes one bar
later than the actual buy signal occurs. > > > Could
someone advise me what may be the cause ? > > >
//=========count buy signals================== > >
Buynum[0]=0; > t=TimeNum(); > > for(i=1; i<BarCount;
i++) { > > > if( T[i]==083000) >
> { > Buynum[i]=0; >
> } > > else >
> { if (Buy[i]==1 ) >
>
buynum[i]
=Buynum[i-1]+1; >
else >
>
Buynum[i]=Buynum[i-1]; >
> } > > } >
> Plot(Buynum,"Buy signal
Number",colorRed,styleOwnScale,-1,35,1); > > >
> > > > > > > >
> 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:amibroker-digest@xxxxxxxxxps.com > mailto:amibroker-fullfeatured@yahoogroups.com> > <*> To unsubscribe from this group, send an email
to: > amibroker-unsubscribe@xxxxxxxxxxxxcom> > <*> Your use of Yahoo! Groups is subject
to: > http://docs.yahoo.com/info/terms/> > > > -- > No virus found in
this incoming message. > Checked by AVG Free Edition. >
Version: 7.5.472 / Virus Database: 269.8.13/844 - Release Date: 6/11/2007
5:10 PM > >
我正在使用对个人用户设计的免费版SPAMfighter. 至今为止, 653
封垃圾邮件已被移走. 这则消息不会出现在付费的用户中. 现在就免费试用 SPAMfighter !
No virus found in this incoming message. Checked by AVG Free
Edition. Version: 7.5.472 / Virus Database: 269.8.15/845 - Release Date:
6/12/2007 6:39 AM
__._,_.___
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
SPONSORED LINKS
__,_._,___
|