PureBytes Links
Trading Reference Links
|
Peter,
Peter,
A simple solution was to create in EXCEL a new ticker like
<TICKER>,<DDMMYYY>,<OPEN>,<HIGH>,<LOW>,<CLOSE>,<VOL>
CALCOUNTER,1/1/2000,1,1, 1,1,1
CALCOUNTER,2/1/2000,1,1, 1,1,2
CALCOUNTER,3/1/2000,1,1, 1,1,3
CALCOUNTER,4/1/2000,1,1, 1,1,4
CALCOUNTER,5/1/2000,1,1, 1,1,5
CALCOUNTER,6/1/2000,1,1, 1,1,6
CALCOUNTER,7/1/2000,1,1, 1,1,7
CALCOUNTER,8/1/2000,1,1, 1,1,8
...
adding +1 for every new date in Volume field and import it.
Now, in IB I have two counters, the trading and the calendar days with
Plot(Cum(1),"TRADING DAYS",1,1);
CAL=Foreign("CALCOUNTER","V");
Plot(CAL,"CALENDAR DAYS",4,8);
It requires the minimum [IMO] coding background.
Its use has only historical value after the DayOfYear() built-in
function.
Will you visit Greece this summer ?
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "bluesinvestor" <investor@xxxx>
wrote:
> Dimitris and Ken,
>
> Also see http://groups.yahoo.com/group/amibroker/message/39320 ...
>
> Regards,
> Peter
>
> -----Original Message-----
> From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
> Sent: Wednesday, April 30, 2003 4:18 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Calendar Dates vs Trading Dates
>
> Ken,
> as I wrote, the code is not perfect, missing some weekends falling
on
> the beginning of the month. It was the first idea. But, in the mean
> time, a new DayOfYear function is available to make these
> calculations dirrect and simple.
> DT
> --- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> wrote:
> > DT: thanks for the code....I will now compare it to the "slightly"
> > longer Julian code that Bob J shared and see what happens.
> >
> > Ken
> >
> > -----Original Message-----
> > From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
> > Sent: Wednesday, April 30, 2003 6:23 AM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: Calendar Dates vs Trading Dates
> >
> > Ken,
> > the exploration [select current stock from Jan04, 2000 till now]
> >
> > x=1+DateNum()-ValueWhen(Cum(1)==1,DateNum());
> > Cond=x-Ref(x,-1)>10;
> > diff=Cum(Cond*(x-Ref(x,-1)));
> > Counter=x-diff+(Year()-2000)*12+Month()-1;
> > Filter=1;
> > AddColumn(Counter,"COUNTER",1.0);
> > gives a good [not perfect yet] calendar counter.
> > DT
> > > -----Original Message-----
> > > From: Ken Close [mailto:closeks@x...]
> > > Sent: Tuesday, April 29, 2003 4:26 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: RE: [amibroker] Calendar Dates vs Trading Dates
> > >
> > >
> > > Thanks Bob. I hope I get something more specific. I imagine
there
> is
> > > some manipulation of the DateNum() function but I have not been
> > able to
> > > figure it out.
> > >
> > > Ken
> > >
> > > -----Original Message-----
> > > From: Bob Jagow [mailto:bjagow@x...]
> > > Sent: Tuesday, April 29, 2003 4:34 PM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: RE: [amibroker] Calendar Dates vs Trading Dates
> > >
> > > I don't believe AB has a clue re calendar vs. trading days; you
> > need the
> > > difference in Julian days.
> > > If you don't want to use a JDay dll and only need to know, for
> > example,
> > > when the .75% Fido commission expires, consider a 30 days
> > > has Sept.... lookup.
> > >
> > > Bob
> > >
> > > -----Original Message-----
> > > From: Ken Close [mailto:closeks@x...]
> > > Sent: Tuesday, April 29, 2003 1:10 PM
> > > To: AmiBroker List
> > > Subject: [amibroker] Calendar Dates vs Trading Dates
> > >
> > >
> > > Help....I want to count the number of calendar days since a buy
or
> > > short...
> > >
> > > I have read msg # 16104 about creating a For loop inside a
> Jscript,
> > but
> > > frankly can not understand what it is advising.
> > >
> > > Can someone show me a simple way to determine the number of
> calendar
> > > days that have elapsed? Maybe the new For loop can help?
> > >
> > > I want to code in a "close trade" flag if there are more than x
> > number
> > > of calendar days since the trade was initiated. Because of
other
> > > aspects of the code, I do not want to (can not) use the dll
time
> > stop
> > > that is in the files area.
> > >
> > > Any help would really be appreciated.
> > >
> > > Ken
> > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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
> > >
> > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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
> > >
> > > Your use of Yahoo! Groups is subject to
> > > http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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
> > >
> > > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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
> >
> > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
>
>
>
> Send BUG REPORTS to bugs@xxxx
> Send SUGGESTIONS to suggest@xxxx
> -----------------------------------------
> 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
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/KXUxcA/fNtFAA/uetFAA/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
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|