March 24, 2014 16:57
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 5.70 first.
Just run the installer and follow the instructions.
Then run AmiBroker. You should see "AmiBroker 5.74.0 BETA" 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 5.74.0 (as compared to 5.73.0)
The XML schema for snippets file is simple (as below). Key trigger functionality is NOT yet implemented, however Keytrigger fields should be included in the definition for future use. It will be work like 'autocomplete' so that you type the shortcut it, it will unfold to the formula.
Suggestions for new snippets are welcome.
<?xml version="1.0" encoding="ISO-8859-1"?>
<AmiBroker-CodeSnippets CompactMode="0">
<Snippet>
<Name>First Snippet</Name>
<Description>Description of the snippet</Description>
<Category>User category</Category>
<KeyTrigger>?trigger1</KeyTrigger>
<Formula>
<![CDATA[
// the formula itself
]]>
</Formula>
</Snippet>
<Snippet>
<Name>Second Snippet</Name>
<Description>Description of the snippet</Description>
<Category>User category</Category>
<KeyTrigger>?trigger2</KeyTrigger>
<Formula>
<![CDATA[
// the formula itself
]]>
</Formula>
</Snippet>
</AmiBroker-CodeSnippets>
Plot( C, "Price", colorDefault );
GraphGridZOrder = 1;
GfxSetZOrder(0);
GfxSelectSolidBrush( colorGreen );
GfxCircle( 100, 100, 100 );
GfxSetZOrder(-1);
GfxSelectSolidBrush( colorRed );
GfxCircle( 150, 150, 100 );
GfxSetZOrder(-2);
GfxSelectSolidBrush( colorBlue );
GfxCircle( 180, 180, 100 );
// fractional radius is
supported, so 0.5 would mean half of space between bars
Plot ( C, "", colorDefault);
GfxSetCoordsMode( 1 );
GfxSelectSolidBrush( colorViolet );
GfxSelectPen( colorRed );
bi = BarIndex();
start = FirstVisibleValue(
bi );
end = LastVisibleValue(
bi );
r = Param("radius", 1,
-5, 4, 0.1 );
for ( i = start;
i <= end; i ++ )
{
GfxCircle (
i , Close [i]
, r);
}
GfxSetZOrder(5 );
GfxSelectFont("Tahoma", 30 );
GfxSetTextColor( colorWhite );
text = "This is a test";
GfxTextOut(text, 0, 50);
GfxSetTextColor( colorRed );
GfxTextOut("second
part in red", GfxGetTextWidth(text), 50 );
When sharing parameter is set to False (default) no such checking occurs
and file is open anyway without denying others to read/write. This may cause
data corruption if file is written to from multiple threads/external processes
at the same time. If you want to use this mode (sharing set to False) in
multithreaded environment to write data, you need to care about synchronization
yourself for example using critical section.
SetChartOptions( 1, chartDisableYAxisCursor | chartDisableTooltips ); //
don't change cursor shape in Y axis area and tooltips
CHANGES FOR VERSION 5.73.0 (as compared to 5.72.0)
It is important to understand that persistent variables are saved ON EXIT
automatically, without any user intervention
so it should be enough for most cases. If you for some reason want auto-saves
when AmiBroker is running, then
you can use this function.
Please note that writing many static variables into physical disk file
takes time and it blocks all static variable access
so you should AVOID specifying too small auto-save intervals.
Saving every second is bad idea - it will cause overload. Saving every
60 seconds should be fine.
Calling function with interval set to zero disables auto-save.
SetOption("StaticVarAutoSave", 0 );
AFL: new GfxSetCoordsMode
- rewritten Low-Level Gfx to allow fractional coords and bar/price co-ords
mode in addition to pixel
// NEW FUNCTION
GfxSetCoordsMode( mode );
- allows to switch co-ordinate system for low-level gfx functions from sceen
pixel (mode = 0) - the default, to
bar / price mode (mode = 1 ) where X is expressed in bar index and Y is expressed
in
price.
This new mode allows way easier overlays on top of existing charts without need
to do conversion between bars/price pixels
and without any extra refresh normally required in old versions when Y scale
changed.
The function can be called to switch back and forth from pixel -> bar/price
mode and vice versa a number of times
allowing to mix different modes in the same chart.
When co-ordinate mode 1 is selected (bar/price), co-ordinates can be fractional. For example if x is 2.5 it means half way between bar 2 and 3.
Example:
// The sample shows
how using GfxSetCoordsMode( 1 )
// results in
// a) easier coding of overlay charts that plot
on top of built-in charts (no need to convert from bar/price to pixels)
// b) perfect matching between built-in Plot()
and Gfx positioning
Plot( C, "Price", colorDefault, styleLine );
GfxSetOverlayMode( 1 );
GfxSetCoordsMode( 1 ); //
bar/price mode (instead of pixel)
GfxSelectSolidBrush( colorRed );
GfxSelectPen( colorRed );
boxheight = 0.01 *
( HighestVisibleValue( C )
- LowestVisibleValue( C )
);
bi = BarIndex();
start = FirstVisibleValue(
bi );
end = LastVisibleValue(
bi );
for ( i =
start; i <= end; i++ )
{
Cl = Close[
i ];
Op = Open[
i ];
Color = IIf( Cl > Op, colorGreen, colorRed );
GfxSelectPen(
Color );
GfxSelectSolidBrush(
Color );
bodyup = Max( Op,
Cl );
bodydn = Min( Op,
Cl );
GfxEllipse(
i - 0.4, bodyup,
i + 0.4, bodydn );
GfxMoveTo(
i, H[ i ]
);
GfxLineTo(
i, bodyup );
GfxMoveTo(
i, bodydn );
GfxLineTo(
i, L[ i ]
);
}
Charts: functions calculating day offset (GetBarsBetweenDates) support years > 2038 and are now much faster (don't count days in loops but use smarter calendar math instead)
Charts: Cycle Lines tool has drawn lines in weird places when using very long cycles that resulted in lines being positioned beyond 2038. Fixed.
UI: added View->Price chart style->Bars without ticks
Change #2534 made in 5.71.0 (allowing Null for Close
field in bar chart) created backward compatiblity issue. Reverted.
Instead a
new styleBarNoTick
introduced
that allows to plot bar chart without open/close ticks:
Plot( IIf( Month() & 1, C, Null ), "Price", colorDefault, styleBarNoTicks | styleThick ); //
bar chart without open/close ticks
New Analysis: when Non-exhaustive Optimize was used on symbol without any quotes, UI displayed error and remained disabled and it was not possible to re-run non-exhaustive opt. Fixed.
New Analysis: Backtest: Profit
figures are color-coded now (negative - red/positive - green)
CHANGES FOR VERSION 5.72.0 (as compared to 5.71.0)
if( ParamTrigger("Set
variable", "Set" )
)
{
StaticVarSet("varx", Close, True ); //
set persistent variable
}
Plot( StaticVarGet("varx"), "Persistent
var", colorRed );
allows to turn this off (so newly added symbols have "use only local database" turned off)
This flag does NOT affect existing symbols.
CHANGES FOR VERSION 5.71.0 (as compared to 5.70.2)
Plot(C, "Price", colorDefault );
x = SelectedValue( BarIndex()
);
y = Close[ x ];
PlotTextSetFont("E", "Wingdings", 40,
x, y, colorGreen, colorDefault,
-30 );
PlotText( "C", BarCount, Close[ BarCount - 1 ], colorRed, colorDefault,
-20 ); //
will use new font too
XLNX,NULL,"This is new address"
Plot( C, "", colorDefault, styleNoDraw );
PlotOHLC( Null, High, Low, Null, "Price", IIf( H > Ref( H,
-1 ), colorGreen, colorRed ), styleBar | styleNoLabel, Null, Null, 0, 0,
-100 );
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