CQG API 4.0 - Revised
RemoveInstrument Method
See Also  Send Feedback
cqg_instrument
The CQGInstrument object received from the Instruments collection
CQGCEL Interface : RemoveInstrument Method

Glossary Item Box

Description

Unsubscribes and removes the Instrument from the Instruments collection.

Syntax

Visual Basic
Public Sub RemoveInstrument( _
   ByVal cqg_instrument As CQGInstrument _
) 

Parameters

cqg_instrument
The CQGInstrument object received from the Instruments collection

Remarks

After the RemoveInstrument method is called, no InstrumentChanged events are fired on the Instrument, and the previously received CQGInstrument object reference becomes invalid.

The method works in synchronous mode; i.e. after the method return, the instrument will not be in the Instruments collection.


Note: in CQG API v. 3.0 and higher this method call may result in unavailability of account summaries and position properties.

Example

See the usage of CQGCEL methods in the OrderChanged event's example section.

See Also