January 27, 2017 14:07
THIS IS A BETA VERSION OF THE SOFTWARE. EXPECT BUGS !!!
Backup your data files and entire AmiBroker folder first!
INSTALLATION INSTRUCTIONS
First you need to have full version of AmiBroker 6.10 installed. Then just run the BETA installer and follow the instructions.
Then run AmiBroker. You should see "AmiBroker 6.20.0" written in the About box.
See CHANGE LOG below for detailed list of changes. Note that only changes that affect end-user directly are listed here. Internal code changes/refactoring is usually not mentioned.
CHANGE LOG
CHANGES FOR VERSION 6.20.0 (as compared to 6.19.0)
to run internal database maintenance by the plugin. This functionality is
likely to be used by data vendors such as Premium Data to provide maintenace
runs automation.
Ask your vendor for more info on available data plugin commands.
PRELIMINARY INFORMATION SUBJECT TO CHANGE
To support this feature in your plugin you would need to export DataPluginCmd function
#define DPC_INVALID_COMMAND -1
#define DPC_NOT_IMPLEMENTED 0
#define DPC_SUCCESS 1
#define DPC_STARTED_IN_THREAD 2
struct CommandData
{
int nStructSize;
HWND hNotifyWnd;
LPCTSTR pszDatabasePath;
struct _Workspace *pWorkspace;
struct InfoSite *pInfoSite;
};
int DataPluginCmd( LPCTSTR pszCommand, struct CommandData *pCmdData )
{
if( strcmp( "mycommand", pszCommand ) == 0 )
{
// do something
return DPC_SUCCESS;
}
else
{
return DPC_ INVALID_COMMAND;
}
}
return values
DPC_INVALID_COMMAND = -1
The command passed is invalid / does not exist
DPC_NOT_IMPLEMENTED = 0
Plugin does NOT implement any commands (this is automatically set by AMiBroker
prior to calling Notify())
DPC_SUCCESS = 1
Command completed successfully (command executed and completed)
DPC_STARTED_IN_THREAD = 2
(For future use - not implemented yet)
Command recognized but launched by the plugin in separate thread. Its completion
will be signalised by sending proper finalize message .
When starting in separate thread you should NOT use pCmdData pointer after
function returns as it is temporary and will be destroyed as soon DataPluginCmd
returns.
ExecuteAndWait amiquote\quote.exe YourTickerList.tls /download /close
WhatToExport decides what data should be exported:
= 0 - exports result list (the default behavior when this parameter is
not provided)
= 1 - exports walkforward tab
CHANGES FOR VERSION 6.19.0 (as compared to 6.18.0)
ARRAY - parameter decides on bar-by-bar basis which item from TextList is choosen
TextList - newline-separated list of texts to be displayed depending on ARRAY value. Note: newline is a "\n" symbol
This work so, when ARRAY value is zero, then first item from TextList is choosen and displayed, when ARRAY value is 1 then second item is choosen and so on.
This allows outputting conditional text in the exploration output, like this:
Buy = Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() );
Filter = 1; // all bars
AddColumn( Buy, "Buy" );
AddColumn( Sell, "Sell" );
TextList = "No signal\nBuy\nSell\nBuy and Sell";
TextSelector = 1 * Buy + 2 * Sell; /* would give 0 if no signal, 1 if a buy, 2 if a sell, 3 if both buy and sell */
AddMultiTextColumn( TextSelector, TextList, "Which signal" );
Note this feature works only in new Analysis window.
CHANGES FOR VERSION 6.18.0 (as compared to 6.17.0)
Example 2:
run batch and exit program when batch is finished
broker.exe /runbatch "C:\yourbatch.abb" /exit
Example 3:
load database from specified path, run batch and exit
broker.exe /database "C:\program files\amibroker\mydatabase" /runbatch "C:\yourbatch.abb" /exit
CHANGES FOR VERSION 6.17.0 (as compared to 6.16.0)
Internet* functions open wide area of applications including:
1. querying web APIs for extra data
2. using web/rest APIs for communication ( sending messages/alerts to Twitter,
SMS gateways, etc)
Example:
ih = InternetOpenURL( "https://www.quandl.com/api/v3/datasets/SEC/AAPL_SALESREVENUENET_Q.csv?api_key=" );
printf( "AAPL Revenue:\n" );
if( ih )
{
while( ( str = InternetReadString(
ih ) ) != "" )
{
printf( "%s",
str );
}
InternetClose( ih );
}
CHANGES FOR VERSION 6.16.0 (as compared to 6.15.0)
CHANGES FOR VERSION 6.15.0 (as compared to 6.14.0)
DateTimeFormat( "%A", dt );
To get YYYYMMDD without separtors use:
DateTimeFormat("%Y%m%d", dt );
Available formatting sequences are exactly like in strftime() C-runtime functionstrftime :
%a
Abbreviated weekday name
%A
Full weekday name
%b
Abbreviated month name
%B
Full month name
%c
Date and time representation appropriate for locale
%d
Day of month as decimal number (01 – 31)
%H
Hour in 24-hour format (00 – 23)
%I
Hour in 12-hour format (01 – 12)
%j
Day of year as decimal number (001 – 366)
%m
Month as decimal number (01 – 12)
%M
Minute as decimal number (00 – 59)
%p
Current locale’s A.M./P.M. indicator for 12-hour clock
%S
Second as decimal number (00 – 59)
%U
Week of year as decimal number, with Sunday as first day of week (00 – 53)
%w
Weekday as decimal number (0 – 6; Sunday is 0)
%W
Week of year as decimal number, with Monday as first day of week (00 – 53)
%x
Date representation for current locale
%X
Time representation for current locale
%y
Year without century, as decimal number (00 – 99)
%Y
Year with century, as decimal number
%z, %Z
Time-zone name or abbreviation; no characters if time zone is unknown
%%
Percent sign
Extra # flag may prefix any formatting code. In that case, the meaning of the format code is changed as follows.
Format Code Meaning
%#a, %#A, %#b, %#B, %#p, %#X, %#z, %#Z, %#% # flag is ignored.
%#c Long date and time representation, appropriate for current locale. For
example: “Tuesday, March 14, 1995, 12:41:29”.
%#x Long date representation, appropriate to current locale. For example: “Tuesday,
March 14, 1995”.
%#d, %#H, %#I, %#j, %#m, %#M, %#S, %#U, %#w, %#W, %#y, %#Y Remove leading
zeros (if any).
Note that these functions calculate excess kurtosis, so for normal distribution it is 0.
There is some controversy about what kurtosis really tells about distribution.
Most sources say that
The kurtosis of a data set provides a measure of the peakedness of the distribution
of the data, relative to the normal distribution.
A positive kurtosis value indicates a relatively peaked distribution and
a negative kurtosis value indicates a relatively flat distribution.
but Dr. Peter Westfall published an article that addresses why kurtosis
does not measure peakedness
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC4321753/
He says that "The kurtosis [...] is a measure of the combined weight of the tails relative to the rest of the distribution."
The Skewness of a data set is a measurement of the asymmetry of the distribution about the mean.
A Skewness of zero indicates perfect symmetry;
A positive Skewness indicates that more values lie below the mean and the
distribution has a 'tail' which extends towards the higher values;
A negative Skewness indicates that more values lie above the mean and the
distribution has a 'tail' which extends towards the lower values.
CHANGES FOR VERSION 6.14.0 (as compared to 6.13.0)
CHANGES FOR VERSION 6.13.0 (as compared to 6.12.0)
0 - X and Y coordinates are expressed in screen pixels
1 - X coordinate is bar index, Y coordinate is price
2 - X coordinate is pixel, Y coordinate is price
3 - X coordinate is bar index, Y is pixel
x = 19;
m = 2;
s = 9;
printf("PDF %g CDF %g", NormDist( x, m, s, False ), NormDist( x, m, s, True ) );
x = -7;
m = 0;
s = 1;
printf("PDF %g CDF %g", NormDist( x, m, s, False ), NormDist( x, m, s, True ) );
mx = PriceVolDistribution( H, L, V, 100, False, fvb, lvb );
GfxSetCoordsMode( 1 );
GfxSelectPen( colorRed );
bins = MxGetSize( mx, 0 );
for( i = 0; i < bins; i++ )
{
price = mx[ i ][ 0 ]; // price level
relvolume = mx[ i ][ 1 ]; // relative volume 0..1
relbar = relvolume * (lvb-fvb+1);
GfxMoveTo( fvb, price );
GfxLineTo( fvb + relbar, price );
}
Plot( C, "Price", colorDefault, styleBar );
if( ParamToggle("BuildinVAP", "No|Yes") ) PlotVAPOverlay( 100, 100, colorGreen, 2 );
Example error codes:
Loading 'AmiBroker\Plugins\FT.dll' - failed. Error code: 126: The specified
module could not be found.. (0.63 ms)
- this means that the FT.DLL could not be loaded because it depends on
other DLL that is missing (or not found in search path)
Loading 'AmiBroker\Plugins\TC2K.dll' - failed. Error code: 1114: A dynamic
link library (DLL) initialization routine failed.. (0.23 ms)
- this means that TC2K.DLL was loaded fine but its InitInstance function
exited with error code. In that case it was because Telechart was not
installed and/or its OLE server not registerd
Loading 'F:\AmiBroker\Plugins\Sample.dll' - failed. Error code: 193:
Not a valid 32-bit DLL. (0.14 ms)
- this means that you attempted to use 64-bit DLL with 32-bit application
(not supported by OS)
CHANGES FOR VERSION 6.12.0 (as compared to 6.11.0)
Loading and drawing BMP files is much faster than PNG (as much as 10 times
faster), approx load and rendering time is 0.3 ms for BMP, 3 ms for PNG
(alphablended).
Timings that you get from Code check and profile are misleading for Gfx
functions because they don't include actual on-screen rendering.
GfxDrawImage( "wizard.bmp", 100, 0 ); // bitmap - fast
GfxDrawImage( "logo.png", 30, 30 ); // png - supports per-pixel
alpha channel / transparency
Plot( y, "exponential growth", colorRed );
CHANGES FOR VERSION 6.11.0 (as compared to 6.10.0)
Filter = 1;
AddColumn( DateTime(), "DT
ISO", formatDateTimeISO ); // generate a date/time
column that is always in ISO format regardless of regional settings in Windows
HOW TO REPORT BUGS
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