TheGlobalDictionary Class (Collection)

The GlobalDictionary allows you to set up a collection of key/value pairs that can be shared between EasyLanguage analysis techniques and strategies. The GlobalDictionary class includes many of the same properties and methods as the Dictionary class.

There are two ways the GlobalDictionary can be configured. In one form, the GlobalDictionary class is used to share values within the same window type. In the other, the GlobalDictionary is configured to share with additional window types.

To create an instance of GlobalDictionary to share values within same window type:

myGlobal = GlobalDictionary.create();

To create an instance of GlobalDictionary to share values beyond the same window type or between two charts when multi-core charting is enabled.

myGlobal = GlobalDictionary.create(true, "share_name");

Elements are added to the global dictionary using the Add(sKey, oValue) method where sKey is a string containing the key name and oValue is the value to be stored.

Elements (key and value) are removed from the global dictionary using the Remove(sKey) method. The Contains(sKey) method is used to determine if an element key exists in the dictionary .

Namespace: elsystem.collections

Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property Count int Gets the number of elements contained in the dictionary.
Public property Items string Gets or sets the value of the element with the specified key.
Public property Keys vector Gets the vector collection of sorted keys from the dictionary.
Public property Values vector Gets the vector collection of sorted values from the dictionary.
Methods
  Name Description
Public property Add(key,value) Adds an element with the provided key and value to the dictionary.
Public property Clear Removes all elements from the dictionary.
Public property Contains(key) True if the dictionary contains an element with the specified key.
Public property Create(share,name) Initializes a new, shared instance of the dictionary of the specified name when share is set to true.
Public property Create() Initializes a new instance of the dictionary class.
Public property Remove(key) Removes the element with the specified key from the dictionary
Events
  Name Description
Public event Cleared Event handler that is called whenever the dictionary is cleared. See ItemProcessedEventArgs for the properties returned by the handler's args parameter.
Public event ItemAdded Event handler that is called when an item is added to the dictionary. See ItemProcessedEventArgs for the properties returned by the handler's args parameter.
Public event ItemChanged Event handler that is called when an item is changed in the dictionary. See ItemProcessedEventArgs for the properties returned by the handler's args parameter.
Public event ItemDeleted Event handler that is called when an item is deleted in the dictionary. See ItemProcessedEventArgs for the properties returned by the handler's args parameter.
 
 
Inheritance Hierarchy

elsystem.Object

elsystem.Collections.GlobalDictionary