Global data?
Author: ZDavid
Creation Date: 4/15/2009 1:30 AM
profile picture

ZDavid

#1
I'd like to apply an identical strategy to different securities--I know I can do this by simply opening up multiple instances of the same strategy. But I'd also like each one to access data from each other (e.g. checking for open positions, and finding the last time [thanks for the GetTime function Eugene] a position was closed, etc).

Is there a way I can open multiple stocks in a single strategy and then write code around panes? Or can I pass class/variable data universally? I fear if I write/read from file (thanks again Eugene for the help on that) there will be access errors since I tend to do high-frequency trading.
profile picture

Eugene

#2
Yes, you can pass objects back and forth between different tools by using global memory. See SetGlobal, GetGlobal, ClearGlobal and RemoveGlobal in the QuickRef and one of the Wiki examples: here.
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).