CQG API 4.0 - Revised
Tag Property
See Also  Send Feedback
tagName

Key string set by the user. When setting, tagName should keep the key that will be associated with the current data.

When getting the information from the tag, one of the previously set keys should be passed as tagName in order to get the corresponding information.

CQGInstrument Interface : Tag Property

Glossary Item Box

Description

This property allows the user to keep his/her own information within the Instrument. Multiple data can be kept in the Tag property under different keys.

Property type

Read-write property

Syntax

Visual Basic
Public Property Tag( _
   ByVal tagName As String _
) As Variant

Parameters

tagName

Key string set by the user. When setting, tagName should keep the key that will be associated with the current data.

When getting the information from the tag, one of the previously set keys should be passed as tagName in order to get the corresponding information.

Return Type

Information represented as Variant

Remarks

Once set, the tag is kept inside the instrument until modification or deletion. The tag can be modified by any user. Always make sure that the previously set tag has a valid information stored (e.g. some functions in your program has not deleted it).

To delete a tag, the user needs to assign Empty to its value:

Instrument.Tag("tagname") = Empty

Example

See the usage of CQGInstrument properties in the InstrumentSubscribed event's example section.

See Also