Backup Persistent Static Variables

Hello all,

I've been experimenting with IEX data to capture, store and retrieve fundamantental data in my quest for a poor man's marketsmith.

One thing I would like to do is back up the persistent static variables I use to save this fundamental data, because of the limited times I can download the data per month given the subscription you use.

Is there an easy way to do this, such as simply copy a sub-folder in the Amibroker program location?

Thanks!
Mike

Persistent variables are stored to PersistVars.bin file of AmiBroker main directory. So you just need that single file to be copied. Note: it is not supposed to be DB replacement.

Thanks! What do you mean by your note? Can you elaborate, please?

Thanks
Mike

What I meant was it is not supposed to store whole lot of time series data (arrays) to that file (as you would store it to your native AB data base). By words of AmiBroker it was not designed to store e.g. gigabytes of data (in the past some people already did so) -> see hard disk limits. Also you should take care since a simple StaticVarRemove("*"); (or similar var name) call in some other AFL may remove your persistent vars too (on exit or if using StaticVarAutoSave of SetOption()).

Depending on data you might rather consider using AddToComposite() (also see Foreign/SetForeign functions for calling) or SQL or ....

1 Like

To add to what @fxshrat wrote, there is a size limit on PersistVar.bin file - it cannot store more than 2GB worth of data. This is mainly dictated by interoperability requirements due to the fact that some older file systems have 2GB per file limit and 32-bit Windows has limit of 2GB addressable space for user process.

@fxshrat, @Tomasz, thanks for the tips. I'm nowhere near that limit so all is good. I'm not keeping time-series data, just some extra fundamental data.

Here's an example of the data I'm using in use:
$ADUS chart

This is a continuation of my work from:
Using eTables with Amibroker

Thanks!
Mike

2 Likes

That interpretation window looks amazing. You've been a huge help as I try and build the same thing but after seeing that on your Twitter post, I still have a lot of work to do! I'll never know how you guys figure out any of this....LOL

1 Like

Well I'm lucky in this case, I've been a computer need since I was a pre-teen :slight_smile:

I should've done SW engineering instead of systems... but here I am. Something so satisfying about coding!

1 Like