public static void MyClassInitialize(TestContext testContext)
        {
            // 선물, 옵션, Elw 상품 정보를 CP에서 읽어오고 config를 설정한다.
            ConfigManager.Ins().Initialize("c:\\UnittestMadViper\\config.txt");
            DB_DataLoader_Kospi_Future.Ins().Load();
            DB_DataLoader_Option.Ins().Load();
            DB_DataLoader_Elw.Ins().Load();

            // 각각의 OrderLimit이 decorator pattern을 잘 지키고 있는지를 테스트 하기 위해서 TestDummy를 root로 설정하여
            // 테스트를 진행한다.
            OrderLimitPassTestDummy dummy = new OrderLimitPassTestDummy();

            g_ol_with_dummy = new ValuePerOnceOrderLimit(kValuePerOnce, dummy);
            g_account_fo = AccountManager.Ins().CreateSimFOAccount();
            g_default_orderlimit = new DefaultOrderLimit(g_account_fo);
            g_ol_with_default = new ValuePerOnceOrderLimit(kValuePerOnce, g_default_orderlimit);
        }
        public void InitFutureOrderLimit_3(String maxValuePerOnce)
        {
            IOrderLimit orderLimit = new DefaultOrderLimit(FutureAccount);
            orderLimit = new CountBidAskRangeOrderLimit(orderLimit);
            orderLimit = new PriceBidAskRangeOrderLimit(orderLimit);
            orderLimit = new ValuePerOnceOrderLimit(Util.ConvertFormatStringToInt64(maxValuePerOnce), orderLimit);
            orderLimit = new LimOrderLimit(orderLimit);
            //TODO
            // MaxNotionalLimit

            FutureAccount.SetOrderLimit(orderLimit);
            _bReadyFutureOrderLimit = true;
        }
Example #3
0
        public void InitEmptyRMDBondOrderLimit_3_2(String maxNotionalPerOnce)
        {
            IOrderLimit orderLimit = new DefaultOrderLimit(this.BondAccount);
            orderLimit = new ValuePerOnceOrderLimit(Util.ConvertFormatStringToInt64(maxNotionalPerOnce), orderLimit);
            const int longUpperLimit = 12000;
            const int shortLowerLimit = 8000;
            orderLimit = new StaticBoundaryOrderLimit(orderLimit, longUpperLimit, shortLowerLimit);

            this.BondAccount.SetOrderLimitEmptyRMD(orderLimit);
            _bReadyBondOrderLimit_3_2 = true;
        }
Example #4
0
        public void InitDefaultBondOrderLimit_3_1(String maxNotionalPerOnce)
        {
            IOrderLimit orderLimit = new DefaultOrderLimit(this.BondAccount);
            orderLimit = new CountBidAskRangeOrderLimit(orderLimit);
            orderLimit = new PriceBidAskRangeOrderLimit(orderLimit);
            orderLimit = new ValuePerOnceOrderLimit(Util.ConvertFormatStringToInt64(maxNotionalPerOnce), orderLimit);
            orderLimit = new LimOrderLimit(orderLimit);

            this.BondAccount.SetOrderLimit(orderLimit);
            _bReadyBondOrderLimit_3_1 = true;
        }