示例#1
0
        static void InitBondArbNodeInputs(STR_Arb strategy, STR_ArbInput input, ref _InnerObjectsForUnittest innerData)
        {
            StrategyNode node = new StrategyNode();
            innerData.BondArbNode = node;

            node.InitRoot_1(strategy);

            innerData.BondArbNodeEnterLimit = new EnterConditionLimit(
                Util.ConvertFormatStringToInt64(input.BondArb_MaxLiveSweepCount),
                Util.ConvertFormatStringToInt64(input.BondArb_MaxNewSweepCount));

            node.InitEnterLimit_2(innerData.BondArbNodeEnterLimit);

            DateTime dtStart = DateUtil.GetTodayDateTime(9 + Const.kHourAdjustment_Start, 0, 0);
            DateTime dtEnd = DateUtil.GetTodayDateTime(12 + 2 + Const.kHourAdjustment_End, 37, 00);

            innerData.BondArbNodeMonitorLimit = new MonitorLimit_Time(dtStart, dtEnd);

            node.InitMonitorTimeLimit_3(innerData.BondArbNodeMonitorLimit);

            SweeperCollectionDefault sweeperCollection = new SweeperCollectionDefault();
            innerData.BondArbSweeperLeaf = sweeperCollection;

            node.InitSweeperCollection_4(sweeperCollection);

            innerData.BondArb_MonitorEnter = new MonitorEnter_BondArb(node);
            node.InitMonitorEnter_5(innerData.BondArb_MonitorEnter);

            strategy.AddNode(node, STR_Arb.NodeType.BondArb);
        }
示例#2
0
        static void InitCalFutNodeInputs(STR_Arb strategy, STR_ArbInput input, ref _InnerObjectsForUnittest innerData)
        {
            StrategyNode node = new StrategyNode();
            innerData.CalFutNode = node;

            node.InitRoot_1(strategy);

            innerData.CalFutNodeEnterLimit = new EnterConditionLimit(
                Util.ConvertFormatStringToInt64(input.CalFut_MaxLiveSweepCount),
                Util.ConvertFormatStringToInt64(input.CalFut_MaxNewSweepCount));

            node.InitEnterLimit_2(innerData.CalFutNodeEnterLimit);

            DateTime dtStart = DateUtil.GetTodayDateTime(9 + Const.kHourAdjustment_Start, 0, 0);
            DateTime dtEnd = DateUtil.GetTodayDateTime(12 + 3 + Const.kHourAdjustment_End, 4, 00);

            innerData.CalFutNodeMonitorLimit = new MonitorLimit_Time(dtStart, dtEnd);

            node.InitMonitorTimeLimit_3(innerData.CalFutNodeMonitorLimit);

            SweeperCollectionDefault sweeperCollection = new SweeperCollectionDefault();
            innerData.CalFutSweeperLeaf = sweeperCollection;

            node.InitSweeperCollection_4(sweeperCollection);

            innerData.CalFut_MonitorEnter = new MonitorEnter_CalFut(
                node,
                Detail.ProductType.KospiFuture,
                KospiFutureUtil.Ins().KFSI.FutureCode1,
                KospiFutureUtil.Ins().KFSI.Code,
                KospiFutureUtil.Ins().KFSI.FutureCode2,
                MonitorEnter_CalFut.ForwardBackward.Forward);

            node.InitMonitorEnter_5(innerData.CalFut_MonitorEnter);

            strategy.AddNode(node, STR_Arb.NodeType.CalFut);
        }