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

Re: [amibroker] Re: Static Variables - Remove All



PureBytes Links

Trading Reference Links

Title: Re: [amibroker] Re: Static Variables - Remove All

Graham,


There comes a time when using static variables becomes too unwieldy and one might want to consider other options. Using many static variables makes coding error prone... I can take a long time to find an erroneous var name.


You might want to look at the OSAKA table DLL, it has no size limit and you can delete the entire table with one single statement. Accessing this table is actually faster than using Static variables. You can reserve a table section for non-array static variables. While using OSAKA will take some getting used to (I had my share of problems) it offers some attractive options, like saving/recalling on/from disk (persistent behavior), sorting, csv format, easy deletion, and simulating arrays containing strings.


Using Composites is another option that may work at times. You can pack a fair number of ASCII characters in a single bar location using HLCVI spaces, but this gets slow. If your messages are always made up of the same vocabulary (Sell, Buy, Stop, etc.) you can also refer to pre-stored phrases by number, stored in a csv string, and save numbers the strextract the numbers in the price array. While this may work for simple requirements but it gets too complex for free use of text.


btw, I do not worry about removing a non-existent static variables. You can check for a NULL value but that will be slower than simply removing it.


best regards,

herman 



Saturday, April 4, 2009, 3:07:00 PM, you wrote:


> Thanks Herman & Aron


> I have added my vote to Suggestion #1518 and I did note that its priority is shown as High.


> I am comfortable with the concept of adding code to the end of CBT process to

> loop through all Bars, Trades and then using StaticVarRemove.  Naming format

> is "Text" + Symbol + BarDateTime so that should be fine.


> My problem is that this will still leave StaticVars (some created using

> StaticVarSetText) for which trades were not taken due to available equity, order limit etc.


> So, I guess the approach here is loop through Bars, Signals.  But, some

> StaticVars will already have been removed in the previous step.  So, how do I

> ascertain that a particular variable name exists so that StaticVarRemove can be applied?


> Graham




> ------------------------------------


> **** IMPORTANT PLEASE READ ****

> This group is for the discussion between users only.

> This is *NOT* technical support channel.


> TO GET TECHNICAL SUPPORT send an e-mail directly to 

> SUPPORT {at} amibroker.com


> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at

> http://www.amibroker.com/feedback/

> (submissions sent via other channels won't be considered)


> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:

> http://www.amibroker.com/devlog/


> Yahoo! Groups Links


> <*> To visit your group on the web, go to:

>     http://groups.yahoo.com/group/amibroker/


> <*> Your email settings:

>     Individual Email | Traditional


> <*> To change settings online go to:

>     http://groups.yahoo.com/group/amibroker/join

>     (Yahoo! ID required)


> <*> To change settings via email:

>     mailto:amibroker-digest@xxxxxxxxxxxxxxx 

>     mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx


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





__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___