AmiBroker 6.30.5 released

A new official / maintenance update version (6.30.5) of AmiBroker has been released. This is basically the same version as 6.30.0 Release Candidate with some updates and fixes listed below. 64-bit version it is compiled with most recent (March 2019) version of Microsoft Visual C++ 2017 compiler and new runtime.

DOWNLOAD LINKS

32-bit version:
http://www.amibroker.com/members/bin/AmiBroker6305.exe
(10 269 056 bytes)

64-bit version:
http://www.amibroker.com/members/bin/AmiBroker6305x64.exe
(10 987 368 bytes)

DOCUMENTATION

DevLog announcement:
http://www.amibroker.com/devlog/2019/03/18/amibroker-6-30-5-official-release/

Read Me:
http://www.amibroker.com/devlog/wp-content/uploads/2019/03/readme6305.html

This version comes with updated Users' Manual with all new functions now added to AFL reference and new tutorial on using GUI controls. Check out http://www.amibroker.com/guide/whatsnew.html and http://www.amibroker.com/guide/h_gui.html

UPGRADE POLICY

This version is a free upgrade only for users who registered AmiBroker after March 14, 2017. Users who registered earlier, would need to purchase license upgrade. To find out the version you currently have use Account Information page at http://www.amibroker.com/members/info.php

CHANGES FOR VERSION 6.30.5 (as compared to 6.30.2)

  1. AFL Editor: encoding changed from UTF-8 back to ANSI to maintain backward compatibility with existing formulas using non-US characters without rewriting
  2. Windows 7: when error line was clicked and help file displayed Windows HELP window did not take focus properly. Fixed.
  3. New Warning 509 behaved like error (stopped optimization). Fixed.

CHANGES FOR VERSION 6.30.2 (as compared to 6.30.0)

  1. AFL Editor: @link command now works on single click (instead of double click)
  2. AFL Editor: multiple error messages per single code line are now differentiated and lead to different user guide pages when clicked
  3. AFL Editor: When mouse hovers over the error message the mouse cursor changes to "Hand" and the error message is clickable as normal "link" leading to users guide description of error message
  4. AFL: ApplyStop with ExitAtStop=2 parameter when used together with backtestRegular mode did not trigger stops in 6.25-6.30. Fixed.
  5. AFL: new function InternetPostRequest( url, data, flags = 0 ) - allows to make POST HTTP requests
  6. AFL: Now() function supports format = 11 - returns Unix timestamp (number of seconds since Jan 1, 1970)
  7. AFL: OscP/OscV could cause exception in unlikely event when entire Close or Volume array was filled by Null values. Fixed
  8. Docs: added detailed descriptions of Warnings 504, 505, 506, 507, 508 and 509, Errors 63, 64, 65, 66, 67, 68, 69, 70
  9. Docs: updated documentation on ApplyStop to include activationFloor
  10. Intraday date axis hours could show 24:00 when negative timeshifts were defined in the settings. Fixed
  11. Matrix variables that were passed to single-argument math functions (sqrt, exp) did not have their ref count updated correctly. Fixed.
  12. Plugins are now loaded from work_dir\Plugins if exe_dir\Plugins folder does not exist
  13. Pref: "Ask before closing indicator pane" is now turned on by default
  14. Pref: Misc/ Max Number of decimal places in titles and RT quote bumped o 7
  15. UI: In 64-bit version only the .AFL extension in the editor window caption was removed. Fixed.
  16. Web Research predefined profiles: removed "MarketWatch" because the site is not available anymore

This thread continues from AmiBroker 6.30.0 RC released

11 Likes

Thx, but:

Lkbk=1;
TimeFrameSet(in1Minute); 
tr=Close;
TimeFrameRestore();

if(Lkbk>1)
{
	tr=TimeFrameExpand(tr,in1Minute,expandFirst);	
}

With Lkbk<=1 I get: "Warning 509. You must use TimeFrameExpand() to expand compressed arrays after you used TimeFrameSet and/or TimeFrameCompress."

The warning is correct and your code is incorrect. The condition inside if(Lkbk>1) is NOT met and you are not calling TimeFrameExpand() which is incorrect.
See: www.amibroker.com/guide/errors/509.html

Also, some people asked me if there is a way to "suppress" this warning. First of all warning is not an error, your code continues to run so you don't really need to suppress it. But if you want to get rid of it, you just do the right thing - call TimeFrameExpand since it is required to use any arrays created via TimeFrameSet/TimeFrameCompress. It is clearly explained in http://www.amibroker.com/guide/h_timeframe.html
The purpose of this warning is to stop endless flood of incorrectly written formulas that appear over and over. The warning is designed to make sure TimeFrame functions are used correctly (the way it is described in manual).

@Tomasz, the AFL editor of the new version has problems with international characters, both in 32 and in 64 bits. When I open existing AFL files, the accented vowels are substituted with an hexadecimal (?) codes. For example, in previous version I have this fragment of code:

Image2
The new version changes it to:

Image1

If I correct this two typos, the file is saved OK. If I reopen it, the changes are preserved, although not changed vowels remain as hex code...

Tomasz, thank you for the new release.

I confirm the problem with (in my case) Polish characters:

1

New editor uses different encoding. UTF-8 instead of ANSI. UTF-8 supports way more characters, but I see it could be problem for already existing formulas. Well, I guess I will need to add a switch to use ANSI.

I reverted encoding to ANSI for time being in version 6.30.4 (updated links in original post). This way 100% compatibility with existing formulas that have non-English text will be preserved without need to rewrite formulas.

The problem with ANSI is that it uses different code pages to handle national characters, and these code pages depend on computer settings, while UTF-8 is universal, but apparently it was too soon to introduce this change.

4 Likes

You can also insert the Byte Order Mark (http://www.unicode.org/faq/utf_bom.html#BOM) at the beginning of the file. If the file don't have this mark, it's ANSI.

On saving the file you can add this mark automatically. This way ANSI-Unicode compatibility is preserved...

While UTF-8 is good, BOM isn't. It does not maintain but breaks compatibility with older software. BOM does not serve anything but annoying people.

1 Like

Another vote to suppress warning 509, at least in phase 2. Warning 509 is halting execution of my optimizations. For my use-case, I'm computing quarterly returns in phase 2 custom backtest. Expanding the compressed array is not needed in this case. The compressed array is deliberately shorter length than all the other arrays.

curEq = bo.EquityArray;
quarterlyEq = TimeFrameCompress(curEq, inQuarterly);
qret = quarterlyEq / Ref(quarterlyEq, -1) - 1;
nonNullCount = BarCount - NullCount(qret);
avQRet = 100 * LastValue(MA(qret, nonNullCount -1));
bo.AddCustomMetric("avQRet", avQRet, avQRet, "", 2);
1 Like

Just add TimeFrameExpand() and the warning is gone. It is that simple. What you are doing is premature optimization which is root of all evil. You "optimized" use of TimeFrame functions by doing something that is outside of specification. You should just follow the spec, and call TimeFrameExpand, or if you are after "trickery" you should be using SparseCompress instead to achieve the very same thing that you are doing with TimeFrameCompress.

TimeFrame functions were among most incorrectly used functions and the warning is here to prevent that and it is going to stay. See Why TimeFrameExpand is essential (Warning 509)

One thing however that I am going to change is that this warning won't stop optimization as warnings were supposed only to be displayed in AFL editor and Error Log window (without stopping actual optimization).

UPDATE: This change (preventing Warning 509 from stopping optimization) is now implemented in 6.30.5 (updated links in original post)

4 Likes

Sounds good. Thanks for the update.

I'm sorry I may have cross-posted (still cant see that post yet) but I found this relevant thread now, so my query was:

Using AmiBroker 6.30.5 32bit on Win10

I have two charts, Linked by Symbol(Red),
Chart1 = 5min interval
Chart2 = Daily interval

When i click particular bar in 5m chart, the selector line will move in Daily chart accordingly.

What i noticed though is, the Date Time in Title of Chart2 is matching as Chart1 but
the Selector line in Daily chart is drawn one bar ahead.

Can someone confirm this ?

Thanks.

I tried it on a fresh install but the same is still observed.
Anyone else can test it?
Tagging @Tomasz if you can kindly check.
Thanks.

@nsm51 I have also noticed some slight discrepancies:

  1. When I click on the intraday chart, the Selector line on the synchronized daily chart moves accordingly and is located in the right place, but the Date in the Title lags one session (one day). If you click (select) that candle, the title starts displaying proper date. An example:

2

  1. When I click on a daily chart, the date in the Title of the intraday chart synchronizes properly, but the Selector line is displayed on the first candle of the next (following) session - for this reason it is not displayed when I click on a first daily candle. An example:

3

That being said, I'm aware of the fact, that it might be difficult to find a solution providing perfect synchronization between charts in different intervals...

1 Like

Thanks @Milosz for your response because i was rubbing my eyes for quite some time.

As @Milosz wrote - you are attempting to display marker for two different intervals. There is 1 : MANY relationship between Daily and 5-minute bars and End-Of-Day timestamp is special because it comes after all intraday bars, so in fact NO intraday bar matches daily in exact manner.

1 Like

Thanks. I got it, some things like this one just has to get accustomed only after using.
Its not a problem :slight_smile:

Hi Tomasz, I'd like to request a feature please. I'd like to be able to 'grab' the edge of AB windows more easily. I often resize windows and it takes a lot of precision to line up with the edge. Say the current grab range is 10 pixels, could we make it about 200 please? Also, it would be nice if the diagonal resize had 'preference' over the vertical/horizontal resize icons when I'm near the corner of the window.

1 Like

Things like size of window borders in Windows are totally controlled by OS (Windows itself),
so you can only change it globally for all windows in Windows :slight_smile:
by changing theme to some high contrast schemes or using 3rd party programs, or using Windows Registry, see: https://www.howtogeek.com/130138/how-to-change-the-window-border-size-in-windows-8/

1 Like