Beispiel #1
0
        private static void marketScanners(EClientSocket client)
        {
            /*** Requesting all available parameters which can be used to build a scanner request ***/
            //! [reqscannerparameters]
            client.reqScannerParameters();
            //! [reqscannerparameters]
            Thread.Sleep(2000);

            /*** Triggering a scanner subscription ***/
            //! [reqscannersubscription]
            client.reqScannerSubscription(7001, ScannerSubscriptionSamples.HighOptVolumePCRatioUSIndexes(), null, null);

            TagValue t1 = new TagValue("usdMarketCapAbove", "10000");
            TagValue t2 = new TagValue("optVolumeAbove", "1000");
            TagValue t3 = new TagValue("avgVolumeAbove", "100000000");

            List <TagValue> TagValues = new List <TagValue> {
                t1, t2, t3
            };

            client.reqScannerSubscription(7002, ScannerSubscriptionSamples.HotUSStkByVolume(), null, TagValues);             // requires TWS v973+

            //! [reqscannersubscription]

            Thread.Sleep(2000);
            /*** Canceling the scanner subscription ***/
            //! [cancelscannersubscription]
            client.cancelScannerSubscription(7001);
            client.cancelScannerSubscription(7002);
            //! [cancelscannersubscription]
        }
Beispiel #2
0
        private static void marketScanners(EClientSocket client)
        {
            /*** Requesting all available parameters which can be used to build a scanner request ***/
            //! [reqscannerparameters]
            client.reqScannerParameters();
            //! [reqscannerparameters]
            Thread.Sleep(2000);

            /*** Triggering a scanner subscription ***/
            //! [reqscannersubscription]
            client.reqScannerSubscription(7001, ScannerSubscriptionSamples.HighOptVolumePCRatioUSIndexes(), null);
            //! [reqscannersubscription]

            Thread.Sleep(2000);
            /*** Canceling the scanner subscription ***/
            //! [cancelscannersubscription]
            client.cancelScannerSubscription(7001);
            //! [cancelscannersubscription]
        }