IProcessState_KtbSkel CheckAnd_Enter(double indicator, RawMarketData spotRmd, RawMarketData futureRmd)
        {
            long enterNotional = GetTargetNotional_Enter(indicator, spotRmd, futureRmd);

            if (enterNotional >= 10)
            {
                //Enter
                IInOutPolicy inPolicy = new InPolicy();
                ProcessState_EnterExit entering = new ProcessState_EnterExit(
                    indicator,
                    _parent,
                    enterNotional,
                    spotRmd,
                    futureRmd,
                    inPolicy,
                    !_unittestVersion);

                logger.Info("KtbSkel State from default --> entering.");
                return entering.Run(indicator, spotRmd, futureRmd);
            }
            return this;
        }
        void TestKtbSkelProcess_Entering_Constructor_Raw(ProcessController_KtbSkel controller)
        {
            RawMarketData spotRmd = RmdManager.Ins().KtbSpot.GetData(controller.Parent.SpotCode);
            RawMarketData futureRmd = RmdManager.Ins().Future.GetData(controller.Parent.FutureCode);

            spotRmd = spotRmd.Clone() as RawMarketData;
            futureRmd = futureRmd.Clone() as RawMarketData;

            spotRmd.BidPrice1 = 8888F;
            spotRmd.AskPrice1 = 8889F;

            futureRmd.BidPrice1 = 107.01F;
            futureRmd.AskPrice1 = 107.02F;

            IInOutPolicy enterPolicy = new InPolicy();

            ProcessState_EnterExit process = new ProcessState_EnterExit(
                1.0F,
                controller,
                10,
                spotRmd,
                futureRmd,
                enterPolicy,
                false);

            ProcessState_EnterExit_Accessor acc = new ProcessState_EnterExit_Accessor(new PrivateObject(process));

            Assert.AreEqual(acc._enterExitPolicy.GetInOutType(), InOutType.InType);
        }