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

RE: [amibroker] Re: static variables/arrays...ATC?



PureBytes Links

Trading Reference Links

When using the ATc you assign it an array:
AddToComposite(array,"~CompositeName"); This array can be manipulated,
bar-by-bar if you like. You load it up at the start of each Exploration
cycle (begin of code) and save it at the end of each exploration cyle (end
of code). In between each bar can be individually modified using a simple
loop:
Si = sin(BarIndex());
for(b=0; b<BarCount; b++)
{
CompositeArray[b] = b*si[b];//assign whatever value you like
}
Plot(CompositeArray,"array",1,1);

My needs are not end-of-exploration related, i want random access at any
time, from any formula. I have tried quite a number of ways to save data
arrays, when working in RT with 100,000 bars things tend to slow down and I
would prefer an optimized afl function - I don't think anybody can match
TJ's afl execution.

Disk read/writes do not always take up that much more time because Windows
may keep copies in memory, having as much as possible Memory might help.

best regards,

herman.



  -----Original Message-----
  From: Paul A. [mailto:amibroker@xxxxxxxxxxxxx]
  Sent: Tuesday, October 05, 2004 9:48 AM
  To: amibroker@xxxxxxxxxxxxxxx
  Subject: [amibroker] Re: static variables/arrays...ATC?


  I suspect I did not format my message properly so as to make my last two
  questions get attention.  Let me try again.  Herman suggested that ATC
  might be used as a workaround for having a static array.  Anyone have any
  ideas on how to assign new values to ATC or manipulate their values,
during
  Explore iterations?

  Herman, I assume you were wishing to have a way to save price arrays at
the
  _end_ of all the Explore iterations.  This does not seem like it would be
  very hard to do with script, _if_ there was a way of being able to call a
  script function at the end of the last iteration of Explore.  See quoted
  msg below.

  If, on the other hand, you meant that you wished to save price arrays at
  the end of every single iteration, and open them back up at the beginning
  of every subsequent iteration, in order to approximate a static array, I
  assume (perhaps wrongly) that all of the disk writes and reads would add a
  lot of time and machine wear and tear to an Explore.

       -Paul

  At 05:59 AM 10/5/2004, you wrote:
     > if( Status("StockNum") == 0 ) AddToComposite();

     That works great, for a way to tell AFL that we're in the first
     Explore iteration.  Is there also a way to count the total number of
     stocks to be processed, so we can tell Status() when we're in the
     last iteration?

     > This way the ATC will remain unchanged during processing of
     subsequent stocks.

     Yes, but but once I've tricked ATC into creating a static composite
     Ticker, as described above, then how do I assign values to the
     ticker's data fields?

  [Non-text portions of this message have been removed]



  Check AmiBroker web page at:
  http://www.amibroker.com/

  Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html


        Yahoo! Groups Sponsor
              ADVERTISEMENT





----------------------------------------------------------------------------
--
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

    b.. To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> 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/