I am new to Twslink an I am wondering if it is possible to use the global variable calls (e.g. SET_DBL_VAR and GET_DBL_VAR) to send Data from TradeStation (32 Bit) to MultiCharts (64 Bit) and back? And if possible, what are the requirements to do this? Do I need a TWS running to use the global variables?
Second question, what is the lifetime for a global Variable?
Thank you!
-Klaus
Global Variables
-
- Site Admin
- Posts: 244
- Joined: Mon Apr 24, 2017 3:24 pm
Re: Global Variables
Hello,
i am sorry, global variables don't exist across processes.
They just exist within process.
(32 bit processes run in a virtual windows (syswow64). This windows can't see its host, the 64 bit windows.)
To share variables across processes (in the same platform), you could save them to file as string. The load from file as string and convert
into your type.
You could use TWSLink functions TO_FILE,FROM_FILE for this.
i am sorry, global variables don't exist across processes.
They just exist within process.
(32 bit processes run in a virtual windows (syswow64). This windows can't see its host, the 64 bit windows.)
To share variables across processes (in the same platform), you could save them to file as string. The load from file as string and convert
into your type.
You could use TWSLink functions TO_FILE,FROM_FILE for this.
Re: Global Variables
Thank you for the quick answer! Well, that's bad and without "real gloabal" variables Tswlink lacks an important feature, I think? Of course it is possible to use files to exchange some information, but this is slow and not the interface I expect.
About 10 years ago there was a product called "Dynaorder" with similar functionality than Twslink. Dynaorder is discontinued for years but it had global variables stored in windows registry. These global variables workes well until today, someone can exchange data between different charts and different applications without any restrictions, unfortunally only 32 Bit.
Maybe you think about it for a new realease?
-Klaus
About 10 years ago there was a product called "Dynaorder" with similar functionality than Twslink. Dynaorder is discontinued for years but it had global variables stored in windows registry. These global variables workes well until today, someone can exchange data between different charts and different applications without any restrictions, unfortunally only 32 Bit.
Maybe you think about it for a new realease?
-Klaus
-
- Site Admin
- Posts: 244
- Joined: Mon Apr 24, 2017 3:24 pm
Re: Global Variables
Storing in registry is like storing in database. TWSLink can access to odbc databases.
You just need to create your own database for that purpose and sql phrases to store and restore your variables.
You just need to create your own database for that purpose and sql phrases to store and restore your variables.