Esempio n. 1
0
        public SweepUnit_OE(
            POrder goalOrder, 
            Account accountFO, 
            Account accountSpot, 
            OptionTribe ot,
            ISweeper parent,
            Boolean bConservativeOptionPolicyOn,
            int muteSec)
        {
            ID = SweepUnitIDManager.NextID++;

            _parent = parent;

            GoalOrder = goalOrder;

            RealOrders = new List<POrder>();
            _ot = ot;

            _mute = new Timer(muteSec, ""); // 2초

            _candidateCodes = ElwOptionUtil.GetSameCandidateCodes(goalOrder.Code);

            _accountSpot = accountSpot;
            _accountFO = accountFO;

            _bConservativeOptionPolicyOn = bConservativeOptionPolicyOn;

            if (!RequestInitOrder())
            {
                GoalOrder.Free();
            }

            _State = State._1_MuteFewSecs;
            ShowState();
        }
        void InitElwDataPart(OptionTribe ot)
        {
            foreach (ElwInfo ei in ot.ElwInfos)
            {
                RawMarketData rmdElw = RmdManager.Ins().GetData(ei.Code);
                WatchElement we = new WatchElement(ref rmdElw);

                ElwWEs.Add(we);
            }
        }
Esempio n. 3
0
 public SweepUnit_OE(
     POrder goalOrder, 
     Account accountFO, 
     Account accountSpot, 
     OptionTribe ot,
     ISweeper parent,
     Boolean bConservativeOptionPolicyOn)
     : this(goalOrder, accountFO, accountSpot, ot, parent, true, 2)
 {
 }
Esempio n. 4
0
        void SetOptionTribes()
        {
            _tribes.Clear();

            // 오름차순(1->2)으로 정렬된 strike list를 얻었다.
            List<double> callStrikeList = OptionUtil.GetSortedStrikeList(CallPutFlag.Call);

            DateTime dtOptionMaturity = Util.GetSystemOptionMaturity();

            foreach (double strike in callStrikeList)
            {
                String callKey = OptionUtil.GetKOIKey(CallPutFlag.Call, strike);
                OptionTribe callOt = new OptionTribe(CallPutFlag.Call, strike, dtOptionMaturity);
                if (callOt.IsValid)
                {
                    _tribes.Add(callKey, callOt);
                }
            }

            List<double> putStrikeList = OptionUtil.GetSortedStrikeList(CallPutFlag.Put);
            foreach (double strike in putStrikeList)
            {
                String putKey = OptionUtil.GetKOIKey(CallPutFlag.Put, strike);
                OptionTribe putOt = new OptionTribe(CallPutFlag.Put, strike, dtOptionMaturity);
                if (putOt.IsValid)
                {
                    _tribes.Add(putKey, putOt);
                }
            }

            SetOptionTribeNeighbors();
        }
Esempio n. 5
0
 public void SetRightTribe(OptionTribe otRight)
 {
     OtRight = otRight;
 }
Esempio n. 6
0
 public void SetLeftTribe(OptionTribe otLeft)
 {
     OtLeft = otLeft;
 }
 void InitOptionDataPart(OptionTribe ot)
 {
     RawMarketData rmdOption = RmdManager.Ins().GetData(ot.KOI.Code);
     OptionWE = new WatchElement(ref rmdOption);
 }