Caching a Bars object in Global memory
Author: Carova
Creation Date: 1/18/2020 9:53 AM
profile picture

Carova

#1
Hi Eugene!

I am looking to take this code
CODE:
Please log in to see this code.

and cache it Globally since it is calculated identically each time in an Optimization.

Is the following code correct?
CODE:
Please log in to see this code.


Thanks!
Vince
profile picture

Eugene

#2
Hi Vince,

Yes, the code should do the trick. As an alternative, you could save the Bars object to a .WL file and create a DataSet from it:

Wiki FAQ: Is it possible to create a DataSet from bars generated using SaveToFile (*.WL)?

Of course the .WL file would have to be updated by your script every day.
profile picture

Carova

#3
Thanks!

Vince
profile picture

Eugene

#4
Don't mention it.
profile picture

Carova

#5
Is this the correct way to Globally cache a Bars Object?

CODE:
Please log in to see this code.


Thanks!
Vince
profile picture

Eugene

#6
Vince,

Whatever works for you is correct.

Since you asked it this year and got it answered already, I've attached the new post here. If you have something specific to add, fire away!
profile picture

Carova

#7
Thanks Eugene!

Getting old is the pits!! :(

Vince
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).