PureBytes Links
Trading Reference Links
|
this should be what your after from the help menu
you may have to specify each month for your test period
Buy = ( <FONT
face="Courier New" color=#0000ff size=2>Month<FONT face="Courier New"
size=2>() == <FONT face="Courier New" color=#ff00ff
size=2>1 ) AND <FONT
size=2>(<FONT face="Courier New" color=#0000ff
size=2>Day() == <FONT color=#ff00ff
size=2>1) OR
( <FONT face="Courier New" color=#0000ff
size=2>Month() == <FONT
color=#ff00ff size=2>2 ) AND
(Day<FONT
face="Courier New" size=2>() == <FONT face="Courier New"
color=#ff00ff size=2>1) <FONT
size=2>OR
( <FONT face="Courier New" color=#0000ff
size=2>Month() == <FONT
color=#ff00ff size=2>3 ) AND
(Day<FONT
face="Courier New" size=2>() == <FONT face="Courier New"
color=#ff00ff size=2>1) <FONT
size=2>OR
( <FONT face="Courier New" color=#0000ff
size=2>Month() == <FONT
color=#ff00ff size=2>4 ) <FONT
size=2>AND (<FONT
face="Courier New" color=#0000ff size=2>Day<FONT face="Courier New"
size=2>() == <FONT face="Courier New" color=#ff00ff
size=2>1) <FONT
size=2>;
Sell = 0<FONT
size=2>;
DATENUM (AFL 1.4)
SYNTAX
datenum()
RETURNS
ARRAY
FUNCTION
Returns the array with numbers that represent quotation
dates coded as follows: 10000 * (year - 1900) + 100 * month + day, so
2001-12-31 becomes 1011231 and 1995-12-31 becomes 951231
EXAMPLE
datenum();
or
<FONT
color=#ffffff>MONTH (AFL 1.4)
SYNTAX
<FONT
color=#ffffff>month()
RETURNS
ARRAY
FUNCTION
Returns the array with <FONT
color=#ffffff>months(1-12)
EXAMPLE
buy = ( <FONT
color=#ffffff>month() == 1 ) and day < 3; // buy in
January
DAY (AFL 1.4)
SYNTAX
day()
RETURNS
ARRAY
FUNCTION
Returns the array with days (1-31)
EXAMPLE
writeif( day() < 3, "Beginning of the month", "The rest
of the month" );
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=knewhous@xxxx
href="">knewhous
To: <A title=amibroker@xxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, April 28, 2002 1:07
PM
Subject: [amibroker] Day of the
month.
Hi Group,Can anyone advise me how to code the
condition - Buy on the first day of the month.In Metastock it
would be "DayOfMonth()=1". Can anyone advise the equivalent in
AB.Thanks and regards,Keith
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
<BLOCKQUOTE
><FONT
face="Courier New">---Outgoing mail is certified Virus
Free.Checked by AVG anti-virus system (<A
href="">http://www.grisoft.com).Version: 6.0.351
/ Virus Database: 197 - Release Date:
4/19/2002
|