March 21, 2015 13:13
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.90 first.
Just run the installer and follow the instructions.
Then run AmiBroker. You should see "AmiBroker 5.94.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
AmiBroker's built-in Monte Carlo simulator is high speed (30+ million trades
    per second) simulator that runs series of random trade sequences based on
    backtest output.
    It uses high-quality Mersene Twister random number generator. 
It is run automatically after backtest and produces a series of CDF charts
    (see extra tabs in the New Analysis window). These charts are probably going
    to be moved
    to the report at later stage.
    Monte Carlo simulator is by default available only during portfolio backtest
    runs. It is NOT available/running during optimization or individual optimization.
    (I may enable it in the future).
You can control process of Monte Carlo simulation using new Settings page:
"Enable Monte Carlo Simulation" - turns on/off MC simulator
"Number of runs" - defines how many MC simulation runs is done (default 1000)
"Position sizing" - defines position sizing used by Monte Carlo
    simulator.
    Position sizing algorithm used by MC process is independent from that used
    by backtest. To do so MC may apply special processing to trade list obtained
    from backtester depending on this option setting.
    - "Don't change" - uses trades as they are coming from the backtester
    without changing position size and profit as it is reported from the backtester
    - "Fixed size: N shares/contracts" - trade fixed number of shares/contracts.
    It takes per-share profit as reported by backtester and muliplies it by N
    contracts as entered in the settings. Per-share profit is calculated by dividing
    profit reported by the backtester by number of shares/contracts reported
    by the backtester
    - "Constant value: X" - trades fixed amount per trade. Takes percent
    profit reported by backtester and multiplies it by constant value entered
    to get the profit. 
  
returns TRUE or FALSE whenever string matches searchstring or not.
Searchstring is can contain wild-card characters such as:
      * - matches any string, including empty strings
      ? - matches any single character
This function is case sensitive (of course except wildcard characters). 
      If you want case insensitive matching - convert both string and searchstring
        to lowercase or uppercase
      prior to matching (StrLower/StrUpper)
Example:
      x = StrMatch("Every breath you take", "Every * you *");
      // x will be TRUE
      x = StrMatch("Every step you make", "Every * you *");
      // x will be TRUE
    
Tables of all UCN/Unicode characters
    http://www.unicode.org
    http://unicode-table.com/
    http://www.unicodemap.org
    http://en.wikipedia.org/wiki/List_of_Unicode_characters
    Various arrows:
    http://www.unicode.org/charts/PDF/U2190.pdf
    Enclosed alphanumerics:
    http://www.unicode.org/charts/PDF/U2460.pdf
(note: NOT all glyphs (graphical representations of characters) are actually
    present in current font. This depends on your operating system. For example
    Segoe UI in Windows 7 has lots of characters, but Windows 8 has more,
    if a glyph is missing usually an empty rectangle is drawn). DejaVu free font
    has lots of glyphs, Symbola free font has lots of weird shapes.
    Plot( C, "", colorDefault );
    PlotTextSetFont( "♥Ω↑⇑⓮☝", "Segoe
    UI", 30, 20, HighestVisibleValue( C )/2 + LowestVisibleValue( C )/2
    , colorRed );
    Title = "A demo of UCN: "+EncodeColor(colorRed)+"♥Ω↑€Σβ☂☎";
CHANGES FOR VERSION 5.93.0 (as compared to 5.92.0)
WHITE_BRUSH 0
    LTGRAY_BRUSH 1
    GRAY_BRUSH 2
    DKGRAY_BRUSH 3
    BLACK_BRUSH 4
    NULL_BRUSH 5 (the same as hollow brush)
    HOLLOW_BRUSH 5
    WHITE_PEN 6
    BLACK_PEN 7
    NULL_PEN 8
    OEM_FIXED_FONT 10
    ANSI_FIXED_FONT 11
    ANSI_VAR_FONT 12
    SYSTEM_FONT 13
    DEVICE_DEFAULT_FONT 14
    SYSTEM_FIXED_FONT 16
    DEFAULT_GUI_FONT 17
Example circle with hollow interior:
GfxSelectPen( colorOrange, 4 );
    GfxSelectStockObject( 5 ); // hollow brush
    GfxCircle(100, 100, 20 );
HS_HORIZONTAL 0 /* ----- */
      HS_VERTICAL 1 /* ||||| */
      HS_FDIAGONAL 2 /* \\\\\ */
      HS_BDIAGONAL 3 /* ///// */
      HS_CROSS 4 /* +++++ */
      HS_DIAGCROSS 5 /* xxxxx */
Hatch color is specified by color parameter, hatch background is specified
      by current background color
      see: GfxSetBkColor()
GfxSelectPen( colorOrange, 4 );
      GfxSetBkColor( colorLightGrey );
      GfxSelectHatchBrush( colorBlue, Param("Hatch pattern", 5, 0,
      5 ) );
      GfxCircle(100, 100, 20 );
    
bi = BarIndex();
    x = Percentile( Close, bi, 50 );
    Plot( x, "Cumulative 50% Percentile", colorRed );
    Plot( Close, "Price", colorDefault, styleCandle );
XYChartSetAxis(chartname, "[x]", "[sinx/x]", styleLine
    | styleDots ); // bar style
    for( x = -10; x < 10; x += 0.2 ) 
  { 
  y = sin(x ) / x;
  XYChartAddPoint( chartname, "", x, y, colorGreen, colorRed ); 
  }
  
  XYChartAddPoint( chartname, "", Null, Null ); // add a NULL point
  to begin new line
  
  for( x = -10; x < 10; x += 0.2 ) 
  { 
  y = sin( 2 * x ) / x;
  XYChartAddPoint( chartname, "", x, y, colorOrange, colorBlue ); 
  }
You can turn it off from Settings, Reporting
Buy-and-hold simulation uses current symbol when doing single-symbol backtests/optimization.
    When doing portfolio backtest for more than one symbol, it uses "Portfolio
    B&H symbol" as a benchmark for buy and hold.
Current rates used are listed in the Detailed Log
1. Add a symbol that will hold interest rates. It does not need to have
      quotes every day,
      you can have only quotes on days when interest rate changes.
      Interest rates should be expressed in PERCENTS. So if interest is 5% you
      should enter 5 in "close" price field for particular date
2. Enter the rate symbol into "Dynamic interest symbol" in the Settings.
3. Enter "Fixed interest rate" in the Settings. It will be used for days PRIOR to very first date available in intrest rate symbol.
CHANGES FOR VERSION 5.92.0 (as compared to 5.91.1)
Example of bar style usage (this is EXPLORATION code):
chartname = "example"; 
      XYChartSetAxis( chartname, "[x]", "[sinx/x]", 1 ); //
      bar style 
       
      for ( x = -10;
      x < 10; x += 0.2 ) 
      { 
          
      y = sin( x ) / x; 
          
      XYChartAddPoint( chartname, "",
      x, y, colorGreen ); 
      } 
  
  Second example:  
  
    chartname = "gaussian"; 
    XYChartSetAxis( chartname, "[x]", "[gaussian]", 1 ); 
    for ( x = -3;
          x < 3; x += 0.125 ) 
    { 
     y = exp( - x ^ 2 ); 
    
    XYChartAddPoint( chartname, "",
          x, y, IIf( abs(
          x ) <= 1, colorGreen, colorRed )
          ); 
    }
  
CHANGES FOR VERSION 5.91.0 (as compared to 5.90.1)
SetOption("NoDefaultColumns", True ); 
    Filter = 1; 
    AddColumn( Close, "Column1" ); 
    AddColumn( Null, "Column2" ); 
    
    for( i = 0;
    i < 10; i++ ) 
    { 
      AddRow( StrFormat( "row
    %g\tsecond column", i ) ); 
    }only_when = ( Month() % 2 )
  == 0; // even months only 
   
  x = SparseCompress( only_when, Close ); // compact
  sparse data 
   
  y = MA( x, 10 ); //
  regular calculation 
   
  y = SparseExpand( only_when, y ); //
  expand sparse data 
   
  Plot( C, "Price", colorDefault, styleBar ); 
  Plot( y, "Sparse MA from
  even months", colorRed ); 
  
  
  function SparseCompressEquiv( sparse_array,
  data_array ) 
  { 
     
  result = Null; 
     
  
     
  j = BarCount - 1; 
     
  for( i = BarCount - 1;
  i >= 0; i-- ) 
     
  { 
       
  if( sparse_array[ i ] ) result[ j-- ] =
  data_array[ i ]; 
     
  } 
     
  
     
  return result; 
  } 
  
  function SparseExpandEquiv( sparse_array,
  data_array ) 
  { 
     
  result = Null; 
     
  
     
  j = BarCount - 1; 
     
  for( i = BarCount - 1;
  i >= 0; i-- ) 
     
  { 
       
  if( sparse_array[ i ] ) result[ i ] = data_array[
  j-- ]; 
     
  } 
     
  
     
  return result; 
  } 
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