AmiBroker 4.85.0 Beta Read Me
August 15, 2006 21:31
THIS IS A BETA VERSION OF THE SOFTWARE. EXPECT BUGS !!!
Backup your data files and entire AmiBroker folder
first!
INSTALLATION INSTRUCTIONS
IMPORTANT: This archive is update-only. You have to install full version
4.80 first.
Just run the installer and follow the instructions.
Then run AmiBroker. You should see "AmiBroker 4.85.0 beta" written
in the About box.
See CHANGE LOG below for detailed list of changes.
CHANGE LOG
CHANGES FOR VERSION 4.85.0 (as compared to 4.84.0)
- AFL: Added DateTimeConvert function (FC#: 297)
DateTimeConvert( format, date, time = Null )
The function allows to convert from
DateTime format to DateNum and TimeNum and vice versa.
format parameter controls
the direction of conversion:
format = 0 - converts DateTime format to DateNum
format, example
mydatenum = DateTimeConvert( 0, DateTime()
);// - this returns DateNum
date argument should be in datetime formattime argument in this case
should not be used
format = 1 - converts DateTime format to TimeNum format, example:
mytimenum = DateTimeConvert( 1, DateTime()
); // - returns timenum
date argument should be in datetime formattime argument in this case should
not be used
format = 2 - converts from DateNum and optionally TimeNum to DateTime
format, example:
mydatetime = DateTimeConvert( 2, DateNum(), TimeNum()
);
date argument should be in datenum formattime argument (optional) should be
in timenum format. In case of EOD data you can skip time argument:
mydatetime = DateTimeConvert( 2, DateNum()
);
- K-ratio is now reported with
4 decimal places (FC#: 357)
- Added 'left side' display
option to horizontal line labels and fixed problem with label sometimes
disappearing (completed: 2006-08-15) (FC#: 342)
- AFL: fgetstatus( filename,
what, format = 0 )
Implemented
fgetstatus( filename, what, format = 0 )
function that retrieves file properties/status.
Returns NUMBER or STRING depending
on format parameter
If file does not exist it returns Null.
Parameters:
filename - the name of the file (with or without full path) to query
what - specifies what file property to retrieve, allowable values
0 - the date/time the file was created
1 - the date/time the file was last modified
2 - the date/time the file was last accessed for reading
3 - the file size in bytes
4 - attribute byte of the file
format - specifies return format of date/time
values (format specifications are the same as in Now() function):
allowed values:
0 - returns string containing date/time formatted according to system
settings
1 - returns string containing date only formatted according to system settings
2 - returns string containing time only formatted according to system settings
3 - returns DATENUM number with date
4 - returns TIMENUM number with time
5 - returns DATETIME number with date/time
6 - returns date DAY (1..31)
7 - returns date MONTH (1..12)
8 - returns date YEAR (four digit)
9 - returns date DAY OF WEEK (1..7, where 1=Sunday, 2=Monday, and so on)
10 - returns date DAY OF YEAR (1..366)
Note that Windows supports only 2 second
resolution of file date/time stamps.
Example:
// get modification date
string of portfolio.afl file
fgetstatus("formulas\\Equity\\portfolio.afl",1,0);
- AFL: GetTradingInterface uses WaitForInputIdle now instead of fixed interval
wait when launching IB interface
- Disabled snapping
to pixel resolution after manual editing of drawings #32071
CHANGES FOR VERSION 4.84.0 (as compared to 4.83.1)
- Added GradientFillSlow code to support gradients on printers and metafiles
which do not support them natively (completed: 2006-07-28)
- Added GraphGridZOrder
variable to control when grid lines are plotted (completed: 2006-07-31)
(ext.ID: 351)
When you specify
GraphGridZOrder = 1;
then grid lines are plotted on top of any charts
- AFL: new function RequestTimedRefresh(
interval, onlyvisible = True ) (completed: 2006-08-06)
RequestTimedRefresh( interval, onlyvisible = True )
- causes given
indicator window to refresh automatically every <interval> seconds
regardless of data source used or connection state.
interval parameter defines timeout in seconds between refreshes. AmiBroker
attempts to align refreshes to second boundaryso if you call it RequestTimedRefresh(
5 ) you should get refreshes at 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50 and
55 second of the minute.Due to the way how regular (low overhead) timers are
implemented in Windows they have accurracy of +/-55ms providedthat CPU is not
very busy. Don't expect to get first line of your code to execute exactly at
.000 milliseconds. This varies depending on machine load, number of quotes,
system time slice and tens of other factors.Usually (on my testing machines)
the first line of the code executes anywhere in the first 100 ms of the second,
provided that other processes do not interfere. Windows is not real-time operating
system and it does not guarantee any fixed execution/reaction times.
onlyvisible parameter set to True (default value) means that refreshes
are triggered only for visible and not minimised windows. This applies also
to main AmiBroker window - when it is minimised charts are NOT refreshed by
default. To force refreshes when window is minimised you need to set this parameter
to False. Note that this visibility applies to mostly to 'minimised' state
or the situation when you move chart outside the boundary of physical screen
so it is not visible to an eye but still open. It does not apply to chart windows
that are on placed on inactive sheets, as they do not really exist until they
are shown (this way AmiBroker conserves memory and CPU) and as non-existing,
can not be refreshed.
Example:
RequestTimedRefresh( 5 ); // automatically refresh this particular
chart every 5 seconds
Hint: to detect whenever given refresh comes from timer
or user action you can use Status("redrawaction") function. It returns
0 for regular refresh (user action) and 1 for timer-refresh
- AFL: Status("redrawaction")
added (completed: 2006-08-06)
Status function now supports new field: redrawaction
Status("redrawaction")
It returns 0 (zero) for regular refreshes,
and 1 for refreshes triggered via RequestTimedRefresh(). Note that in the
future more return values can be
added.
Example:
if( Status("redrawaction")
==1 )
{
_TRACE("\nTIMED
REFRESH"+Now());
}
RequestTimedRefresh(1);
- CreateStaticObject() actually calls internal CreateStaticObject :-) -
for some reason it was calling regular CreateObject() instead. (completed:
2006-07-27)
- Fixed problem with HoldMinDays sometimes allowing exit too soon
(completed: 2006-07-29)
- Fixed: Custom metric sort problem in optimization
result list (occurred in 4.83 only) (completed: 2006-07-29) (ext.ID: 345)
- Pane
resizing algorithm changed so if you drag the divider between panes only
neighbouring panes are resized (others remain unchanged)
- Real time quote
parent window has WS_CLIPCHILDREN style in order to fix some minor redraw
issue (completed: 2006-07-31)
CHANGES FOR VERSION 4.83.1 (as compared to 4.83.0)
- Fix to FC#302 caused problems with calling COM properties with parameters.
This is now fixed.
CHANGES FOR VERSION 4.83.0 (as compared to 4.82.0)
- Added detection of multiple copies of plugins for the same data source (completed:
2006-07-26)
This (multiple copies of the plugins for same data source) was causing problems
and lots of support issues because people were using old plugins even if
they installed (newer) copy of the plugin. This was so becasue AB always
used first
one encountered in given directory and it usually was the oldest one. Now
AB displays warning message that there are multiple copies of the same plugin
and then they must be renamed or removed.
- Added HoldMinDays and EarlyExitDays
options to SetOption() (completed: 2006-07-27)
In addition to already exitsing functionality of HoldMinBars / EarlyExitBars,
new options to specify min hold/penalty period in CALENDAR DAYS (as opposed
to bars).
SetOption("HoldMinDays", 30 ); //
set minimum holding period to 30 calendar days
SetOption("EarlyExitDays", 90 ); //
set penalty period to 90 calendar days
Note that you can use one or another (not
both at the same time) for one parameter, so you can specify minimum holding
period in either days or bars (but not both
at the same time). The same with EarlyExit period. You may however use different
specifications (i.e. days/bars) for EarlyExit and HoldMin (they are independent
from each other).
- Added scoreExitAll constant that causes rotational mode backtester
to exit all positions regardless of HoldMinBars (completed: 2006-07-27)
Note that this is global flag and it is enough to set it for just any single
symbol to exit all currently open positions, no matter on which symbol you
use scoreExitAll (it may be even on symbol that is not currently held).
By setting PositionScore to scoreExitAll you exit all positions immediatelly
regardless of HoldMinBars setting.
Example:
PositionScore =
..your normal score..
// if market timing signal goes negative close
all posiitons
PositionScore = IIf(
MarketTimingSignal < 0,
scoreExitAll, PositionScore );
NOTE: This flag works ONLY in rotational trading mode (in regular
mode it is easy to generate such global exit by ORing sell signal with global
sell
signal).
- CBT: Added ExitReason property to Trade object (completed: 2006-07-18)
(FC#:
88)
- Chart Tree - RMB - Edit - now restores and focuses to already opened formula
editor (if it is during editing) (completed: 2006-07-24) (FC#: 300)
Note that you can still open NEW instance of the editor with the very same
file (for comparison and to see the original contents) by holding down SHIFT
key when choosing "EDIT" menu.
- Eliminated extra unnecessary refreshes
of commentary window when new symbol was picked from ticker selector (completed:
2006-07-24)
- Fixed calling parameter-less JScript functions from AFL level
via GetScriptObject()
(completed: 2006-07-19) (FC #: 302)
- Fixed: wrong estimated time in progress
dialog when number of steps is greater than 2^32 (4294967296) (allocated
to: 4.80.2) (completed: 2006-07-24)
- AFL: Added Gradient background coloring
(SetChartBkGradientFill function) (completed: 2006-07-26)
Gradient fill of chart interior is now available via SetChartBkGradientFill
function.
Please note that this is independent from chart background color (background
color fills entire pane, gradient fill is only for actual chart interior,
so axes area is not affected by gradient fill)
SetChartBkGradientFill( topcolor,
bottomcolor, titlebkcolor = default )
topcolor - specifies top color of the
gradient fill
bottomcolor - specifies bottom color of the gradient fill
titlebkcolor - (optional)
the background color of title text. If not specified then top color is automatically
used for title background.
Example:
SetChartBkGradientFill( ParamColor("BgTop", colorWhite),ParamColor("BgBottom", colorLightYellow));
- Multiple tabs in RTQ window (completed: 2006-07-18) (FC#:
22)
RT quote window tabs behave the same as chart tabs: can be renamed with
right mouse button and dragged from one place to another.
20 tabs are currently available.
- Non-numeric custom trade metrics are not
formatted with thousands separators anymore (completed: 2006-07-21) (FC#:
314)
- now Tools->Preferences->Misc "Decimal places in RT quote window" allows
to specify upto 6 decimal places. (completed: 2006-07-25)
- OLE: Fixed default
property (Item) marker for Windows collection (completed: 2006-07-18)
- Progress
dialog: now estimated time is displayed in years/days if it is large enough
(completed: 2006-07-24)
CHANGES FOR VERSION 4.82.0 (as compared to 4.81.1)
CHANGES FOR VERSION 4.81.1 (as compared to 4.81.0)
- fixed problem with some of the watch lists not showing up in 4.81.0
CHANGES FOR VERSION 4.81.0 (as compared to 4.80.2)
- Database structure changed to hold new fundamental data - quarterly EAT/EBT/Sales
figures, Code and Nominal value have been replaced by new fields.
Despite these changes
files are still backward and forward compatible - so it can be read by any
other AB
version, the only minor inconvenience is that if you load new file into old
version (pre-4.81) of AmiBroker you will see weird numbers in old "Finances"
dialog as well as in "Shares out." and "Book Value" fields.
- Implemented new View->Information property page featuring extra
fundamental data fields
-
OLE: added new fundamental data fields to Stock object
Stock object has now the following properties:
string Ticker;
Collection Quotations;
string FullName;
boolean Index;
boolean Favourite;
boolean Continuous;
long MarketID;
long GroupID;
float Beta;
float SharesOut;
float BookValuePerShare;
float SharesFloat;
string Address;
string WebID;
string Alias;
boolean IsDirty;
long IndustryID;
long WatchListBits;
long DataSource;
long DataLocalMode;
float PointValue;
float MarginDeposit;
float RoundLotSize;
float TickSize;
long WatchListBits2;
string Currency;
string LastSplitFactor;
DATE LastSplitDate;
float DividendPerShare;
DATE DividendPayDate;
DATE ExDividendDate;
float PEGRatio;
float ProfitMargin;
float OperatingMargin;
float OneYearTargetPrice;
float ReturnOnAssets;
float ReturnOnEquity;
float QtrlyRevenueGrowth;
float GrossProfitPerShare;
float SalesPerShare;
float EBITDAPerShare;
float QtrlyEarningsGrowth;
float InsiderHoldPercent;
float InstitutionHoldPercent;
float SharesShort;
float SharesShortPrevMonth;
float ForwardDividendPerShare;
float ForwardEPS;
float EPS;
float EPSEstCurrentYear;
float EPSEstNextYear;
float EPSEstNextQuarter;
float OperatingCashFlow;
float LeveredFreeCashFlow;
-
AFL: new function GetFnData() - allows accessing fundamental
data
SYNTAX: GetFnData("field")
RETURNS: number
"field" can be one of the following:
"EPS"
"EPSEstCurrentYear"
"EPSEstNextYear"
"EPSEstNextQuarter"
"PEGRatio"
"SharesFloat"
"SharesOut"
"DividendPayDate"
"ExDividendDate"
"BookValuePerShare"
"DividendPerShare"
"ProfitMargin"
"OperatingMargin"
"OneYearTargetPrice"
"ReturnOnAssets"
"ReturnOnEquity"
"QtrlyRevenueGrowth"
"GrossProfitPerShare"
"SalesPerShare"
"EBITDAPerShare"
"QtrlyEarningsGrowth"
"InsiderHoldPercent"
"InstitutionHoldPercent"
"SharesShort"
"SharesShortPrevMonth"
"ForwardDividendPerShare"
"ForwardEPS"
"OperatingCashFlow"
"LeveredFreeCashFlow"
"Beta"
"LastSplitRatio"
"LastSplitDate"
-
ASCII importer: added support for new
fundamental data fields :
$FORMAT command
now supports additional fields:
DIV_PAY_DATE
EX_DIV_DATE
LAST_SPLIT_DATE
LAST_SPLIT_RATIO
EPS
EPS_EST_CUR_YEAR
EPS_EST_NEXT_YEAR
EPS_EST_NEXT_QTR
FORWARD_EPS
PEG_RATIO
BOOK_VALUE (requires SHARES_OUT to be specified as well)
BOOK_VALUE_PER_SHARE
EBITDA
PRICE_TO_SALES (requires CLOSE to be specified as well)
PRICE_TO_EARNINGS (requires CLOSE to be specified as well)
PRICE_TO_BV (requires CLOSE to be specified as well)
FORWARD_PE (requires CLOSE to be specified as well)
REVENUE
SHARES_SHORT
DIVIDEND
ONE_YEAR_TARGET
MARKET_CAP (requires CLOSE to be specified as well - it is used to calculate
shares outstanding)
SHARES_FLOAT
SHARES_OUT
PROFIT_MARGIN
OPERATING_MARGIN
RETURN_ON_ASSETS
RETURN_ON_EQUITY
QTRLY_REVENUE_GROWTH
GROSS_PROFIT
QTRLY_EARNINGS_GROWTH
INSIDER_HOLD_PERCENT
INSTIT_HOLD_PERCENT
SHARES_SHORT_PREV
FORWARD_DIV
OPERATING_CASH_FLOW
FREE_CASH_FLOW
BETA
(see Formats\aqfe.format and Formats\aqfn.format files for example usage)
-
Removed Stock->Information and Stock->Finances dialogs (this
functionality is replaced by View->Information - new dockable
property window)
-
AFL: new function StrReplace(
string, oldsubstring, newsubstring )
-
Fixed crash occuring sometimes if "Symbol->Watch List->Type-in" symbol
was longer than maximum allowable length (allocated
to: 4.80.2)
-
Foreign() function changed.
Now by default missing data bar OHL fields are filled using previous
bar Close and volume is set to zero.
It is possible to turn old behaviour (filling missing bar OHL fields
using previous bar OHL fields and copying previous bar volume) if you
use
Fixup parameter set to 2.
Foreign("MSFT","O", 2 ); // old-style (pre-4.81)
fill
-
Scaling-in profit% calculations modified to use total cost
instead of max. pos value
-
ships with AmiQuote 1.90 featuring automatic download and import of
fundamental data from Yahoo Finance. See
AmiQuote\ReadMe2.html for the
details.
CHANGES FOR VERSION 4.80.2 (as compared to 4.80.1)
-
Changed %profit calculation when scaling-in is used to use maximum number
of shares ever held as a “base” of %profit calculation - this
leads to “most conservative” % figures, compared to using just
initial entry value.
-
Prec() function improved so it does not show rounding
errors when working on
integer
CHANGES FOR VERSION 4.80.1 (as compared to 4.80.0)
- fixed problem with Easy Alert window not accepting new alerts in some circumstances
- included new IB plugin version 1.6.2 (FC issue #54)
If you experience any problem with this beta version please send detailed
description of the problem (especially the steps needed to reproduce it) to
bugs at amibroker.com