Beispiel #1
0
        //EasyIOI Notification
        public void ProcessNotification(IOINotification notification)
        {
            if (notification.category == IOINotification.NotificationCategory.IOIDATA && (notification.type == IOINotification.NotificationType.NEW))
            {
                //Create conflict set with all current orders.
                IOI i = notification.GetIOI();

                log(i.field("ioi_instrument_stock_security_ticker").Value());
                log("Creating conflict set for IOI: " + i.field("id_value").Value().ToString());

                foreach (Order o in emsx.orders)
                {
                    CreateConflictDataSet(i, o);
                }
            }
        }
Beispiel #2
0
        public void CreateConflictDataSet(IOI i, Order o)
        {
            DataSet newDataSet = this.rmsx.CreateDataSet("conflict_I" + i.field("id_value").Value() + "|O" + o.field("EMSX_SEQUENCE").value());

            log("Creating DataSet: " + newDataSet.GetName());

            newDataSet.AddDataPoint("ioiid", new IOIFieldDataPointSource(i, i.field("id_value")));
            newDataSet.AddDataPoint("ioichange", new IOIFieldDataPointSource(i, i.field("change")));
            newDataSet.AddDataPoint("ioiticker", new IOIFieldDataPointSource(i, i.field("ioi_instrument_stock_security_ticker")));
            newDataSet.AddDataPoint("ioitype", new IOIFieldDataPointSource(i, i.field("ioi_instrument_type")));
            newDataSet.AddDataPoint("ioigooduntil", new IOIFieldDataPointSource(i, i.field("ioi_goodUntil")));
            newDataSet.AddDataPoint("ioibidquantity", new IOIFieldDataPointSource(i, i.field("ioi_bid_size_quantity")));
            newDataSet.AddDataPoint("ioiofferquantity", new IOIFieldDataPointSource(i, i.field("ioi_offer_size_quantity")));
            newDataSet.AddDataPoint("ioiroutingbroker", new IOIFieldDataPointSource(i, i.field("ioi_routing_broker")));
            newDataSet.AddDataPoint("ioiisvalid", new GenericBooleanSource(false));

            newDataSet.AddDataPoint("orderStatus", new EMSXFieldDataPointSource(o.field("EMSX_STATUS")));
            newDataSet.AddDataPoint("orderNumber", new EMSXFieldDataPointSource(o.field("EMSX_SEQUENCE")));
            newDataSet.AddDataPoint("orderWorking", new EMSXFieldDataPointSource(o.field("EMSX_WORKING")));
            newDataSet.AddDataPoint("orderAmount", new EMSXFieldDataPointSource(o.field("EMSX_AMOUNT")));
            newDataSet.AddDataPoint("orderIdleAmount", new EMSXFieldDataPointSource(o.field("EMSX_IDLE_AMOUNT")));
            newDataSet.AddDataPoint("orderTicker", new EMSXFieldDataPointSource(o.field("EMSX_TICKER")));
            newDataSet.AddDataPoint("orderSide", new EMSXFieldDataPointSource(o.field("EMSX_SIDE")));
            newDataSet.AddDataPoint("orderAssetClass", new EMSXFieldDataPointSource(o.field("EMSX_ASSET_CLASS")));
            newDataSet.AddDataPoint("orderisvalid", new GenericBooleanSource(false));

            this.rmsx.GetRuleSet("AutoRouteFromIOI").Execute(newDataSet);
        }
Beispiel #3
0
        public void parseIOI(IOI i)
        {
            DataSet newDataSet = this.rmsx.CreateDataSet("DS_IOI_" + i.field("id_value").Value());

            newDataSet.AddDataPoint("handle", new IOIFieldDataPointSource(i, i.field("id_value")));
            newDataSet.AddDataPoint("change", new IOIFieldDataPointSource(i, i.field("change")));
            newDataSet.AddDataPoint("ticker", new IOIFieldDataPointSource(i, i.field("ioi_instrument_stock_security_ticker")));
            newDataSet.AddDataPoint("type", new IOIFieldDataPointSource(i, i.field("ioi_instrument_type")));
            newDataSet.AddDataPoint("bid_quantity", new IOIFieldDataPointSource(i, i.field("ioi_bid_size_quantity")));
            newDataSet.AddDataPoint("offer_quantity", new IOIFieldDataPointSource(i, i.field("ioi_offer_size_quantity")));

            this.rmsx.GetRuleSet("IOI").Execute(newDataSet);
        }