Gets/sets current "auto-subscribe instruments" flag.
When the "auto-subscribe instruments" flag is set to True, CQG API automatically requests subscription for each instrument on which current account has a position.
Read-write property
Visual Basic |
---|
Public Property AutoSubscribeInstruments As Boolean |
True: Instruments referenced by positions will be auto-subscribed.
False: (Default) No instruments are automatically subscribed (may still be subscribed manually).
- In order to have the account's OTE/MVO information calculated and ready in real-time, all the instruments on which the account has positions should be subscribed. Setting this flag to True allows to perform the subscription automatically.
- Depending on PriceMode setting of the configuration, you may need a different data subscription level for the subscribed instrument. If you need the Asks and Bids information, you need to keep the instrument subscription levels set to dsQuotesAndBBA.
- This operation is asynchronous—instrument subscriptions and quote retrieval may take some time, during which the OTE/MVO value remains invalid.
- Some instruments might not be available/enabled. In this case MVO/OTE will not be available.
See the usage of AutoSubscribeInstruments property in the AccountChanged event's example section.