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

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



PureBytes Links

Trading Reference Links

Amibroker does not have StaticArrays however i would suspect (hope) they
will come one day. There are work arounds like using OSAKA tables or using
the AddToComposite(). Both methods are subject to some complications and
problems, if anybody knows an easier way to save price arrays on disk please
post the solution.

If you want to initialize the ATc during the first stock in an exploration
you can do that by making its execution conditional on the
Status("StockNum"), like:

if( Status("StockNum") == 0 ) AddToComposite();

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

herman
  -----Original Message-----
  From: Paul A. [mailto:amibroker@xxxxxxxxxxxxx]
  Sent: Monday, October 04, 2004 7:48 PM
  To: amibroker@xxxxxxxxxxxxxxx
  Subject: [amibroker] static variables/arrays...ATC?


  Is there some way to create an array that lasts through all of the
  iterations of an Explore?

  I assume that the way to do this is to create a new Ticker, and refer to
  it's fields with Foreign throughout all the iterations.

  If so, would someone please point me to a discussion or a few lines of
  code, that explain how to create and initialize a new Ticker and to
  manipulate it's values with each new iteration of Explore, and finally to
  save the Ticker and it's new values subsequent to the Explore?

  I realize that AddToComposite will do some of the above, but ATC has it's
  mind set on "adding" to the static arrays it's created.  I want to be able
  to use _all_ operators and functions, in order to assign values to ATC's
  new composite ticker.  And, prior to the first iteration of Explore, I
want
  to initialize the arrays to any values I feel like, not just zero.

  My best guess is to open a new composite ticker with ATC, and then ignore
  ATC by using it to add "0" to one of it's fields during every iteration,
  while having other code on hand that operates on the new ticker's data
  using Foreign().  But even if that works, how would I initialize an ATC
new
  ticker's values to something other than zero?

  Apart from ATC, is there some way to tell AFL to execute a block of code
  prior to the first Explore iteration, or subsequent to the last Explore
  iteration?

  Thanks for any idea or comments about static arrays/tickers/variables that
  will stay alive through all the iterations of an Explore.

       Paul

  [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 --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/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/