Monday, February 20, 2012

Amibroker 5.4 highlights


Version

  • Fully Multi-threaded charting.
    Fully Multi-threaded graphics.
    Massively parallel execution AFL (each chart in separate thread runs pane) * Allows to maximize speed and utilisation of modern multi-core / multi-CPU computers.
    Massively parallel execution of the AFL (each graph pane runs a separate thread) speed and a modern multi-core / multi-CPU to maximize the use of computers.
    For example on your 8-core Intel i7 CPU upto 8 times faster than charts in version will run 5:30. The AFL engine has been completely rewritten from the ground up to allow multiple instances of the engine running simultaneously.
    8-core Intel i7 processor, for example, the charts will continue until 8 times faster than version 5:30. AFL motor completely to allow for simultaneously running multiple instances of the engine from scratch, re-written.
    This not only enables but also enhances responsiveness of the entire application multithreading, as the formula used even in a badly-written chart user is not able to lock or slow the rest of the program. Multi-threading is ON by default. It can not be turned off by unchecking the "Multi-threaded charts" box in the Tools-> Preferences , "AFL" tab but it is strongly discouraged.
    This provides not only multiple but also improves the entire application response, and even used a graphical user formula is poorly written or too slow is not possible to lock the rest of the program. Multi-threading is on by default. This can be turned off in the "Multi-threaded graphics" box unchecking Tools -> Preferences , "AFL" tab, but definitely not recommended.
    Multi-threading should be ON if you want AmiBroker to operate at full speed.
    If you want to run at full speed multi-threading should be ON AmiBroker.
  • 12 new AFL functions
    12 new AFL functions
    • DateTimeAdd - adds specified number of seconds / minutes / hours / days to datetime
      DateTimeAdd - datetime to seconds / minutes / hours / days, adds a certain number of
    • HMA - Hull Moving Average
      HMA - Hull Moving Average
    • FIR - Finite Impulse Response filter
      FIR - Finite Impulse Response Filter
    • PERCENTRANK - calculate percent rank
      PERCENTRANK - compute the rank of
    • Lookup - search for bars with the array specified date / time
      Search - The specified date / time range of the bar with the search
    • FirstVisibleValue - get first visible value of the array
      FirstVisibleValue - the array to get the value of the first visible
    • LastVisibleValue - get out of the last visible array
      LastVisibleValue - the array to get the value of the last visible
    • InGICS - check if given symbol belongs to category specified GICS
      InGICS - check if a given symbol belong to the category mentioned GIC
    • GicsID - get information about GICS category
      GicsID - information about the GIC category
    • PlaySound - to play. WAV sound file
      PlaySound -. WAV audio file to play
    • ShellExecute - execute external program / ​​file
      ShellExecute - External program / ​​run the file
    • _DT - synonym of StrToDateTime
      _DT - synonymous with StrToDateTime
  • Quote Editor improvements and fixes: * Allows user to turn on / off time shift and editing timestamps down to milliseconds, fixed handling of the 12 hour (AM / PM) regional setting
    Quote Editor improvements and fixes: user / time stamps down the millisecond time scrolling and editing , 12-hour fixed processing (AM / PM) Lets you turn on the regional setting
  • Charting improvements: better looking labels value, low-level gfx functions speeded up 4 times.
    Graphical improvements: better value labels appear, four times the speed of low-level gfx functions.
  • Charting-related changes
    Graphics-related changes
    • Data Window and Data Readout is immediate and does not require the extra tooltip AFL execution (values ​​stored in RAM are required to display them during the normal chart available without need to refresh and re-run of the formula).
      Read data from the Data Window and emergency and extra AFL execution (re-run them without the need for a formula to display the values ​​that the current during normal graphics refresh and stored in RAM) does not require tooltip.
      Tooltip variable is now obsolete.
      Number variable is now obsolete.
      Plotting a line without tooltips to display custom values ​​you can use in the Plot () with styleHidden flag.
      If the flag styleHidden Land () without drawing a line that you can use tooltips to display special values.
    • AFL does not require the display execution Interpreation
      Interpreation screen does not require execution of the AFL
    • Inserting indicator parameters are orders of magnitude faster and resetting
      Installing the display and reset the parameters is an order magnitude faster
    • zoom setting is now saved chart layout file and restored when a layout is loaded in
      zoom setting of the graphics and the layout is now saved to the file is loaded back to a layout
  • OLE interface improvements (new IsBusy object and Import method Analysis method of automatically refreshes the UI)
    enhancements OLE interface (UI refreshes to automatically analyze the object and import method IsBusy new method)
  • The AFL engine improvements:
    The AFL engine improvements:
    • detect potential user mistakes that added warnings - such as the assignment within conditional expression or redundant calls to plot () function
      () Function calls to Land or unnecessary in such a conditional expression in assignment - was added to determine the potential user errors, warnings
    • added extra checks for invalid parameter values ​​for many functions and array subscript == null - error message is displayed You APPROPRIATE
      an appropriate error message is displayed - for many functions, and the number of invalid parameter values ​​to be added for an empty token == extra control
    • PlotText optimized to conserve memory and reduce execution time by skipping invisible parts
      Protect and reduce execution time by skipping invisible parts PlotText memory optimized for
  • Fixes Account manager
    Account manager fixes
  • improved compatibility with Windows 7 (high-DPI aware manifest, compatibility with Internet Explorer 9)
    Better compatibility with Windows 7 (high-DPI aware of the manifest, compatibility with Internet Explorer 9)
  • 64bit-specific fixes (including fixing problems with 3rd party DLLs)
    64bit custom fixes (fixing problems with 3rd party DLL included)
  • appearance in new themes and many other improvements and fixes
    themes of innovation and a new look and many other fixes
DATETIMEADD
- Adds specified number of seconds / minutes / hours / days to datetime
- To Datetime seconds / minutes / hours / days, adds a certain number of 
Date / Time
SYNTAX
DateTimeAdd (datetime, amount, interval = inDaily)
DateTimeAdd (datetime, amount, range = inDaily)
RETURNS
The function adds specified amount of 'Intervals' to datetime input array.
Datetime function input array, 'ranges' adds a certain amount.
Allows for example to calculate the datetime back 5 days or 13 months into the future.
5 days or 13 months to calculate the future again, for example datetime provides.
INPUT:
INTRODUCTION:
  • datetime - scalar or array - the datetime value to add to (for example returned by Now (), DateTime () or StrToDateTime / _DT or ConvertDateTime functions)
    datetime - scalar or array - ((Now, returning for example), Date () or StrToDateTime / ConvertDateTime _DT or functions), add a datetime value
  • amount - number of 'Intervals' to add (seconds / minutes / hours / days / etc - Depending on interval-parameter)
    amount - add to the 'interval' number (seconds / minutes / hours / days / etc - depend on the parameter range)
  • interval - specifies unit you want to add, units are supported in1Second, in1Minute, inHourly, inDaily, inWeekly, inMonthly, inQuarterly, inYearly
    range - specifies the unit you want to add, support units in1Second, in1Minute, inHourly, inDaily, inWeekly, inMonthly, inQuarterly, has inYearly
RETURNS:
RETURNS: 
datetime (scalar or array) - returned depends on input type
datetime (scalar or array) - returns the input depends on the type of 

EXAMPLE
EXAMPLE / / Example 1: 

x = Now ); 
printf "11 days from the now" DateTimeToStr DateTimeAdd (x, 11 inDaily )) 

/ / Example 2 (commentary): 

x = Now ); 
printf "now is" DateTimeToStr (x)), 

for (shift = - 12 ; shift <= 12 ; shift + +) 

printf "% g seconds from now is" DateTimeToStr DateTimeAdd (x, shift, )) + "\ n" , shift); 
printf "% g minutes from now is" DateTimeToStr DateTimeAdd (x, shift, in1Minute )) + "\ n" , shift); 
printf "% g hours from now is" DateTimeToStr DateTimeAdd (x, shift, inHourly )) + "\ n" , shift); 
printf "% g days from now is" DateTimeToStr DateTimeAdd (x, shift, inDaily )) + "\ n" , shift) ; 
printf "% g weeks from now is" DateTimeToStr DateTimeAdd (x, shift, inWeekly )) + "\ n" , shift); 
printf "% g months from now is" DateTimeToStr DateTimeAdd (x, shift , inMonthly )) + "\ n" , shift); 
printf "% g quarters from now is" DateTimeToStr DateTimeAdd (x, shift, inQuarterly )) + "\ n" , shift); 
printf "% g years from now is " DateTimeToStr DateTimeAdd (x, shift, inYearly )) + "\ n \ n" , shift); 

}
SEE ALSO
SEE
DateTimeDiff () function, DateTimeToStr () function, DateTimeConvert () function, DateTime () function
 HMA
- Hull Moving Average
Moving averages, summation
Moving averages, the total

SYNTAX
HMA (array, range)
RETURNS
ARRAY
FUNCTION
Implements Hull Moving Average.

Hull Moving Average applies.
It is functionally equivalent to the following, code:

This is functionally equivalent to the following code: function HMA_AFL (array, period) 

fast = WMA (array, period / ), 
slow = WMA (array, period); 
return WMA * fast - slow, sqrt (period)); 
} 
EXAMPLE

SEE
MA () function, WMA () function
MA () function, WMA () function, as you can see HullMovingAverage 5:40 AmiBroker version is now put into service with the indicator can write a single line!! FIR

- Finite Impulse Response filter
Moving averages, summation
Moving averages, the total

SYNTAX
FIR (array, coefficients, size)
FIR (array, coefficients, size)
RETURNS
ARRAY

FUNCTION
This function implements the general-purpose Finite Impulse Response filter (FIR) http://en.wikipedia.org/wiki/Finite_impulse_response

This function, general-purpose Finite Impulse Response filter (FIR) applies http://en.wikipedia.org/wiki/Finite_impulse_response 

The output is call the convolution of the input table with coefficents (impulse response table).
Output and input coefficents ARAY table (table impulse response) is a convolution. 

Necessary if the function performs automatic normalization of the coefficient table (if its sum is not 1)
(He is not a sum) if necessary, automatically normalize function makes the coefficient table 

INPUTS:
INPUTS:
  • array - array to be smoothed input
    Array - The input sequence to be corrected
  • coefficients - array of FIR coefficients
    coefficients - number of FIR coefficients
  • size - number of coefficients (filter_order + 1)
    size - the number of coefficients (filter_order + 1)
It is functional (but 2 + times faster) following, the AFL equivalent of:
(But 2 + times faster), the AFL following equivalent functional: function FIR_AFL (input, coeff, size) 

result = 
sumcoeff = 
for (i = ; i < min (size, BarCount ); i + +) 

sumcoeff + = coeff [i]; 
result + = coeff [i] * Ref (input, - size + i + ); 

return result / sumcoeff; 
} 
EXAMPLE
EXAMPLE / / for example 5 bar weighted moving average can be written: 
coeff [ ] = 
coeff [ ] = 
coeff [ ] = 
coeff [ ] = 
coeff [ ] = 

FIR Close , coeff, ); / / Another example: FIR Filter with ALMA is considered / / shifted Gaussian coefficents can be implemented as follows: functionALMA_AFL (input, range, offset, sigma) 

local m, im, s, Coeff , 

m = floor (Offset * (range - )), 
s = range / sigma; 

for (i = ; i < min (range, BarCount ); i + +) 

im = i - m; 
Coeff [i] = exp (- (im * im) / ( * s * s)); 

return FIR (input, Coeff, range); 


PERCENTRANK
- Calculate percent rank
- Percentage calculating rank 

SYNTAX
PERCENTRANK (array, range)

PERCENTRANK (array, range)
RETURNS

RETURNS
ARRAY

ARRAY
FUNCTION

FUNCTION
INPUTS:
Aarray - input data
  • Array - the data entry
  • range - range lookback
    range - range of lookback
Returns percent rank (0 .. 100) of the current element of the array with all elements over the specified range.
Element in the array gives the rank of all elements of the specified range (0 ... 100). 

A value of 100 indicates that the current element of the array is the Highest lookback for the given range, while a value of 0 indicates that the current value is the lowest range for the given lookback.

A value of 0 indicates that the current value is the lowest for the lookback interval value of 100, the highest for the range of the array element indicates that the lookback.
It is equivalent (but 2x faster) to:

This is equivalent (but faster than 2x) to: function PercentRank2 (Data, Periods) 

count = 
for (i = ; i <= Periods; i + +) 

Count + = Data> Ref (Data,-i); 

return 100 * Count / Periods; 
}

LOOKUP (SEARCH)

Lookup (array, datetime, mode = 0)
Search (array, datetime, mode = 0)
RETURNS

RETURNS
NUMBER

NUMBER
FUNCTION

FUNCTION
The function searches for the bar with specified datetime and returns the value from the same position of the input array.

The datetime function returns the value from the same position with the bar looks and the input array. 

Parameter 'mode' search is performed Decides how exact match is not found in the case when:
Parameter 'mode' when searching for an exact match is found, how to decide when:
  • mode = 0 - find exact match, otherwise return null
    mode = 0 - to find an exact match, otherwise return null
  • mode = -1 - find exact match, otherwise return nearest predecesor (past last bar is if it will return a datetime value last bar)
    mode = -1 - to find an exact match, otherwise the nearest predecesor (datetime the last bar of the previous bar, the value of past returns) return
  • mode = -2 - find exact match, otherwise return nearest predecessor EXCEPT the very last bar (last bar if past is searched, it will return a datetime Null)
    mode = -2 - to find an exact match, otherwise the closest ancestor of the last bar EXCEPT (called datetime the last bar will return to the past while she is empty) return
  • mode = 1 - find exact match, otherwise return nearest successor (first bar, it will return if before first bar is datetime value)
    mode = 1 - find an exact match, otherwise the nearest successor (the first bar before the first bar returns datetime) return
  • mode = 2 - find exact match, otherwise return nearest successor EXCEPT the very first bar (first bar before if it is searched, will return a datetime Null)
    mode = 2 - find an exact match, otherwise the closest successor to the first bar EXCEPT (datetime sought before the first bar is empty it will return to) return
This function uses a binary search and it is very fast many times faster than previous methods such as the AFL-based FindValueAtDateTime () presented in the past.

This function uses a very fast and many times faster than binary search FindValueAtDateTime presented in the past (), such as the AFL-based method is faster than before.
Any call to FindValueAtDateTime (input, dt, value) can be replaced now with Lookup (input, value) (here is no need to pass dt-datetime).

Any call for FindValueAtDateTime (input, dt, value) now search (input, value) (where there is no need to pass a datetime dt-) can be replaced with.
NOTE: This function does not affect required QuickAFL bars, bars that therefore it will only search in arrays are actually loaded.

NOTE: This function does not affect QuickAFL bars needed, so they really look for arrays loaded rods.
For indicators that it may mean it will not be able to find out if it is invisible, unless you use SetBarsRequired () function to Ensure that more bars are loaded.

For indicators to make sure that you have more bars SetBarsRequired () can use the function as long as it does not appear that the value may not be able to find. 

EXAMPLE
EXAMPLE InputDate = "2011-04-05" 
Title = "Close value at (or before)" + InputDate + "is" Lookup Close , _DT (InputDate), - );

SEE ALSO
DateTime () function, StrToDateTime () function, _DT () function

Date () function, StrToDateTime () function, _DT () function FIRSTVISIBLEVALUE


- Get first visible value of the array

- Get the value of the first visible array 

Indicators
SYNTAX

SYNTAX
FirstVisibleValue (array)

FirstVisibleValue (array)
RETURNS

RETURNS
NUMBER

NUMBER
FUNCTION

FUNCTION
When used in charts / indicators / Interpretation of the function returns the values ​​of the array at the first visible bar.
Charts / indicators / function is used to interpret the array returns the values ​​from the first visible at the bar.
In other (non-indicator) function returns the array elements with subscripts of modes 0
Other (non-display) modes with indices of array elements function returns 0.
These functions do not affect QuickAFL Note that, so instead of LastValue LastVisibleValue may be used.
QuickAFL these functions, so it does not affect LastVisibleValue may be used in place note LastValue.
These functions are intended to complement already available via HighestVisibleValue and LowestVisibleValue functionality.
These functions are designed to complement the functions already available with HighestVisibleValue and LowestVisibleValue. 

EXAMPLE
SAMPLE x = C ; 
Plot (x, "x" colorRed ) 
Plot FirstVisibleValue (x), "FVV" colorGreen ) 
Plot LastVisibleValue (x), "lvv" colorBlue );
SEE ALSO

SEE
HighestVisibleValue () function, LowestVisibleValue () function, LastVisibleValue () function LASTVISIBLEVALUE
- Get value of last visible array
- Get the value of the series last visible 

SYNTAX
LastVisibleValue (array)
LastVisibleValue (array)
RETURNS

FUNCTION
When used in charts / indicators / Interpretation of the function returns the values ​​of the array at the last visible bar.
Charts / indicators / function is used to interpret the array returns the values ​​from the last visible bar.
In other (non-indicator) function returns the array element with subscripts modes of BarCount-1.
Other (non-display) modes, the function returns the array element with BarCount-1 indices.
These functions do not affect QuickAFL Note that, so instead of LastValue LastVisibleValue These functions are used may be intended to complement already available via HighestVisibleValue and LowestVisibleValue functionality.
QuickAFL these functions, so LastVisibleValue HighestVisibleValue These functions are designed to complement and replace the function of LowestVisibleValue LastValue already may have been used over the note does not affect. 

EXAMPLE
SAMPLE x = C ; 
Plot (x, "x" colorRed ) 
Plot FirstVisibleValue (x), "FVV" colorGreen ) 
Plot LastVisibleValue (x), "lvv" colorBlue );
SEE ALSO
FirstVisibleValue () function, HighestVisibleValue () function, LowestVisibleValue () function INGICS

Test GICS membership
- Test GIC membership 
Information / Categories

SYNTAX
InGICS ("gics_code")

InGICS ("gics_code")
RETURNS

FUNCTION
The function performs yes / no if test given current symbol belongs to GICS GICS category for example if the symbol is set for 15103020 InGics ("15"), InGICS ("1510"), InGics ("151 030") and InGics ("15.10302 million "), but all others will ALL return true (like InGics (" 20 ")) will return false.
15103020 for the symbol in the GIC InGics ("15"), InGICS ("1510"), InGics ("151 030") and InGics ("GIC 15.10302 million belong to the category given to the function of the icon, for example yes / no test performs") will return ALL the right, but others (InGics (such as "20")) will return false.
EXAMPLE printf "GICS (0) =" GicsID )); 
printf "GICS (1) =" GicsID )); 
printf "GICS (2) =" GicsID )) 

for (i = 10 , i < 90 , i + = 

gics_code = StrFormat "% 02.0f" , i); 
printf "In Gics" " + gics_code + "=% S \ n" InGics (gics_code) ); 
}
SEE ALSO

GicsID () function, InWatchList () function, InWatchListName () function
GicsID () function, InWatchList () function, InWatchListName () function GICSID

FUNCTION
The function gets information about current symbol GICS category.

The function retrieves information about the icon GIC category.
  • mode = 0 - returns a string containing GICS code alone (such as the "15,103,020")
    mode = 0 - solo GIC returns a string containing the code ("15,103,020", etc.)
  • mode = 1 - returns a string containing GICS category name (such as the "Paper Packaging")
    mode = 1 - GIC category name (for example, "Paper and Packaging", etc.) returns a string containing
  • mode = 2 - returns a string containing both code and name (such as the "15,103,020 Paper Packaging")
    mode = 2 - code and name ("15,103,020 Paper and Packaging", etc.) and returns a string containing
EXAMPLE
EXAMPLE printf "GICS (0) =" GicsID )); 
printf "GICS (1) =" GicsID )); 
printf "GICS (2) =" GicsID )) 

for (i = 10 , i < 90 , i + = 

gics_code = StrFormat "% 02.0f" , i); 
printf "In Gics" " + gics_code + "=% S \ n" InGics (gics_code) ); 
}
SEE ALSO

InGICS () function, INDUSTRYID () function, GroupID () function, MARKETID () function, SECTORID () function
InGICS () function, INDUSTRYID () function, groupId () function, MARKETID () function, SECTORID () function 
EXAMPLE
PlaySound ("c: \ \ windows \ \ media \ \ ding.wav");
PlaySound ("c: \ \ windows \ \ media \ \ ding.wav"); ShellExecute

SYNTAX
ShellExecute ("filename" "arguments", "working" showcmd = 1)
ShellExecute ("file", "independent", "working" showcmd = 1)
RETURNS
The function opens a file or executable runs. Function tries to open a file or executable. 
It is equivalent of the Windows API ShellExecute, with one difference, it always uses the "open" verb.
With one difference, equal to the Windows API ShellExecute always "open" verb uses.
This Allows running executables, scripts, opening files using the document associated Their editors, etc.
This work is carried out, scripts, such as document files using landing provides the associated editors
If the function succeeds, it returns a value greater than 32
If the function succeeds, returns a value greater than 32.
If the function fails, it returns an error value indicates that the cause of the failure.
If the function fails, an error value indicates the cause of failure.
For possible error codes, consult the Microsoft documentation: http://msdn.microsoft.com/en-us/library/bb762153 (VS.85). aspx

Possible error codes, see the Microsoft documentation: . http://msdn.microsoft.com/en-us/library/bb762153 (VS.85 aspx) 

EXAMPLE
ShellExecute ("notepad.exe", "", "");
ShellExecute ("notepad.exe", "", ""); _DT
- Convert string to datetime

_DT ("Date string");
_DT ("Date string");


FUNCTION
Representing converts a string date / time DateTime value to the Corresponding number (that can later be compared to the output of DateTime () function for example).
(Later DateTime (for example) is comparable to the output function) string of numbers representing DateTime date / time value of the converts.
This function is synonym / shortcut for StrToDateTime function.
This function is synonymous with / for links to the StrToDateTime function.
SEE
StrToDateTime () function
StrToDateTime () function

Print this post

No comments: