/// <summary>
        /// 更新策略实例参数
        /// </summary>
        /// <param name="para">开仓基本参数</param>
        /// <param name="orderList">交易列表</param>
        /// <param name="id">需要修改的策略实例ID</param>
        public void UpdateWorker(object v)
        {
            string id = string.Empty;

            if (v is OPENMODIFY)
            {
                OPENMODIFY value = (OPENMODIFY)v;
                id = value.ID;
            }
            else
            {
                CLOSEMODIFY value = (CLOSEMODIFY)v;
                id = value.ID;
            }

            StrategyWorker worker = Workers[id];

            worker.UpdateBaseParas(v);
        }
Example #2
0
        public static void UpdateDatebase(string type, object value)
        {
            switch (type)
            {
            case "A1":
            {
                OPENCREATE data = (OPENCREATE)value;

                break;
            }

            case "A2":
            {
                OPENMODIFY data = (OPENMODIFY)value;
                break;
            }

            case "A3":
            {
                OPENRUN data = (OPENRUN)value;
                break;
            }

            case "A4":
            {
                OPENALLOW data = (OPENALLOW)value;
                break;
            }

            case "A5":
            {
                OPENDELETE data = (OPENDELETE)value;
                break;
            }

            case "B1":
            {
                CLOSECREATE data = (CLOSECREATE)value;
                break;
            }

            case "B2":
            {
                CLOSEMODIFY data = (CLOSEMODIFY)value;
                break;
            }

            case "B3":
            {
                CLOSERUN data = (CLOSERUN)value;
                break;
            }

            case "B4":
            {
                CLOSEALLOW data = (CLOSEALLOW)value;
                break;
            }

            case "B5":
            {
                CLOSEDELETE data = (CLOSEDELETE)value;
                break;
            }

            case "C1":
            {
                MakeOrder data = (MakeOrder)value;
                break;
            }
            }
        }