AmiBroker 4.94.0 Beta Read Me
May 3, 2007 18:05
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.90 first.
Just run the installer and follow the instructions.
Then run AmiBroker. You should see "AmiBroker 4.94.0 beta" written
in the About box.
See CHANGE LOG below for detailed list of changes.
CHANGE LOG
CHANGES FOR VERSION 4.94.0 (as compared to 4.93.0)
- AFL: 23 new low-level graphic functions allowing Windows GDI-like painting
Completely new low-level graphic AFL interface allows complete flexibility
in creating any kind of user-defined display.
The interface mimics closely
Windows
GDI API, with same names for most functions for easier use for GDI-experienced
programmers. The only differences are:
1. compared to Windows GDI all functions
are prefixed with 'Gfx'
2. pen/brush/font creation/selection is simplified
to make it easier to use and you don't need to care about deletion of GDI
objects
3. Three overlay modes are available so you can mix low-level graphics with
regular Plot() statements
(mode = 0 (default) - overlay low-level graphic
on top of charts,
mode = 1 - overlay charts on top of low-level graphic, mode =2 - draw only
low-level graphic (no regular charts/grid/titles/etc))
Low-level graphics
tutorial: http://www.amibroker.com/guide/h_lowlevelgfx.html
Available low-level gfx functions (click on the links for detailed explanation):
GfxMoveTo(
x, y ) http://www.amibroker.com/f?gfxmoveto
GfxLineTo( x, y ) http://www.amibroker.com/f?gfxlineto
GfxSetPixel(
x, y, color ) http://www.amibroker.com/f?gfxsetpixel
GfxTextOut( "text",
x, y ) http://www.amibroker.com/f?gfxtextout
GfxSelectPen( color, width =
1, penstyle = penSolid ) http://www.amibroker.com/f?gfxselectpen
GfxSelectSolidBrush(
color ) http://www.amibroker.com/f?gfxselectsolidbrush
GfxSelectFont( "facename",
pointsize, weight = fontNormal, italic = False, underline = False, orientation
= 0 ) http://www.amibroker.com/f?gfxselectfont
GfxRectangle( x1, y1, x2,
y2 ) http://www.amibroker.com/f?gfxrectangle
GfxRoundRect( x1, y1, x2, y2, x3,
y3 ) http://www.amibroker.com/f?gfxroundrect
GfxPie( x1, y1, x2, y2, x3, y3,
x4, y4 ) http://www.amibroker.com/f?gfxpie
GfxEllipse( x1, y1, x2, y2 ) http://www.amibroker.com/f?gfxellipse
GfxCircle(
x, y, radius ) http://www.amibroker.com/f?gfxcircle
GfxChord( x1, y1, x2,
y2, x3, y3, x4, y4 ) http://www.amibroker.com/f?gfxchord
GfxArc( x1, y1, x2,
y2, x3, y3, x4, y4 ) http://www.amibroker.com/f?gfxarc
GfxPolygon( x1, y1,
x2, y2, ... ) http://www.amibroker.com/f?gfxpolygon
GfxPolyline( x1, y1, x2,
y2, ... ) http://www.amibroker.com/f?gfxpolyline
GfxSetTextColor( color )
http://www.amibroker.com/f?gfxsettextcolor
GfxSetTextAlign( align ) http://www.amibroker.com/f?gfxsettextalign
GfxSetBkColor(
color ) http://www.amibroker.com/f?gfxsetbkcolor
GfxSetBkMode( bkmode ) http://www.amibroker.com/f?gfxsetbkmode
GfxGradientRect(
x1, y1, x2, y2, fromcolor, tocolor ) http://www.amibroker.com/f?gfxgradientrect
GfxDrawText( "text",
left, top, right, bottom, format = 0 ) http://www.amibroker.com/f?gfxdrawtext
GfxSetOverlayMode(
mode = 0 ) http://www.amibroker.com/f?gfxsetoverlaymode
- AFL: Two new fields in Status() functions: pxwidth and pxheight (
Status("pxwidth") - gives pixel width of chart window (useful for
low level graphics functions that operate on pixels)
Status("pxheight")
- gives pixel height of chart window
- Better scaling and no more black rectangle
on the bottom in images created via Edit->Image->Copy / Export
- "New Look" charts (switchable via Tools->Preferences "Charting")
- give cleaner, larger and more readable chart display and printout
- Printing/copy-metafile function uses now Enhanced Metafile format that
handles clipping regions (styleClipMinMax)
CHANGES FOR VERSION 4.93.0 (as compared to 4.92.0)
- Fixed exception that maight occur when copying to clipboard very long
lines from AA result list
- CategoryGetName() now
returns empty string for non-existing categories instead of some uninitialized
(random) string
- Fixed exception when trying to apply commentary on blank chart
pane
- AFL editor fix: right Alt + z does not trigger
'undo' anymore (allows to enter Polish z (z-dot-above) letter)
- Fixed exception occuring when Symbol Information was edited at
the same time while first auto-analysis was run
- Fixed
bar replay not functioning when viewing interval was the same as base time
interval and set to less than 5 minute, mixed mode was off, and
no afterhours/weekend
filtering was enabled (FC#: 899)
- Fix: defined FXRate
for the very first symbol in the database is used correctly now (FC#:
975)
- When LoadFormula() method of Analysis object is
called parameters are reset now (FC#: 958)
- Ability
to export Chart in "portable" format so you can distribute
chart templates to others and they will be restored together with all linked
formulas (FC#: 96)
This feature is available from RIGHT CLICK on chartTemplate->Save...Template->Load...
menus.
In addition to old local template format a new one is added with .chart
extensionthat keeps not only window sizes and formula references (paths) but
also formulas
themselves,so all you need to do is to save your chart into one file (Chart
Template, Complete *.chart)and copy that file onto different computer and
chart will be recreated with all formulas linked to it.
To Save chart into new
format do the following:
1. Click with RIGHT MOUSE button over the chart and
select Template->Save...
2. In the file dialog, "Files of type" combo select "Chart
Template, Complete (*.chart)"
3. Type the file name and click Save.
To load previously saved complete chart
do the following:
1. Click with RIGHT MOUSE button over the chart and select
Template->Load...
2. In the file dialog, select previously saved *.chart
file and press "Open"
Note: The procedure AmiBroker does internally
is as follows:
When you save the chart into new format it saves XML file with:
a) names of
all sheets, panes, their sizes, locations and other settings
b) paths to all
formulas used by all panes
c) the text of formulas themselves
When you load the
chart in new format AmiBroker:
a) sets up the sheets/panes according to information
stored in the file
b) for each formula stored in
the file it checks if the same formula exists already on target computer:
-
if it does not exist - it will create one
- if it exists and the contents
is identical to the formula stored in .chart file it will do nothing
- if
it exists and the contents is different then it will create NEW formula filewith
_imported.afl suffix (so old file is not touched) and will reference the
pane to the _imported.afl formula instead.
IMPORTANT NOTE: if you use any #include
files AmiBroker will store the contentsof include files as well inside chart
file and will attempt to recreate them
on target machine.Please note that in case of includes it will check if it
exists and if it is different.If both conditions are met (different file
exists already) it will ask to replace or not.If you choose to replace -
it will replace and make backup of existing one with .bak extensionIf you
are using any files in "standard include files and include them using <> braces,
AmiBroker will restore files in target machine standard include folder as
well evenif
the standard include folder path is different on the source machine).
Note also
- that this functionality is a bit experimental and pretty complex internally.
There may be some bugs even though it was tested on number of
different setups. Feedback is welcome. It is intended to be used to port
charts between different computers. For storing layouts/templates on local
computer you should rather use old formats as they consume much less space
(they store
only references,not the formulas themselves). One may however use new format
for archiving purposes as itkeeps formulas and all references in one file
that is very convenient for backups.
CHANGES FOR VERSION 4.92.0 (as compared to 4.91.1)
- Watch list tooltips now show WL ordinal number (index), name and symbol
count
- new menu item "WatchLists->Hide Empty
watchlists" allows
to show/hide empty watchlists
Note that when you add new watch list AmiBroker will automatically unhide
empty watch lists so you can see newly added list.
- AFL: Category* functions
work fine now with more than 256 watch lists
- AFL:
new function: CategoryFind() allows to search for category by name
SYNTAX: CategoryFind( "name", category )
RETURNS: number
FUNCTION: It allows to search for category by name. It takes category name
and kind as parameters and returnsINDEX (ordinal number). For example it
allows to find
watch list index by name:
wlnumber = CategoryFind("MyWatch
List 1", categoryWatchlist );
mysymbols = CategoryGetSymbols(categoryWatchlist,
wlnumber );
The index (in the above example watch list number) can be later used in
functions thatneed the index (like CategoryGetSymbols).
- AFL: new function:
InWatchListName() allows to reference watch list by name
It is equivalent to InWatchList function except that it takes watch list
name as parameter instead of the index.
SYNTAX InWatchListName( "listname" )
RETURNS NUMBER
FUNCTION Checks
if the stock belongs to a watch list having name of listname. If yes - the
function returns 1 otherwise 0.
EXAMPLE
Filter= InWatchListName( "mywatchlist" ) OR InWatchListName( "mysecondwatchlist" );
Note that this function
is a bit slower than InWatchList() function.
- Fixed Watch List Export - now exports from selected watch lists (not only
from watch list number zero)
If you select only one watch list to export then original symbol order is preserved,
multiple watch list export uses alphabetical order to prevent duplicates.
- Fixed Watch List Sorting - now sorts selected
watch list (not only watch list number zero)
CHANGES FOR VERSION 4.91.1 (as compared to 4.91.0)
- fixed symbol tree refresh after Watchlist->Import
CHANGES FOR VERSION 4.91.0 (as compared to 4.90.5)
- AA: new options in the context menu "Replace watch list with the results/selected
results"
This new option empties the watch list before adding results. The order of symbols
in the result list is preserved in the watch list.
- Watchlists: context (right
click) menu - now there is no WL selection dialog
displayed
If you select the watch list from symbol tree and click with RIGHT mouse button
to bring up watch list menu the selected watch list is used automatically and
watchlist selector dialog is not displayed.
- Watchlists: redesign - now there
is no limit on number of watch lists you can use
a) watch lists are now stored as text files inside "Watchlists" folder
inside database. The folder contains of any number of .TLS files with watch
lists themselves and index.txt that defines the order of watch lists. You
can add your
own .tls file (one symbol per line) and AmiBroker will update index.txt automatically
(adding any new watch lists at the end)The .TLS files can also be open in
AmiQuote.
b) watch lists remember the order in which symbols were added, so for example
if you sort AA result list in some order and then you"add symbols to
watch list" the order will be kept in the watch list.
c) you can now Add/Delete watch lists using Symbol->Watch List-> menu
or from watch list context menuNote that if you have done any customization
to the menu, you may need to go to Tools->Customize, select "Menu Bar" and
press "Reset" button for this new menu items to appear.
d) you can now alphabetically sort the symbols in the watch list
e) all watch lists are shown in the symbol tree now, even if they are empty.
f) for backward compatibility OLE automation WatchListBits/WatchListBits2 properties
of Stock object continue to work for first 64 watch lists (bit states are
transparently emulated)
g) Watch lists created in 4.91 are not visible for older versions
-
When changing selected symbol, the tree is not traversed to the bottom
(root). Instead only current branch is checked and if symbol is selected
only if it
is present under this branch (This prevents unnecessary unfolding of "All" and
other branches)
-
AFL Editor: AUTOWORDSELECTION turned off
-
AFL: switch/case statement added (completed: 2007-03-31) (ext.ID:
580). More information: http://www.amibroker.com/guide/v50/keyword/switch.html
Example:
for(
n = 0; n < 10;
n++ )
{
printf("Current
n = %f\n", n );
switch(n)
{
case 0:
printf("The
number is zero.\n");
break;
case 3:
case 5:
case 7:
printf("n
is a prime number\n");
break;
case 2: printf("n
is a prime number\n");
case 4:
case 6:
case 8:
printf("n
is an even number\n");
break;
case 1:
case 9:
printf("n
is a perfect square\n");
break;
default:
printf("Only
single-digit numbers are allowed\n");
break;
}
-
AFL: break/continue statements added (supported inside for/while/do-while/switch
statements). More information:
http://www.amibroker.com/guide/v50/keyword/break.html
http://www.amibroker.com/guide/v50/keyword/continue.html
Example:
for(i
= 1;
i < 1000;
i *= 2 )
{
if(
i > 50 ) break;
printf("%f\n",
i );
}
- AFL: new C-like assignment operators +=, -=, *=, /=, %=, &=, |=
New operators are shortcuts for some common operations.
x += y; is equivalent to x = x + y;
x -= y; is equivalent to x = x - y;
x *= y; is equivalent to x = x * y;
x /= y; is equivalent to x = x / y;
x %= y; is equivalent to x = x % y;
x &= y; is equivalent to x = x & y; // bitwise and
x |= y; is equivalent to x = x | y; // bitwise or
-
Enanced display in Real
Time Quote window (dual-step change coloring - when field changes it
is highlighted with bright
yellow for 0.25 second then color
changes to pale yellow and after a while to default (white)
background))
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