Visual Basic |
---|
Public Sub NewInstrument( _ ByVal symbol_ As String _ ) |
- symbol_
Symbol to resolve in one of the following formats:
- symbol prefix (e.g. EP)
- symbol prefix with month (EPZ)
- symbol prefix with month and year (EPZ7)
- symbol prefix with relative month (EP?1)
- full or short option instrument name (C.EPF1617650 or C.EP_F16.17650)
The method works in asynchronous mode, i.e. the method just triggers the request in the CQGCEL without waiting for its results.
InstrumentResolved event is fired as a result of the method call.
An exception will be thrown if symbol is empty string.
Depricated:
If the symbol is valid, the result will come with the InstrumentSubscribed event.
If the symbol is not valid, the IncorrectSymbol event will be fired.
Note: Only tradable instruments are considered to be valid.
It is a good practice to cancel the request as soon as it becomes unnecessary. Such approach allows using memory resources more optimal.
Call RemoveInstrument for request cancelling.
See the usage of the NewInstrument method in CQGCEL Example.