I see and merci ...

Regards, Ton.

  ----- Original Message ----- 
  From: pierre8rou 
  To: [email protected] 
  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);
  } 



   

Reply via email to