With the introduction of objects in TradeStation 9.0, the GlobalDictionary class was introduced that can be used to share information across applications (and between windows within the same application – for example, sharing data between 2 charts, 2 RadarScreen windows, etc.) within the TradeStation platform. If you only need to share information within TradeStation (i.e., you don’t need to share information between TradeStation and other programs outside of TradeStation), it is recommended that the GlobalDictionary be used since it is an engineered solution to data sharing within the TradeStation platform.
Here is the latest release of GlobalVariable.dll – one of the DLL coding demonstrations we provide for those who wish to create TradeStation-compatible DLL’s. It is backward compatible with the demonstrations provided for Global Variables 2.1.
The attached zip file contains the following:
1.) New documentation (contained in the file “Global Variable 2.2.doc”)
2.) Two demonstration workspaces
3.) An ELD file containing studies and functions for import
4.) C++ project and code files
5.) GlobalVariable.dll (compiled from the new Version 2.2 code)
After clicking on the zip file link above, select “Save” (when prompted) in order to save the zip file to your local hard-drive. Use a utility such as WinZip® to decompress the file.
In bullet form, here’s what’s new in this version. Please see the documentation contained in the zip files for more detail:
- Added a new type of global variables, Boolean global variables.
- Added functions to demonstrate storage and retrieval of numbered and named global variables of Boolean type.
- Added functions to “reset” or “reinitialize” named global variables. GV_ResetAllNmd(Type) functions demonstrate how all named global variables of a given type name can have their names reset to NULL and their values reset to initial values (0 for numeric global variables, NULL for string global variables, and FALSE for Boolean global variables).
- Added GV_Get(Type)NameByNum functions to demonstrate retrieval of the name of a named variable based on the named variable’s element location number.
- Added GV_GetNamed(Type)ByNum functions to demonstrate retrieval of the value stored in a named variable based on the named variable’s element location number.
- Modified return type of all functions that return strings so that they return BSTR’s rather than LPSTR’s to demonstrate DLL code that can be used with applications that use BSTR’s rather than LPSTR’s.
- Expanded the interprocess data segment for string global variables from 3000 locations to 10,000 locations to better demonstrate storage of numbered string global variables.
- Added internal function fnGenRunTimeError to demonstrate the ability to generate a run-time error in TradeStation under appropriate circumstances using the functionality included in the EasyLanguage Extension SDK (tskit.dll).
- Added Version.rc resource file to the DLL project to allow for easy retrieval of GlobalVariable.dll version information (for example, using Windows Explorer).
Please refer to the extensive documentation file, “Global Variable 2.2.doc”, which is included in the download package, for installation instructions and an introduction to how the global variable code works.