예제 #1
0
        double GetOneOptionValueDiff(WatchElement optionWE, WatchElement elwWE, BidAskDiffMode bidAskDiffMode)
        {
            double optionOneOptionValue = GetOptionOneOptionValue(optionWE, bidAskDiffMode);
            double elwOneOptionValue = GetElwOneOptionValue(elwWE, bidAskDiffMode);

            return elwOneOptionValue - optionOneOptionValue;
        }
예제 #2
0
        double GetOptionOneOptionValue(WatchElement optionWE, BidAskDiffMode bidAskDiffMode)
        {
            double optionOneOptionValue = -1;

            if (bidAskDiffMode == BidAskDiffMode.AskAsk || bidAskDiffMode == BidAskDiffMode.AskBid)
            {
                optionOneOptionValue = ElwOptionUtil.ConvertPriceToOneOptionValue(optionWE.Code, optionWE.RefRMD.AskPrice1);
            }
            else if (bidAskDiffMode == BidAskDiffMode.BidBid || bidAskDiffMode == BidAskDiffMode.BidAsk)
            {
                optionOneOptionValue = ElwOptionUtil.ConvertPriceToOneOptionValue(optionWE.Code, optionWE.RefRMD.BidPrice1);
            }
            else
            {
                Debug.Assert(false);
            }

            return optionOneOptionValue;
        }