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

[amibroker] Re: Calendar Dates vs Trading Dates



PureBytes Links

Trading Reference Links

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/


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading!
Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/cjB9SD/od7FAA/AG3JAA/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/