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

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



PureBytes Links

Trading Reference Links

Herman,

Do not forget that using OSAKA plugin you can SAVE/LOAD
tables TO/FROM files. 
This effectivelly gives you presistency you need.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Herman van den Bergen" <psytek@xxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, October 05, 2004 7:16 PM
Subject: RE: [amibroker] Re: static variables/arrays...ATC?


> 
> You are getting the idea: currently there is no elegant solution. The
> easiest way is to try out what you need with a few lines of code before
> adding it to your exploration. If this doesn't work do a search for the
> ABTool DLL, if offers Persistent Arrays - draw back is that it is no longer
> supported by its developer or by AmiBroker - you will be on your own. Also,
> have another look at the reset flag:
> 
> a.. atcFlagResetValues = 32 - reset values at the beginning of scan (not
> required if you use atcFlagDeleteValues)
> 
> best regards,
> herman.
>  -----Original Message-----
>  From: Paul A. [mailto:amibroker@xxxxxxxxxxxxx]
>  Sent: Tuesday, October 05, 2004 1:00 PM
>  To: amibroker@xxxxxxxxxxxxxxx
>  Subject: [amibroker] Re: static variables/arrays...ATC?
> 
> 
>  Herman:
> 
>  >AddToComposite(array,"~CompositeName");
> 
>  I thought we have to add a 3rd argument specifying the field, as in:
>  AddToComposite(CompositeArray,"~CompositeName", "I");
> 
>  >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)
> 
>  Load it at the start of the code?  Do you mean:
>  TempArray = Foreign(~CompositeName, "I");
> 
>  >and save it at the end of each exploration cyle (end of code).
> 
>  Save it at the end of each Explore iteration?  The only way I can see to
> do
>  that is:
> 
>  //BEGINNING AREA OF CODE
>  //Load TempArray with values from ~CompositeName
>  TempArray = Foreign(~CompositeName, "I");
>  //reset CompositeName's "I" field to zero in preparation for
> ~CompositeName
>  receiving a value assignment later in the middle area of the code
>  //  do this by adding back the negative of the value that's already in I,
>  since I can't think of any other way to reset ~CompositeName's "I" field
> to
>  zero
>  AddToComposite(-TempArray,"~CompositeName", "I");
> 
>  //MIDDLE AREA OF CODE
>  //manipulate values of TempArray.  As a trivial example, let's divide them
>  by 2.
>  TempArray = TempArray / 2;
> 
>  //ENDING AREA OF CODE
>  //now the TempArray contains the newly manipulated values we want,
>  //  and ~CompositeName's "I" field contains zero.
>  //  let's add TempArray back into the I field of ~CompositeName, so that
> it
>  will remain
>  //  static and available to repeat this entire procedure at the beginning
>  of the subsequent Explore iteration
>  AddToComposite(TempArray,"~CompositeName", "I");
> 
>  This is the best solution I can think of.  Obviously, it's pretty awkward.
> 
>  >for(b=0; b<BarCount; b++)
>  >{
>  >CompositeArray[b] = b*si[b];//assign whatever value you like
> 
>  But CompositeArray, as you defined it above, is not in any way statically
>  connected with the ATC function, it's just a standalone array that you
>  declared locally.
> 
>  How do you get the values from the ~CompositeName's "I" field out to
>  CompositeArray, and later on back into ~CompositeName?  Is there a more
>  elegant way to  do it than the very laborious and awkward way I described
>  above?
> 
>  >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.
> 
>  I can't see why you can't come close, if you're willing to write a
> compiled
>  DLL.  I'm trying to avoid that, if possible.
> 
>  >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.
> 
>  Good point.
> 
>  Thanks, Herman.  I appreciate your help very much.  I've posted code this
>  time, so perhaps you can better spot where I've gone wrong in my thinking.
> 
>       -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]
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
> 
>


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