AmiBroker 5.29.6 BETA Read Me
December 24, 2009 22:22
THIS IS A BETA VERSION OF THE SOFTWARE. EXPECT
BUGS !!!
Backup your data files and entire AmiBroker folder
first!
WARNING:
VERSION 5.27+ CHANGES FILE FORMAT FOR DATABASE
FILES. THIS MEANS THAT FILES THAT ARE ONCE SAVED
WITH VERSION 5.27+ WILL NOT BE READABLE IN ANY OLDER VERSION.
BACKUP YOUR DATA FIRST.
INSTALLATION INSTRUCTIONS
IMPORTANT: This archive is update-only. You have to install full version
5.20 first.
Just run the installer and follow the instructions.
Then run AmiBroker. You should see "AmiBroker 5.29.6 BETA" written
in the About box.
See CHANGE LOG below for detailed list of changes.
CHANGE LOG
CHANGES FOR VERSION 5.29.6 (as compared to 5.29.5)
- Race condition between UI threads eliminated (resulting in "wait for
plugin" window not being closed sometimes)
CHANGES FOR VERSION 5.29.5 (as compared to 5.29.2)
- Sometimes when copying AA list to clipboard three dot (...) sequence appeared
every 2048 characters of copied text and some characters could be missing.
Fixed.
- GUI: chart context window items re-arranged - 'Close' menu item moved
to the bottom and 'Properties' menu item moved to top (after Parameters)
- styleClipMinMax
constant is now highlighted in AFL editor
- When different symbol were selected
in active chart and in the Symbols pane (because of filtering) operations
like adding/removing from watchlist got
confused. Now AmiBroker asks the user what to do.
- NumToStr/WriteVal are polymorphic
now (means better performance for scalar input arguments)
- Aux1/Aux2 reserved
variables are highligted now in AFL editor
- PREV/NEXT sibling keyboard shortcut
functionality restored
- Added "wait for plugin" window when switching
external plugin-driven databases because sometimes plugin may take long time
to shutdown/initialize
- New symbol bar: inability to select first symbol after
new search when previously displayed was one symbol, current symbol is
re-selected automatically when
search string changes. In-place symbol editing disabled.
- Under some circumstances
when broker.master was deleted/corrupted/inaccessible AmiBroker could hang
loading database. Fixed.
- Cum() function does NOT use all bars any more by
default.
In the past versions Cum() functions effectively turned OFF QuickAFL feature
by requesting all bars to be processed.
Since Cum() function was popular it caused that many legacy formulas that used
it were not benefiting from QuickAFL.
To enable QuickAFL with such formulas now Cum() function does NOT affect required
bars count (previously it forced all bars).
This change may lead to different results when comparing with old versions.
If you are interested in getting old behaviour and use all bars just add:
SetBarsRequired( sbrAll )
anywhere in your formula.
- BarIndex() now returns values always starting from zero (even if
QuickAFL is turned on).
This change is required because Cum() now does not require all bars and formulas
mixing Cum(1) and BarIndex would work improperly otherwise.
- Due to operating system changes in Vista and Windows
7, structured exceptions like address violations were not handled properly
by exception
handler
and caused immediate program exit. Fixed.
- Status() function new
fields
Status can now retrieve "quickaflfirstdatabar" and "quickafllastdatabar".
This feature is for internal use only.
These are bar indexes of actual underlying compressed quotation array that
make up AFL's array[ 0 ] and array[ BarCount - 1]
- Crash report now properly lists Windows Vista (OS 6.0) and Windows
7 (OS 6.1)
- Crash recovery window now sends bug reports directly
over http (WWW) protocol instead of relying on clients' MAPI email program
as on
Windows 7 e-mail
program is no longer installed by default.
Improved crash recovery should also be able to catch exceptions
in more (all?) cases.
New direct send in future will offer immediate resolution
to problem once given exception is identified and entered
into database.
Privacy:
Direct bug reporting allows to send bug report to amibroker.com
on user request (click on "Send report" button).
It works over regular http (www) port 80, and sends only
the information displayed explicitely on screen
(i.e. AmiBroker version, OS version, crash information, database
info (number of symbols) and machine info (memory figures)).
No other information is sent. The user has option to send
anonymously (without providing e-mail address). Although
e-mail
address is optional, it is recommended to provide one if
user wants to receive e-mail response to the error report.
CHANGES FOR VERSION 5.29.2 (as compared to 5.29.0)
- Some issues with datestamps (including wrong montly compression) were introduced
by change to EOD markers done 5.29.0. Reverted/fixed.
- New symbol window is
properly filled with categories even if not initally visible
- New symbol
window category/list panes can be resized now
- GetPlaybackDateTime did not
return zero when playback was not active in 5.27-5.29. Fixed.
- When plugins
used InfoSite.AddStock (old one) more than once per symbol certain category
assignments could be improperly set in 5.27..5.29.0.
Fixed.
- Added fopen()/fclose() tracking and error message (Error 51)
when user forgot to close files. On such error files are automatically
closed
by AB
CHANGES FOR VERSION 5.29.0 (as compared to 5.28.1)
- ASCII importer: added GICS support
Now you can import GICS symbol-code assignments using ASCII importer.
$FORMAT command now supports GICS code
and there is $GICS command for single-symbol files.
For example if your file looks as follows:
(format is symbol, full name, gics sub industry code)
AAN,AARON'S INC,25504060
Then to import it usign AmiBroker's import wizard use the following
$FORMAT Ticker,FullName,GICS
$OVERWRITE 1$
$SEPARATOR ,
$CONT 1
$GROUP 255
$AUTOADD 1
$NOQUOTES 1
- Fixed loading of old AA settings so Chart
dimensions are initialized with (500,300) instead of zero
- Trade.EntryDateTime,
Trade.ExitDateTime were reporting values incompatible with DateTimeToStr
in 5.27/5.28. Fixed
- Fixed assertion in Import Wizard (refering to non-existing
combo box)
- A blank chart timing is now set to arbitrary value of 10ms
- All numeric edit
fields in AmiBroker now display numbers in regular (non-scientific) notation
upto 10^15 and max available precision (7 significant digits
in case of single-precision IEEE)
- ASCII importer: removed 2^31 cap
on volume field and removed some (int) conversions that were left from
old days
- Implemented protection against re-entrant WM_PAINT messages sent
by Vista and Win7 during COM calls
- New symbol list is repainted
immediately after some changes now.
- Quote Editor in 5.28 editing EOD records
caused creation of duplicates. Fixed.
- When converting from old database
format, Aux1/2 fields are initialized with zero instead of some random
values.
- When focus was inside new symbol window, accelerator keys
did not work in 5.28. Fixed
CHANGES FOR VERSION 5.28.1 (as compared to 5.28.0)
- Re-based DLLs included to increase contiguous virtual memory space
- "
Index" category was showing nothing in a new symbol window. Fixed.
- Quote
Editor - multiple quote deletion was not possible in 5.27/5.28.0, only first
selected item was deleted. Fixed
- Right-click beyond last symbol in the symbol
list in a new symbol window caused crash in 5.28. Fixed.
- Changed the way in
DateTime() values are coded to support legacy formulas that are not using
currently recommended comparision method via DateTimeDiff()
- OLE: ZoomToRange()
method works for floating windows
- ADK: Added GetDateTimeArray to site interface
GetDateTimeArray returns a pointer to internal date time array. Array of
DATE_TIME_INT elements.
The SiteInterface structure now looks as follows (struct size = 40 on
32-bit platforms, 76 on 64-bit platforms)
struct SiteInterface
{
int nStructSize;
int (*GetArraySize) (void);
float * (*GetStockArray)( int nType );
AmiVar (*GetVariable) ( const char *pszName );
void (*SetVariable) ( const char *pszName, AmiVar newValue );
AmiVar (*CallFunction) ( const char *pszName, int nNumArgs, AmiVar *ArgsTable
);
AmiVar (*AllocArrayResult) (void);
void * (*Alloc) (size_t nSize);
void (*Free) (void *pMemory);
DATE_TIME_INT* (*GetDateTimeArray) (void);
};
- In 5.27/5.28 DateTimeConvert
function returned incorrect datenum. Fixed
- New symbol list supports selection
via typing few first letters (like symbol combo)
- When saved Automatic Analysis
settings contained some garbage data in MaxLongPos/MaxShortPos parameters
the backtester could exit with "Not enough memory" error.
Fixed
CHANGES FOR VERSION 5.28.0 (as compared to 5.27.3)
- GICS is now available as Filter category (in Automatic Analysis, Quick
Review and DB Purify)
- Completely redesigned Symbol window (View->Symbol)
New symbol window now features:
a) separate category/filter view
b) full text search with category filtering
full text search works in two modes:
- simple substring search (enter the text into "<search>" edit
and
it will find all symbols that contain search phrase in either symbol or full
name (anywhere, not just at the beginning)
- wildcard search (if you enter the search phrase with either * or ? wildcards
AmiBroker will perform wildcard search. For example ??? will return only 3-character
symbols,
and *-A0-FX - will return all forex symbols on eSignal database.
Please note that search feature operates on symbols PRESENT in the AmiBroker
database,
it will not find symbols that do not exist in the AmiBroker database yet but
are generally accessible after importing/adding them.
c) sorting by symbol or by full name
d) GICS support
e) hierachical filtering (if you select sector from category view it will show
symbols
belonging to all industries within given symbol)
f) multiple selection of symbols (hold down CTRL key while selecting, or SHIFT
to select groups)
allowing watchlist/favorite operation on multiple symbols at once
g) super-fast operation (all filtering/search/display takes less than 0.01 sec
with 10000 symbols)
- Quote Editor Aux1
field was overwritten with value of Aux2 field. Fixed
- Quote Editor column
layout/width is saved between sessions (again)
- N-second custom intervals can
now be defined in Tools->Preferences->Intraday
- GICS categorisation
AmiBroker now reads GICS.txt file from its installation folder.
It contains GICS categories listed one by one in order of GICS code in the
following format
GICS;Name;Description<CRLF>
GICS is numeric code from 2 digits upto 8 digits
Name is GICS category name
Description is GICS category description
These fields must be separated by semicolon
<
CRLF> means carriage return/line feed characters (means "new line" -
just press ENTER/RETURN key if you are editing with text editor)
There must be only one category per line in GICS.txt file
The default GICS.txt file is supplied already.
- Added support for GICS to AFL
There is a new constant : categoryGICS that works
in conjunction with category functions like
CategoryGetSymbols
CategoryGetName
CategorySetName
CategoryAddSymbol
CategoryRemoveSymbol
CategoryFind
Note that these functions take index parameter, but the meaning of index
parameter
is different for GICS category - the index for categoryGICS is actually
GICS code.
Such as 10 for energy sector or 351010 for "Health Care Equipment & supplies" industry.
The codes are fixed even if new classifications are added at
some point in the future. This means that you won't need to change AFL
codes
even if new classifications are added.
But it is important to understand that these codes work in hierarchical
way. So
GetCategorySymbols( categoryGICS, 10 ) will return all symbols belonging
to energy sector,
including those in 10101010 - Oil & Gas Drilling sector as well as
10102050 - Coal & Consumable Fuels;
for example.
See
http://en.wikipedia.org/wiki/Global_Industry_Classification_Standard
for more details on GICS system
NOTE: current databases DO NOT have GICS codes assigned to symbols.
As far as I know PremiumData http://www.premiumdata.net/ is
planning to release AmiBroker-compatible
database with GICS support.
CHANGES FOR VERSION 5.27.3 (as compared to 5.27.2)
- HighestSince/LowestSince ignored very first bar [0] in the array. Fixed
- Stock
object date fields can be set to "empty" by assigning zero.
- Aux1,Aux2
added to Import Wizard comboboxes
- View->Data window is now present in Customization
dialog
- Weekly chart was not displayed if settings were to show first date
of week and first date was before 1970. Fixed.
- Added DateTimeDiff( arg1, arg2
) AFL function that returns difference in seconds between two date time arguments
It is important to understand that DateTime is not a simple number but rather
bitset and two datetime values can only
be reliably compared for equlity or inequality using == or != operators. Any
other comparisions (less than/greater then)
using normal operators > < can lead to wrong results, therefore to compare
two datetime numbers you should use
DateTimeDiff( arg1, arg2 ) which will return positive values if arg1 > arg2
and negative values if arg1 < arg2.
- Symbol->Quote
Editor now uses fully virtual mode - it does not require extra memory and
shows up immediatelly and works fast regardles of number of quotes
per symbol and is auto-refreshed every 5 sec
- eSignal plugin does not fill AuxData
with random data (they are initialized with zero now)
- Fixed DateTimeToStr
and StrToDateTime
- Fixed crash when saving symbols that had name() longer
than 32 characters
CHANGES FOR VERSION 5.27.2 (as compared to 5.27.1)
- Fixed 16-character name problem in Metastock plugin
- Fixed monthly compression
problem present in 5.27.1
- Fixed problem when OLE automation was used to modify
symbol properties on OLD format databases without saving them first in new
format
- Aux1 and Aux2 are new built-in AFL price arrays
- Fixed Text tool bug (Vertical
text instead of horizontal in 5.27.1)
- 'Avg' field compression with TimeFrameSet
fixed.
- Added AUX1 and AUX2 to ASCII importer field definitions
- Auxilliary data
fields writable by AddToComposite field "1" (aux1),
and field "2" (aux2)
- Quotations object added new method: long RetrieveEx(long Count, VARIANT*
Date, VARIANT* Open, VARIANT* High, VARIANT* Low, VARIANT* Close, VARIANT*
Volume,
VARIANT* OpenInt, VARIANT* Aux1, VARIANT* Aux2);
- Aux1/Aux2 available as
properties of Quotation object (OLE interface)
CHANGES FOR VERSION 5.27.1 (as compared to 5.27.0)
- Fixed incorrect year when importing intraday data using ASCII importer
- Fixed
intraday filtering issue that occurred for auto-converted databases
- Market
ID was not properly set in 5.27.0 alpha
CHANGES FOR VERSION 5.27.0 (as compared to 5.26.5)
CHANGES FOR VERSION 5.26.5 (as compared to 5.26.0)
- Symbol lock on per-chart window basis (available via padlock button next
to chart sheet tabs and chart context menu)
- User interface dialogs now use MS Shell Dlg 2 (Tahoma) font on Windows
2000, XP, Vista and Windows 7
- several minor fixes for 64 bit version
CHANGES FOR VERSION 5.26.0 (as compared to 5.25.0)
- Implemented user-definable report charts
Now it is possible for the user to create any number of charts that will
be automatically generated and included in the backtest report.
To add user-defined chart to the report, simply save your chart formula
under "Report Charts" folder.
That's all.
Any formula present in the "Report Charts" folder will be executed
after
completion of the backtest using ~~~EQUITY as selected symbol.
The beta ships with 3 sample charts:
a) portfolio equity
b) underwater equity (drawdown)
c) profit table
The charts are displayed in alphabetical order (using file name as a chart
name).
- Built-in price arrays (OHLC, V,
OI, Avg) are protected against assigning the value of wrong type (non-array)
CHANGES FOR VERSION 5.25.0 (as compared to 5.24.0)
- StaticVarGet() now has additional parameter - align
StaticVarGet("varname", align = True );
second parameter - 'align' - booleand True/False, default: True
- decides whenever AmiBroker performs timestamp synchronization/alignment
or not.
The default value is True and it means that values stored in static variables
are retrieved and aligned to currently selected symbol data/timestamp
on each bar basis so data for corresponding date/time stamps match.
This is recommended setting and this is the way it worked in previous versions.
When align is switched to False - it means that AmiBroker does not perform
any checks nor any alignment and will fill the array with consecutive values
stored in static array regardless of their timestamps.
If there are less bars in the static array than in the current arrays,
the last
value of static array will be propagated till BarCount - 1.
It is advised NOT to use align=False, unless you know exactly what you
are doing
and you are aware that date/time stamps have no meaning in particular variable
or in case when date/time stamps are are aligned using your own method.
Note that speed difference between align 'on' and 'off' is usually negligible
because alignment algorithm is very fast and has similar complexity as
plain
memory copy.
- AFL: HighestVisibleValue(
array ), LowestVisibleValue( array )
Two new functions that calculate single value (not array) representing
highest and lowest values of given array within VISIBLE range (on chart).
Should be applied only in indicators as only indicators have concept of "visible" bars.
The function will return Null value if no visible bars are present.
They are equivalent to the following coding:
function HighestVisibleValueEquivalent(
array )
{
bv = Status("barvisible");
Hh = -1e8;
for( i = 0;
i < BarCount;
i++ )
{
if(
bv[ i ] AND array[
i ] > Hh ) Hh = array[ i ];
}
return hh;
}
function LowestVisibleValueEquivalent(
array )
{
bv = Status("barvisible");
ll = 1e8;
for( i = 0;
i < BarCount;
i++ )
{
if(
bv[ i ] AND array[
i ] < ll ) ll = array[ i ];
}
return ll;
}
As you can see the AFL equivalent is simple, but native functions
are faster.
- When user picks a drawing tool, AmiBroker
offers switching to default layer (0) if current layer is not visible
- StaticVarRemove("varname")
now supports wildcards in the variable name
"varname" parameter can be either exact variable name or wildcard
match string.
The '*' matches any number of characters, including zero characters. The '?'
matches exactly
one character.
Example 1:
StaticVarRemove("MyVariables*");
// this will remove all static variables beginning with MyVariables prefix.
Example 2:
StaticVarSet("DifferentName", 1 );
printf( "Total
static variables = %g\n\n", StaticVarCount() );
for( i = 1;
i <= 5; i++ )
for( j = 1;
j <= 5; j++ )
{
VarName = "Test_X=" +
i + "_Y=" + j;
printf("Setting
variable " + VarName + "\n" );
StaticVarSet( Varname, 1 );
}
printf( "Total
static variables = %g\n\n", StaticVarCount() );
printf( "Now
wildcard remove *X=1*\n" );
StaticVarRemove( "*X=1*" );
printf( "Total
static variables = %g\n\n", StaticVarCount() );
printf( "Now
wildcard remove Test*\n" );
StaticVarRemove( "Test*" );
printf( "Total
static variables = %g\n\n", StaticVarCount() );
printf("Removing
'differenname' variable\n");
StaticVarRemove("DifferentName" );
printf( "Total
static variables = %g\n\n", StaticVarCount() );
- StaticVarCount function added
- returns the total number of static variables in memory
- Study() function
now allows to specify which Y scale to use (Study( studyid, chartid, scale
= -1))
Study( studyid, chartid = 1, scale = -1 )
scale parameter specifies which scale should be used
scale = -1 : automatic (default value) - either linear or logarithmic depending
on actual chart setting, chart is specified by chartID
scale = 0 : linear scale
scale = 1 : logarithmic scale
- data and optimizer plugins are loaded later (saves upto 15MB of RAM)
- Fixed
GetChartBkColor function
- "
show trading arrows" feature optimized for significantly lower CPU usage
- hi-density
(>2x more data bars than pixels) variable color styleHistogram
charts are plotted with correct colors
- less reallocations in real-time mode,
10% performance improvement and less fragmentation
- arrays for storing dynamic
stop levels are only allocated/filled when needed (saves about 10% of AFL
setup time)
- Added miny/maxy parameters to SetChartBkGradient (allows gradient
area charts in combination with cloud style)
Example Gradient Area chart:
function PlotGradientArea(
array, caption, ColorTop, ColorBottom )
{
bkclr = GetChartBkColor();
HH = HighestVisibleValue( array );
if( NOT IsNull(
hh ) ) SetChartBkGradientFill(
ColorTop, ColorBottom, bkclr, Null,
HH );
Plot( array, Caption, ColorBlend(
ColorBottom, colorBlack )
);
PlotOHLC( HH, HH, array,
HH, "", bkclr, styleNoLabel | styleNoTitle | styleCloud, Null, Null, 0,
-10 );
}
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}}
- {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )
) ));
PlotGradientArea( C, "Close", ParamColor("Top", colorLightOrange), ParamColor("Bottom", colorPaleGreen )
);
_SECTION_END();
CHANGES FOR VERSION 5.24.0 (as compared to 5.23.0)
- typeof() incorrectly returned compile-time type instead of run-time type.
Fixed.
- Static array variables implemented
StaticVarSet( name, value ) and
StaticVarGet( name )
AFL functions now accept arrays in addition to numbers (scalars).
Static arrays can be even 100 faster than AddToComposite/Foreign, however
these two are not strictly equivalent.
There are following limitations / differences of static arrays as compared
to Foreign/AddToComposite:
a) static array variables store only as many bars as there are currently
in use by given chart
(so they do not affect QuickAFL in any way). This is different that AddToComposite
that forces usage and store of all bars.
b) static array variables work best if you read them using the same interval
as they were written to. I.e when you create static array variables using
5-minute chart, for best results read them in some other 5-minute chart.
Reading in different intervals is possible, but subject to limitations
of timestamping (see below)
c) when you read static variable in a different interval that it was originally
stored,
static variables perform padding/synchronization and time compression/decompression
automatically in a similar way as foreign,
however Foreign compresses data always from base-time interval, while static
variables operate on previously stored interval,
hence result may differ. For example, if previously stored data was in
daily interval, and you read such static variable in intraday
chart, you will see essentially flat lines for each day, representing static
data from daily interval.
d) static array variables do not work well for non-time based intervals
(tick/n-volume/n-tick) because timestamps in those intervals
may not be unique (i.e. several bars may have same time stamp), so time
synchronization is not reliable.
e) static array variables are little slower than normal AFL variables,
so for best performance, use read-once, write-once paradigm, using
temporary normal variable for any processing during formula execution,
like this:
// start of the formula:
temp = StaticVarGet("mystaticarray" );
// now perform all necessary calculations using temp variable
temp = Nz(temp) + C/2;
...
// at the end of the formula store to static
StaticVarSet("mystaticarray", temp );
CHANGES FOR VERSION 5.23.0 (as compared to 5.22.0)
- Font used by progress window, string input, tip of the day, search file
is now "MS Shell Dlg" (the same as elsewhere in AB) that means
that is CoolType friendly (TTF)
- AFL: SetOption("ExtraColumnsLocation",
col) - this new option allows the user to change the location of custom columns
added during backtest/optimization
"extra" columns mean:
a) any custom metrics added using custom backtester
b) any optimization parameters defined using Optimize() function
If both custom metrics and optimization parameters are present then
custom metrics appear first then optimization parameters
This function is provided to allow the user to change the default "at
the end" location of custom columns/optimization parameters.
For example
SetOption("ExtraColumnsLocation", 1 );
will cause that custom metrics and opt params will be subsequently added
starting from column 1 (as opposed to last column default)
Note that this setting changes "visual" order of columns, not
really in-memory order or export order, so
exported data files or copy/paste format do not change.
- Implemented hiding columns in all list
views (right click over list view HEADER to bring "Setup Columns" dialog)
- Storing
column state (widths/ordering/visibility) in automatic analysis implemented
The widths, ordering and visibility of all built-in columns in automatic-analysis
is stored between runs.
This works for each operation mode (i.e. scan/backtest/optimization) separately,
so column setup
for scan does not affect stored column order for backtest, as well as state
of columns for optimization does not
affect backtest, etc.
Note also that state of exploration mode is not stored, due to its complete
user-configurability from AFL level.
- Data
Window implemented (available from View->Data Window menu)
(if you can not see this menu, you would need to reset the menu using Tools->Customize,
select "Menu Bar" and then press "Reset" button).
If you prefer to use Data Window over data tooltips, you can turn off data
tooltips using Tools->Preferences, "Miscellaneous" tab, UNCHECK "Price
data tooltips" box.
- Home key was
working incorrectly when more than one pane was used in the chart. Fixed
- Implemented
simple performance monitor Tools->Performance Monitor
Showing some memory and usage statistics:
- number of symbols in the database
- number of symbols cached in RAM
- quotation data memory usage
- current symbol memory usage
- total chart refresh time
- real-time data stream update frequency
The contents of the window is updated automatically every 3 seconds
This tool is intended to be used now for two purposes:
a) tweaking cache settings for best RAM usage (for example optimizations
will run faster if all quotation data can be kept in RAM)
b) monitoring real-time performance
More uses will probably come in the future.
- Time&Sales window
now shows some "recent statistics" regarding
trading
Time&Sales window now shows some "recent statistics" regarding
trading namely:
- number of trades and average # of trades per second
- number of trades and shares traded at ask or above
- number of trades and shares traded at bid or below
- ask minus bid difference expressed in number of trades and shares
- ask minus bid difference expressed as percentage ratio to total trades/total
volume traded
A little background:
Ask minus bid: the positive numbers represent more transactions occuring
on ASK side than on BID side.
This in theory may mean more buying than selling, but in practice things
are largely dependent
on security traded. Esp. dark liquidity pools do not show in order books
and
may report trades to the tape several seconds later thus invalidating relationship
between
bid/ask and actual trade prices.
IMPORTANT:
These are temporary, short-term stats - they cover ONLY trades displayed
in the T&S window since opening of the window OR
resetting stats.
You can reset statistics using right click menu : "Reset Stats"
CHANGES FOR VERSION 5.22.0 (as compared to 5.21.0)
- added ability to extend blank chart area by pressing END key multiple times
(each time 10 blank bars are added) and restoring preferences value by subsequent
pressing of HOME key.
- added option to always require variable declarations (using
local/global) on formula-by-formula basis:
SetOption("RequireDeclarations", True );
global test1;
test1 = 5; // OK variable declared
test2 = 3; // error: assignment without declaration
- added typeof() operator
The typeof operator is used in the following way:
typeof (operand)
The typeof operator returns a string indicating the type of the *unevaluated*
operand. operand is the string, variable, function identifier, or object
for which the type is to be returned.
When supplying identifier, it should be provided alone, without arithmetic
operators, without extra arguments and without braces.
If you want to check the type of value returned by the function, you must
first assign the return value to a variable and then use
typeof( variable ).
Possible return values are:
"
undefined" - identifier is not defined
"
number" - operand represents a number (scalar)
"
array" - operand represents an array
"
string" - operand represents a string
"
function" - operand is a built-in function identifier
"
user function" - operand is a user-defined function
"
object" - operand represents COM object
"
member" - operand represents member function or property of COM object
"
handle" - operand represents Windows handle
"
unknown" - type of operand is unknown (should not happen)typeof operator
allows among other things to detect undefined variables in the following
way
if( typeof( somevar ) == "undefined" )
{
/// when somevar is undefined the code here will execute
}
The following sample COMMENTARY code shows the output of
typeof in some common situations
x = MACD();
y = LastValue( x );
function testfun() { return 1; };
printf( typeof( test ) + "\n" ); // the undefined variable
printf( typeof( 1 ) + "\n"); // literal number
printf( typeof( "checking" ) + "\n"); // literal string
printf( typeof( x ) + "\n"); // array variable
printf( typeof( y ) + "\n"); // scalar variable
printf( typeof( MACD ) + "\n"); // function identifier
printf( typeof( testfun ) + "\n" ); // user function identifier
- GetSignalQty member function of Backtester object
returned zero. Fixed now
- In the Plot() function Xshift parameter was used
as z-order in 5.21 beta. Fixed now.
- Plot, PlotOHLC and PlotForeign() are no
longer limited to -5..+5 zorder range. You can use any zorder value now.
Note that if you use zorder outside default range -5..+5, you may see performance
degradation for big positive and big negative z-order values.
Approximate performance penalty is 10 milliseconds for 100 z-orders (or 1ms
for 10 z-orders)
- SetChartOptions now adds ability to programmatically extend blank space
on chart-by-chart basis
SetChartOptions( Mode = 0, Flags = 0, gridFlags = chartGridMiddle, ymin = 0,
ymax = 0, blankbars = 0 )
New, 6th parameter "blankbars" defines the minimum number of blank
bars for given chart. The default value of zero means no change
(use preferences setting).
if specified value is less than value set in preferences, it is ignored, so
you can not decrease the blank bars below value set in preferences.
if many panes within same chart use this function, then the largest specified
blankbars will be used
Note that you can still extend blank space further using END key.
Special feature - if "blankbars" is negative then extra blank bars
added are equal to absolute value of blankbars parameter plus chart gets scrolled
to rightmost position.
Caveat: forcing custom blankbars via SetChartOptions effectivelly disables
HOME key scroll to begin operation.
- the feature to extend blank area via mouse wheel and > button
is removed, due to complaints received
CHANGES FOR VERSION 5.21.0 (as compared to 5.20.0)
- Added optional data padding for non-trading days (switchable from View->Pad
non-trading days menu) - for daily and higher intervals only (FC#1136,FC#1174)
- All drawing tools
now can define Z-order (from -5 to +5).
Z-order.
Imagine that you could see the drawing objects arranged on the chart page like
puzzle pieces on a table. Some objects may appear to be placed one on top of
another, and others may be overlapping.
This third dimension of chart page is known as "Z order." If the
X axis relates to width and the Y axis to height, then the Z order relates
to depth. Although Z order cannot be seen directly, just as can you position
objects along X and Y (horizontal and vertical) axes, you can also position
them in the Z order.
Every object on the page has its Z order, positioned in back to front order,
so that objects at the front will take precedence over objects behind.
Z order gives you the ability to superimpose objects one on top of another.
You can change Z-order parameter using Properties dialog
as well as using Format->Z-Order->Bring Forward / Send Backward menus
(and default keystrokes Shift+Page Up, Shift+Page Down)
Negative values mean BEHIND axis/grid, positive mean above grid.
- Blank area past last available quote
can be now enlarged on the fly by simply using > arrow in the scroll bar
or using mouse wheel (just roll the wheel past the last bar) (FC #430,#1516,
#1500, #1239, #982, #808, #561 )
- CBT: Backtester.GetSignalQty(
bar, type ) method implemented (FC#1671)
Backtester object
GetSignalQty( bar, type ) method
- retrieves the number of signals occuring on given bar
type = 0 - both entry and exit signals
type = 1 - only entry signals
type = 2 - only exit signals
Note that AmiBroker to conserve memory keeps track only of 2 * MaxNumberOfPositions
entry signals on any single bar,
however it keeps track of ALL exit signals (because they consume much less
space and at the time of signal collection
it is not known which positions are already open, so all exits must be tracked
to prevent missing an exit)
- E-mail alerts can now be sent through different
port than 25 (see Tools->Preferences->Alerts) (FC#1641)
- Early warning of indicator space running out. At application
exit the message is displayed when less than 10% indicator space is left,
plus an offer to
run Indicator Maintenance (FC#1667)
- new AFL functions ColorBlend
ColorBlend( colorFrom, colorTo, factor = 0.5 )
- the function blends (mixes) colorFrom with colorTo with 'factor' proportion
using the following algorithm
RGB = ( 1 - factor ) * RGB(colorFrom) + factor * RGB(colorTo );
So factor = 0 means use colorFrom only, factor = 1 means use colorTo only.
All in-between values
mean create mix of colors. The lower the factor value means more colorFrom.
This function makes it easy to lighten or darken colors like this:
function ColorLighten( color )
{
return ColorBlend( color, colorWhite, 0.5 );
}
function ColorDarken( color )
{
return ColorBlend( color, colorBlack, 0.5 );
}
- Plot, PlotForeign and PlotOHLC now have new
parameter zorder which defines the Z-axis position of given plot. (FC#257)
zorder can be set from -5 to 5.
The default is zero.
Zorder = 0 means also where the "grid" is located.
So if you want to plot BEHIND the grid
you need to specify negative zorder parameter.
Smaller values mean draw first (i.e. BEHIND others), higher values mean draw
later (ON TOP of others).
Plots are drawn in the following order:
- zorder parameter takes precedence over
the order of calling Plot() functions, so if z-order is set,
it determines plotting order.
See http://www.amibroker.com/gifs/zorder.gif
- If
multiple plots use the same z-order parameter they are plotted in reverse
call order (ones that appear last in the code are plotted first). This
rule can be changed by already existing switch graphzorder = 1 which,
when specified,
reverses this behaviour (so plots are drawn in call order).
Please note
the above applies to each zorder "layer" separately (so
within same zorder "layer" reverse call rule applies)
This may sound complicated but is required for backward compatibility.
Example:
Bollinger bands with "cloud" fill behind price (zorder =
-1)
P = ParamField("Price
field",-1);
Periods = Param("Periods", 15, 2, 100, 1 );
Width = Param("Width", 2, 0, 10, 0.05 );
Color = ParamColor("Color", colorLightGrey );
Style = ParamStyle("Style")
| styleNoRescale;;
Plot( bbt = BBandTop(
P, Periods, Width ), "BBTop" + _PARAM_VALUES(),
Color, Style );
Plot( bbb = BBandBot(
P, Periods, Width ), "BBBot" + _PARAM_VALUES(),
Color, Style );
PlotOHLC( bbt,
bbt, bbb, bbb, "", ColorBlend(
Color, colorWhite, 0.9 ), styleCloud, Null, Null, Null,
-1 );
- Rectangle
and Ellipse drawing tool now are by default SOLID, with default fill color
being a blend between background and selected drawing color, they
are use ZOrder = -1 (behind regular plots) by default
- Support for SSL (secure
connection) e-mail alerts added, so now you can use your GMail accounts. (FC#83)
Steps:
1. Download and install AmiBroker 5.21 or higher
2. Download and run SSL add-on from http://www.amibroker.com/bin/SSLAddOn.exe
3. Configure (Tools->Preferences->Alerts) with SSL enabled as shown in
this picture:
http://www.amibroker.com/gifs/gmailalert.gif
- X-Y
co-ordinate labels on axes implemented. Can be controlled using View->X-Y
labels menu. (FC#1621, FC#732)
If you experience any problem with this beta version please send detailed
description of the problem (especially the steps needed to reproduce it) to
support at amibroker.com