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

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



PureBytes Links

Trading Reference Links

>
> 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
 
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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/