AmiBroker 6.29.0 BETA released

A new beta version (6.29.0) of AmiBroker, with lots of new AFL functionality has been released.

DOWNLOAD LINKS

32-bit version:
http://www.amibroker.com/members/bin/ab6290beta.exe
(2 371 136 bytes)

64-bit version:
http://www.amibroker.com/members/bin/AmiBroker6290x64.exe
(10 683 768 bytes)

DOCUMENTATION

DevLog announcement:
http://www.amibroker.com/devlog/2018/08/24/amibroker-6-29-0-beta-released/

Read Me:
http://www.amibroker.com/devlog/wp-content/uploads/2018/08/readme6290.html

UPGRADE POLICY

This version is a free upgrade only for users who registered AmiBroker after August 24, 2016. 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.29.0 (as compared to 6.28.0)

  1. AFL: added GuiDateTime function
  2. AFL: Gui creation functions (GuiButton, GuiEdit, GuiDateTime and others) return guiNew (1) when control is newly created or guiExisting (2) when control already exists. This is useful for one-time initialization when control is being created.
  3. AFL: InternetSetAgent("agent") - new function to set user agent for InternetOpenURL
  4. AFL: new Error 70 - displayed on attempt yo use InternetSetAgent when it is already set or connection was already open
  5. Analysis: added Notice 802: Trade size limite of X% of entry bar volume has been hit N times.
  6. Charts: Vertical line (Y axis line) between chart area and Y axis scale is drawn with ZOrder = 0 instead of ZOrder = 128
  7. Charts: Y-axis scale for huge negative values (below minus 1 billion) was incorrect. Fixed
  8. File: Chart template, complete now also saves the content of files included using #include_once
  9. New Analysis: decreased number of cases when IEEE rounding of fractional steps result in one step less than naive expecation in optimization
  10. UI: 'Backtest settings' caption changed to 'Analysis Settings' and changed the layout of 'general' tab - data settings (that apply to everything mode) grouped separately from purely backtest settings
  11. UI: increased number of user-definable Tool window menu items to 20 (from 10)

This thread continues from AmiBroker 6.28.0 BETA released

6 Likes

@Tomasz thank you very much for implementing all the new functionalities (especially those reported and endorsed by me) :slight_smile:

I didn't have much time to test them thoroughly yet, but at first glance, they seem to work really well :+1: I only noticed that (on my end) some codes look different from the previous versions. I suppose there might be some issues with GfxSelectPen() For instance:

GfxFillSolidRect(0, 20, 300, 200, colorWhite);

GfxSelectPen( colorGreen, 5 );
GfxSelectSolidBrush( colorGreen );
GfxCircle( 50, 50, 10 );
GfxMoveTo( 100, 50 ); GfxLineTo( 200, 50 );

GfxSelectPen( colorRed, 1 );
GfxSelectSolidBrush( colorRed );
GfxCircle( 50, 100, 10 );
GfxMoveTo( 100, 100 ); GfxLineTo( 200, 100 );

AmiBroker 6.28, 6.27 etc. :

Image%201

AmiBroker 6.29:

Image%202

Thank you & Regards

2 Likes

Indeed I started some work on extending GfxSelectPen to cover more options and side effect is that pens with width greater than 1 require "geometric" style to work the "old" way. So current workaround is:

penGeometric = 65536;
GfxSelectPen( colorGreen, 5, penGeometric );
GfxSelectSolidBrush( colorRed );
GfxCircle( 150, 150, 50 );
3 Likes

Greetings Mr. Tomasz,

Thanks you very much for the new version.

I would describe my present state of AmiBroker usage as Stable and Happy. I am getting most of the things I need in AmiBroker and life is moving ahead blissfully. Though a few things are still there on my wish list, still wishlist count is heavily outnumbered by the list of features that are already available.

So, I am happy with the classic AFL functions and not experimenting much with the new AFL function like GUI things.

One thing that has been coming to my mind since many months is the GuiCheckBox function. I understand this is the only GUI function which does not have a matching PARAM function. May the Classic AFL functions users look forward to have a corresponding function?

With Regards

Sanjiv Bansal

@Sumangalam Both GuiCheckBox() and GuiToggle() - allow toggling between On/Off states. I think, that their counterpart is ParamToggle() which uses boolean (Yes/No or On/Off) parameters. I think they can be used interchangeably in most cases.

https://www.amibroker.com/guide/afl/paramtoggle.html

1 Like

@Milosz, Thanks for your guidance.
However, CheckBox and Toggle though similar in some ways may not be same. I will try to explain my view with an example:

If I right click on a chart > Parameters > Axes & Grid > Grid

Then "Show middle lines" etc. is what can be implemented by PararToggle.

However for "Levels", ParamCheckBox might be efficient way to approach things.

Thank you again for your insightful posts.

Regards

Sanjiv Bansal

1 Like

OK @Sumangalam - I understand. You would like to have a kind of ParamList() with multiple choices available. Although (as usual) there are some alternative ways of achieving quite similar results (for instance using ParamToggle() several times), you can report it to the Feedback Centre as a suggestion. I agree - this feature might be useful in some cases...

Image%201

Regards

1 Like

About Gui controls, I wonder if anyone else (except me) is interested in getting a GuiTrackbar (slider), that could be useful to directly change some values and/or, in my case, to handle custom zooming on particular low-level graphics charts (without the need to open the Parameters dialog).

1 Like

Yes, of course Beppe, I'm interested in native GUI slider too...

On the other hand, thanks to RequestMouseMoveRefresh() (which I seriously underestimated when it was introduced and now I really appreciate) coding a custom slider is not that difficult. For example:

Title = "Keep Control key and mouse button pressed during changing the values using slider";
xshift = Param( "X shift: ", 0, 0, 2000, 1 );
yshift = Param( "Y shift: ", 25, 0, 2000, 1 );

GfxGradientRect( xshift, yshift, 300 + xshift, 20 + yshift, colorWhite, ColorBlend( colorDarkGrey, colorLightGrey, 0.5 ) );

MouseButtonPressed = GetCursorMouseButtons();
CtrlPressed =  GetAsyncKeyState( 17 ) < 0 ;
x = GetCursorXPosition( 1 ); y = GetCursorYPosition( 1 );

if( CtrlPressed )

{
    if( MouseButtonPressed AND x >= xshift AND x <= 300 + xshift AND y >= yshift AND y <= 25 + yshift ) 
    {
		StaticVarSet( "multiplier", x - xshift );
		RequestMouseMoveRefresh();
    }
}

multiplier = Nz(StaticVarGet( "multiplier" ), 150);

GfxSelectSolidBrush( ColorBlend( colorWhite, colorDarkGrey, multiplier / 300 ) );
GfxCircle( 150, 200, multiplier / 2 );
GfxFillSolidRect( xshift + multiplier - 2, yshift, xshift + multiplier + 2, yshift + 20, colorGrey40 );

Plot( C, "C", colorDefault, styleCandle );

5

... but of course native solutions are almost always the best :slight_smile:

8 Likes

GuiSlider is coming in 6.30

4 Likes

Hello
@Tomasz i just download the 64 bit version 6.29.0. then after installation i restart my PC windows7 . and in Local data base i notice that there is NOT Gui refresh in chart window, when we minimize / maximize the charts
.

ver6290

3 Likes

I did not change anything with refreshes as compared to 6.28. Did you try 6.28?

Tomasz, I can confirm similar problems on AB 6.29 32 Bit:

Test%202

They seem to occur when the panes are switched or minimized.

Thank you Tomasz. Yes 6.28 was fine.

@Tomasz, Always appreciate what you do for us (AB Super Community).

Hi. Since this update I've been finding that in the analysis window after completing a backtest, it defaults to showing the Info tab. Is there a way to make it default to showing the Results list tab instead?

No, it doesn't. Please read the READ ME. It is important to read it. I write it for the purpose. It contains super important information.
If you read the READ ME you would find out that it only shows "info" tab when there are NOTICES (important messages for you to read regarding your settings). And that info tab is only displayed ONCE when NEW notice appears. If your code and settings were correct and did not trigger any NOTICES it will NOT switch to info tab. The notices are for reason - they tell you that you are likely using wrong settings and that wrong settings are likely to make your results incorrect.

Could someone please try this test code and see what you get? I'm on the latest beta, 6.29.0. I'm trying to draw thick lines in different colors. With this code, you will see the correct results when the line thickness is 1 (e.g., GfxSelectPen(colorRed, 1). But if you change the thickness of all 3 lines to anything other than 1, you still get a thickness of 1 and the red and blue lines turn to black.

GfxSetOverlayMode(2);

startRow = 50;
startCol = 50;

width = 200;
height = 300;

x1 = startRow;
y1 = startCol;
x2 = startRow + width;
y2 = startCol + height;

GfxSelectSolidBrush(colorWhite);
	
GfxMoveTo(x1, y1);
GfxFillSolidRect(x1, y1, x2, y2, colorWhite);

GfxSelectPen(colorBlack, 10);
GfxMoveTo(x1, y1 + height / 4);
GfxLineTo(x2, y1 + height / 4);

GfxSelectPen(colorRed, 10);
GfxMoveTo(x1, y1 + height / 3);
GfxLineTo(x2, y1 + height / 3);

GfxSelectPen(colorBlue, 10);
GfxMoveTo(x1, y1 + height / 2);
GfxLineTo(x2, y1 + height / 2);

Moderator comment: This is already covered earlier in this thread.

hi milosz

can u suggest how to get the chkbox ?

@n_bagadia : read the "Read Me" it contains full example code on checkboxes and everything.

@Panos - Gui refresh on resize will be fixed in next beta (6.29.1 or 6.30)

2 Likes