[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Re: Try to understand Exemple 4 from "Using low-level graphics functions".



PureBytes Links

Trading Reference Links

I see and merci ...
 
Regards, Ton.
 
----- Original Message -----
From: pierre8rou
Sent: Friday, October 05, 2007 4:31 PM
Subject: [amibroker] Re: Try to understand Exemple 4 from "Using low-level graphics functions".

>
> Where did you find Example 4 ? I only have 3 examples in "Using low
level graphics". Can you please give me the URL ...
>

From AB AmiBroker 5.00 User's Guide
Chapter AmiBroker Formula Language
Last page.

Regards,

Pierre

Example 4. Low-level graphic positioning - shows how to align built-in
plots() with the low-level graphics. Note that if scale changes
(pxheight changes) due to new data or different zoom level, it needs
additional refresh to read new scale and adjust positions properly.

Plot(C, "Price", colorBlack, styleLine );

GfxSetOverlayMode(0);

Miny = Status("axisminy");
Maxy = Status("axismaxy");

lvb = Status("lastvisiblebar");
fvb = Status("firstvisiblebar");

pxwidth = Status("pxwidth");
pxheight = Status("pxheight");

TotalBars = Lvb - fvb;

axisarea = 56; // may need adjustment if you are using non-default
font for axis

GfxSelectSolidBrush( colorRed );
GfxSelectPen( colorRed );
for( i = 0; i < TotalBars AND i < ( BarCount - fvb ); i++ )
{
x = 5 + i * (pxwidth - axisarea - 10) / ( TotalBars + 1 );

y = 5 + ( C[ i + fvb ] - Miny ) * ( pxheight - 10 )/ ( Maxy - Miny );

GfxRectangle( x - 1, pxheight - y - 1, x + 2, pxheight - y + 2);
}

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

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

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___