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

Re: [amibroker] Passing arrays to a DLL



PureBytes Links

Trading Reference Links




Hi Ed,
 
You can only pass the entire array back and forth, 
but you can arrange for the DLL to only operate on a certain time 
period by passing other parameters. One example could be something 
like:
 
In AFL:
 
startbar = ValueWhen( DateNum == 
 status("rangefromdate"), BarIndex() );

endbar  = ValueWhen( DateNum == 
 status("rangetodate"), BarIndex() );
 
Then pass these to the DLL and in the DLL code something like:
 
for( i = startbar[0]; i <= endbar[0[; ++i )    // I think 
AB would probably create startbar and endbar as arrays
{
do your testing...
}
 
Or, you could pass StartDate, EndDate, Datenem() and BarIndex() to the DLL 
and do the conversion there.
 
Steve
 
 
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=sharps_45_70@xxxxxxxxx 
  href="">sharps_45_70 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Saturday, September 20, 2003 1:41 
  PM
  Subject: [amibroker] Passing arrays to a 
  DLL
  When you pass and array to a dll in the AA window, the 
  entire array is passed regardless of the settings in the Range 
  settings.For example, if you pass the "close" array of a symbol that 
  you have 2000 bars of data in the database, and the the range is set to 
  "all quotations", then the size of the array passed is 2000.If you 
  set the date range to something other than "all quotations," say 1/1/1995 
  to 12/31/2000, the entire 2000 element array is still passed to the dll, 
  not just the array that represents the range set in the Range 
  box.Does anyone know a way to synronize the number of array elements 
  passed to a dll with the range set in the Range 
  box?Thanks,EdSend 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.