Re: [amibroker] AmiBroker 6.13.0 BETA released

 

Thank you Tomasz,

Eko

Sent from my iPad

On Apr 25, 2016, at 7:56 PM, Tomasz Janeczko groups@amibroker.com [amibroker] <amibroker@yahoogroups.com> wrote:

 

Hello,

There is small problem with PriceVolDistribution example given in read me.

The formula itself works fine if it is already in the chart.
Problem is with the fact that FirstVisibleValue / LastVisibleValue give some negative values
at the moment when formula is applied and chart is not yet visible at all.

To prevent the problem, check fvb / lvb values prior to passing them to PriceVolDistribution

fvb = Max( 0, fvb );
lvb = Max( 0, lvb );


Whole fixed formula:


// a demo showing
// re-implementation of VAP overlay using
// PriceVolDistribution and low-level graphics
bi = BarIndex();
fvb = FirstVisibleValue( bi );
lvb = LastVisibleValue( bi );

fvb = Max( 0, fvb );
lvb = Max( 0, lvb );

mx = PriceVolDistribution( H, L, V, 100, False, fvb, lvb );

GfxSetCoordsMode( 2 );

GfxSelectPen( colorRed );

width = Status("pxwidth");

bins = MxGetSize( mx, 0 );
for( i = 0; i < bins; i++ )
{
   price = mx[ i ][ 0 ];     // price level
   relvolume = mx[ i ][ 1 ]; // relative volume 0..1
   relbar = relvolume * (lvb-fvb+1);
   GfxMoveTo( 0, price );
   GfxLineTo( width * relvolume, price );
}

Plot( C, "Price", colorDefault, styleBar );

if( ParamToggle("BuildinVAP", "No|Yes") ) PlotVAPOverlay( 100, 100, colorGreen, 2 );


Best regards,
Tomasz Janeczko
amibroker.com

On 2016-04-24 18:39, Tomasz Janeczko groups@amibroker.com [amibroker] wrote:
Hello,    AmiBroker 6.13.0 BETA is released now  http://www.amibroker.com/devlog/2016/04/24/amibroker-6-13-0-beta-released/    Enjoy.    Best regards,  Tomasz Janeczko  amibroker.com      ------------------------------------    ------------------------------------    **** IMPORTANT PLEASE READ ****  This group is for the discussion between users only.  This is *NOT* technical support channel.    TO GET TECHNICAL SUPPORT send an e-mail directly to   SUPPORT {at} amibroker.com    TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at  http://www.amibroker.com/feedback/  (submissions sent via other channels won't be considered)    For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:  http://www.amibroker.com/devlog/      ------------------------------------    Yahoo Groups Links    <*> To visit your group on the web, go to:      http://groups.yahoo.com/group/amibroker/    <*> Your email settings:      Individual Email | Traditional    <*> To change settings online go to:      http://groups.yahoo.com/group/amibroker/join      (Yahoo! ID required)    <*> To change settings via email:      amibroker-digest@yahoogroups.com       amibroker-fullfeatured@yahoogroups.com    <*> To unsubscribe from this group, send an email to:      amibroker-unsubscribe@yahoogroups.com    <*> Your use of Yahoo Groups is subject to:      https://info.yahoo.com/legal/us/yahoo/utos/terms/      

__._,_.___

Posted by: Eko Widjajanto <ekow19d@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (8)

Upgrade your account with the latest Yahoo Mail app
Get organized with the fast and easy-to-use Yahoo Mail app. Upgrade today!

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/


.

__,_._,___


EmoticonEmoticon