PureBytes Links
Trading Reference Links
|
it seems it is the way it works in backtester
period=Optimize("period",5,5,20,1);
Tomasz = IIf(C>Ref(C,-period),1,0);
AddToComposite(Tomasz , "~Tomasz", "V",8);//8 for backtest
Buy=0;
Trend= Ref(Foreign("~Tomasz", "V") > 0,-1) ;
Buy=Cross(Random(),0.5) AND Trend;
Sell=Ref(ExRemSpan(Buy,3),-3);
stephane
>
> A new beta version of AmiBroker (4.18.0) is available for download
now
> from the following locations:
>
> http://www.amibroker.com/bin/ab4180beta.exe
> http://www.amibroker.net/bin/ab4180beta.exe
> ftp://ftp.amibroker.com/pub/ab4180beta.exe
> ftp://ftp.amibroker.net/pub/ab4180beta.exe
>
> (411KB self-extracting archive)
>
> Please read the "Read Me" file for description of changes.
>
> Best regards,
> Tomasz Janeczko
> amibroker.com
>
>
>
> AmiBroker 4.18.0 Beta Read Me
> October 8, 2002 18:19
>
> 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.00 first.
>
> Just run the installer and follow the instructions.
>
> Then run AmiBroker. You should see "AmiBroker 4.18.0 beta" written
in the About box.
>
> CHANGES FOR VERSION 4.18.0 (as compared to 4.17.0)
>
> a.. fixed too long chart title text bug
> b.. fixed scroll bar thumb sizing
> c.. RMB->Copy in AA result list works again
> d.. better keyboard operation in AA window (window does not
loose focus after Check/Load AFL rules)
> e.. minor fixes / changes
> changed date axis min skip step from 4 to 5
> added case sensitive check in few more places when
Pref.CaseSensitiveTickers is ON
> intraday interval saved in layouts is properly restored
> f.. Real time quote window: DEL works now again
> g.. can now display different N-tick bars for the same symbol
> h.. fixed bug in Status('firstbarinrange') that occured if range
exceeded number of quotes
>
> i.. tooltips are protected against displaying more than 25 lines
of text (prevents flashing)
> j.. OLE automation application.RefreshAll is asynchronous now
> k.. charts are always refreshed after scan using AddToComposite
(even if composite ticker already exists)
> l.. 'From' date in AA now works as expected in intraday mode
> m.. Profile view is refreshed when View->Profile is choosen
> n.. new profile template fields {s} - gives ticker symbol in
lowercase
> {S} - gives ticker symbol in UPPERCASE (the old {t} - gives
ticker symbol in the orignal case
> (as typed in Information window)
> o.. Categories window saves edits in Profile URL without any
extra clicks
> p.. AddToComposite has 2 new flags that allow running
AddToComposite in backtest/optimization mode and exploration mode
>
> atcFlagEnableInBacktest = 8
> atcFlagEnableInExplore = 16
>
> q.. the following constants were added for readability of
formulas using AddToComposite:
>
> atcFlagResetValues = 1
> atcFlagCompositeGroup = 2
> atcFlagTimeStamp = 4
> atcFlagEnableInBacktest = 8
> atcFlagEnableInExplore = 16
> atcFlagDefaults = atcFlagResetValues | atcFlagCompositeGroup |
atcFlagTimeStamp;
>
>
> r.. shorter/taller bars (compress/expand Y axis) option added on
numerous requests (note that this is temporary solution - better one
will come, so please don't ask me to change this because it will be
changed anyway)
>
> CHANGES FOR VERSION 4.17.0 (as compared to 4.16.0)
>
> a.. added Gann Square and Gann Fan drawing tools with
customisation dialogs (angle of line is displayed in the status bar)
> b.. added parallel trend line tool
> c.. studies can be dragged without "shrinking" effect beyond
upper and lower chart border and beyond left and right border (but
within available quotation range plus right margin)
> d.. New toolbar buttons for ray (right-extend line) and extend
(left and right) lines
> e.. Format toolbar controls (color, thick, dotted) change
selected drawing style & color
> f.. snap to price was not accurate in v4.15-4.16 now it is
accurate again
> g.. snap to price now works in "magnet" mode - so it snaps only
if cursor is within 5% distance to high/low price. Snap % threshold
is definable in Preferences/Charting
> h.. usability improvement: even when "return to select mode
after drawing" is ON, you can draw mutliple studies one after
another quickly if you hold down CTRL key while releasing the
button.
> i.. usability improvement: you can now draw objects with OR
without holding left mouse button pressed while drawing.
> j.. drawing object is now automatically selected when "return to
select mode after drawing" is ON and "auto-select last drawn object"
is also ON. This makes it easier to delete/copy/cut or see its
properties (Alt+Enter) immediatelly.
> k.. #include can now be written also in upper case
> l.. some UI clean-up:
> a.. added "Format" menu just to conform with MS
recommendations for user interface,
> b.. moved "snap to price" to Format menu and moved "Erase
watch lists" to "Symbol" menu.
> c.. "Snap to price" now available from toolbar. Right and left
extend available from Format menu.
> d.. Added "Properties" and "Delete all" to "Edit" for
consistency
> e.. "Quotations..." has been renamed to "Quote Editor" and
toolbar icon has been changed
> f.. certain rarely used toolbar icons from "main toolbar" were
removed to save space (Add/Delete/Split Symbol - regular menu is
more appropriate for that operations)
> m.. X-coordinate display pane in status bar enlarged to
accommodate time also
> n.. added "Copy Image as Metafile" option to Edit menu. Metafile
is a vector format so you can resize copied picture without
distortion. (useful for creating documents that are printed later)
> o.. Quote Editor (QE) improvements:
> a.. you can now delete quotes in QE - select one or more
quotes from the list (SHIFT/CTRL to multi-select) and press "Delete"
button
>
> b.. QE made several times faster displaying 20'000 bars
in "current" symbol mode takes about 2 seconds now.
> p.. now tickers can be case-sensitive. This is useful if you
want to treat. ABC and ABc as different symbols. Tools-
>Preferences "Miscellaneous" : "Case sensitive ticker symbols"
> USE WITH CARE AS CERTAIN PLUGINS (eSignal plugin for example) DO
NOT HANDLE CASE SENSITIVITY
>
> CHANGES FOR VERSION 4.16.0 (as compared to 4.15.1)
>
> a.. completely re-designed Fibonacci retracement tool allowing
full customization and more flexibility. Just draw a Fib retracement
and double click on it (or choose Edit->Properties). Customization
dialog is available on "Fibonacci" tab.
> b.. new setting in Tools->Preferences->Charting "Select quote
only by CTRL+LMB" -
> if marked quote selection is accessible only via double click or
single click WITH CTRL key depressed (v4.15 style).
> if unmarked quote selection is possible via single click (old
style)
> c.. trend line properties dialog moved to property sheet for
consistency.
> CHANGES FOR VERSION 4.15.1 (as compared to 4.15.0)
>
> a.. fixed bug with date axis display that appeared in 4.15.0
> b.. fixed problem with moving/sizing objects when multiple
windows were open
> c.. removed "Move/Size" toolbar button:
> now editing/moving/sizing is enabled by default in
regular "Select" mode (arrow cursor) the old functionality (pick
quotation) is available if you hold down CTRL key while clicking
once on the chart or by double click on a chart while not being over
an object. Double click over object - shows properties.
> d.. added "Return to select mode after drawing" option in Tools-
>Preferences->Charting
> - when it is switched ON (by default) - right after drawing any
object it is available for moving/sizing/deletion.
> CHANGES FOR VERSION 4.15.0 (as compared to 4.14.0)
>
> a.. moving and sizing of drawing objects (see new "Move/Size"
button in draw tool bar)
> b.. cut/copy/paste/delete of drawing objects (Edit menu and
standard shortcuts, need to mark object first in Move/Size mode)
> c.. blank space in the right-hand side of the chart for drawing
future trend line projections
> d.. moved charting related preferences setting to new
tab "Charting"
> e.. new setting for number of blank bars in right margin
(Charting tab)
> CHANGES FOR VERSION 4.14.0 (as compared to 4.13.1)
>
> a.. fixed problem with creating new databases that occurred on
certain MSVCRT versions
> b.. styleOwnScale adjusts Base level for histogram and area
style back to minvalue or zero whichever is less
>
> c.. Plot, PlotOHLC and PlotForeign have 2 additional parameters
for specifying fixed minimum and maximum values for Y-axis
> Note that new parameters work only when styleOwnScale is used:
>
> Plot( array, title, color, style = styleLine, min = {empty}, max
= {empty} )
> PlotOHLC( open, high, low, close, title, color, style =
styleLine, min= {empty}, max = {empty} )
> PlotForeign( ticker, title, color, style = styleLine, min=
{empty}, max = {empty} )
>
> New parameters make it easy to plot ribbons, for example:
> Plot( Close, "Price", colorBlue, styleCandle );
> Plot( 2, /* defines the height of the ribbon in percent of pane
width */
> "Ribbon",
> IIf( up, colorGreen, IIf( down, colorRed, 0 )), /* choose color
*/
> styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );
>
> It also makes it easy to plot 2 or more "own scale" plots with
the same scaling:
>
> minimum = LastValue( Lowest( Volume ) );
> maximum = LastValue( Highest( Volume ) );
>
> Plot( Close, "Price", colorBlue, styleCandle );
>
> /* two plots below use OwnScale but the scale is common because
we set min and max values of Y axis */
> Plot( Volume, "Volume", colorGreen, styleHistogram | styleThick
| styleOwnScale, minimum, maximum );
> Plot( MA( Volume, 15 ), "MA volume", colorRed, styleLine |
styleOwnScale, minimum, maximum );
>
> a.. fixed date axis display for custom intraday intervals longer
than 60 minutes
> b.. "dirty" flag is set properly now during ASCII import in
$OVERWRITE 1 mode (solves import watch list problem)
> c.. when switching layouts ticker bar selection is now
synchronized with active window
> d.. after AA->Scan Foreign symbol cache is flushed
> e.. now styleLeftAxisScale really allows modification of built-
in price chart to feature moving average of volume
> // Now plot volume and its moving average using left-hand axis
scaling
> Plot( Volume , "Volume", colorBlue, styleLeftAxisScale |
styleHistogram | styleThick | styleNoLabel );
> Plot( MA( Volume,15), "MAV", colorLightBlue, styleLeftAxisScale
| styleNoLabel );
> f.. ASCII importer and Import Wizard now allows to import
negative prices (useful for spreads). New command is $ALLOWNEG 1 and
new check box in Import Wizard is "allow negative prices". Please
note that logarithmic scale can NOT be used to display negative
prices because log() function is undefined for negative values.
> g.. four new AFL functions:
> a.. LinRegIntercept( ARRAY, periods )- calculates intercept of
linear regression line the "a" coefficient
> in a + b*x (LinRegSlope calculates b)
> b.. LinearReg( ARRAY, periods )- calculates linear regression
line ending value according to
> a + b * x (where a and b are intercept and slope of linear
regression line)
> c.. StdErr( ARRAY, periods )- calculates standard error
function (standard error of linear regression estimate) - the same
as MS' STE function
> d.. TSF( ARRAY, periods ) - calculates time series forecast
indicator (similar to LinearReg but differs by
> the value of lin reg slope)
>
> CHANGES FOR VERSION 4.13.1 (as compared to 4.13.0)
>
> a.. F4 key for Edit | GoToSymbol works again and can be
redefined in the shortcut editor
> b.. new style: styleLeftAxisScale = 65536 - allows to plot more
than one graph using common scaling but different from regular
(right axis) scale.
> Example: price plot plus volume and moving average plot:
> // Plot price plot and its moving average
> Plot( Close, "Price", colorWhite, styleCandle );
> Plot( MA( Close, 20 ), "MAC", colorRed );
>
> // Now plot volume and its moving average using left-hand axis
scaling
> Plot( Volume , "Volume", colorBlue, styleLeftAxisScale |
styleHistogram | styleThick );
> Plot( MA( Volume,15), "MAV", colorLightBlue,
styleLeftAxisScale );
>
> (in one of the future betas you will be able to display ruler
for left-hand axis)
>
>
> CHANGES FOR VERSION 4.13.0 (as compared to 4.12.0)
>
> a.. fixed bug with loading layouts for stocks that have spaces
in the ticker symbol
> b.. new pre-defined shortcut keys: Alt+Left = Next symbol,
Alt+Right = Prev symbol,
> Ctrl+NumPadPLUS = Zoom In, Ctrl+NumPadMINUS = Zoom Out,
> Ctrl+PageUp = Prev Sheet, Ctrl+PageDown = Next Sheet
> c.. new keyboard shortcut editor in Tools->Preferences->Keyboard
allow user-definable keyboard shortcuts
> d.. fixed display bug in Preferences->Intraday that caused
rounding to full hours custom bar intervals of more than 60 minutes
> e.. Layouts->Save As does not generate duplicate entries in the
tree when already existing name is typed in (it was harmless but
still not nice)
> f.. A confirmation box is displayed when choosing Edit->Delete
session
> g.. fixed problem with incorrect interval shown in the settings
section of the report when hourly periodicity was selected
> h.. new style: styleOwnScale = 32768 allows plotting graphs with
independent scalling (like volume graph on price plot)
> i.. implemented PlotForeign("ticker", "title", color, style =
styleCandle | styleOwnScale )
> j.. implemented PlotOHLC( open, high, low, close, "title",
color, style = styleCandle | styleOwnScale ) that allows plotting
candlesticks/bars from other arrays without need to overwrite
existing OHL arrays.
>
> CHANGES FOR VERSION 4.12.0 (as compared to 4.10.3)
>
> a.. color coded and multi-line caption bars in indicators
> colors are selected automatically when using Plot() function or
graphNcolor variable.
> If you use Title variable you have to specify colors in the
string.
> Colors can be specified using \\cXX sequence where XX is 2 digit
number specifying color index \\c38 - defines violet, there is a
special sequence \\c-1 that resets to default axis color.
> For example
>
> Title = "This is written in \\c38violet color \\c27and this in
green";
>
> You can also use new AFL function that makes it easier. Function
is called
> EncodeColor( colornumber ).
> And you can write the above example like this:
>
> Title = "This is written in " + EncodeColor( colorViolet )
+ "violet color " + EncodeColor( colorGreen ) + "and this in green";
>
> Multi-line caption is possible by simply embedding line break
\n, for example:
> Title = "This is 1st line\nThis is second line";
>
>
> b.. new layout handling code:
> a.. you can now have unlimited number of
> custom, multiple-window templates that can be switched between
with just double click on layout name in the "Layouts" tab of the
Workspace window
> b.. you can open/save/delete layout by clicking on the Layout
tree with right mouse button and choosing appropriate
function. "Save As" option saves current layout under new name.
> c.. Local layouts are per-database while Global layouts are
visible from all databases.
> d.. information saved in layouts include: window sizes and
postions, maximized/minimized state chart panes available on each
sheet (independent for each window), selected bar interval, selected
symbol, selected chart sheet
> e.. Most recently used layout can be saved on exit and
database switch automatically (see: Tools->Prefs-
>Miscellaneous "Save on exit: Layouts")
> f.. old single-window layouts are now renamed to "templates"
> c.. CCIa( array, period ) function added - works like CCI but
accepts input array instead of working on (C+H+L)/3
> d.. implemented a *very* basic pre-processor with single command
#include that allows to include external AFL files into your
formula. Syntax:
> #include "path\to my file\name path.afl"
> Note 1: include statement need SINGLE backslashes in the path
(this is quite the opposite to normal AFL sting
> parsing)
> Note 2: using #include command may slow down formula execution
even
> considering the fact that AmiBroker tries to include only once
and cache pre-processed text
> Note 3: that currently no error message is given if #include
fails and this code
> is experimental.
> Note 4: nesting #include commands is not supported
> e.. balloon tooltips for status bar
> f.. color-coded plugin status pane in the status bar, plus pop-
up balloon notifications when connection state changes
> g.. ability to link custom menu to the plugin status pane - new
QT plugin (beta) provides Connect/Shutdown options thru such menu.
> h.. data plugins receive UNLOAD notification correctly
> i.. you can sort columns in Quotation Editor by click on column
header
> j.. layout of Quick Review window changed to allow smaller
window size.
> k.. Intraday settings dialog allows wider time shift -23..+23
hours
> 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 bugs@xxxx
|