public void SetUp()
        {
            try
            {
                MamaBridge mBridge = Mama.loadBridge("lbm");
                Mama.open();

                MamaDictionary mDictionary = new MamaDictionary();
                mDictionary.create("dictionary.txt");

                MamdaCommonFields.setDictionary(mDictionary, null);
                MamdaTradeFields.reset();
                MamdaTradeFields.setDictionary(mDictionary, null);

                mSubscription = new MamdaSubscription();
                mTradeListener = new MamdaTradeListener();
                mSubscription.addMsgListener(mTradeListener);
                recap = new MamdaConcreteTradeRecap();
            }
            catch (Exception ex)
            {
                throw new MamdaDataException(ex.Message, ex);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// </summary>
        /// <param name="recap"></param>
        public void populateRecap(MamdaConcreteTradeRecap recap)
        {
            lock (this)
            {
                recap.setSymbol(mTradeCache.mSymbol);
                recap.setPartId(mTradeCache.mPartId);
                recap.setSrcTime(mTradeCache.mSrcTime);
                recap.setActTime(mTradeCache.mActTime);
                recap.setLineTime(mTradeCache.mLineTime);
                recap.setSendTime(mTradeCache.mSendTime);
                recap.setPubId(mTradeCache.mPubId);
                recap.setLastPrice(mTradeCache.mLastPrice);
                recap.setLastVolume(mTradeCache.mLastVolume);
                recap.setLastPartId(mTradeCache.mLastPartId);
                recap.setTradeId(mTradeCache.mTradeId);
                recap.setOrigTradeId(mTradeCache.mOrigTradeId);
                recap.setCorrTradeId(mTradeCache.mCorrTradeId);
                recap.setLastTime(mTradeCache.mLastTime);
                recap.setTradeDate(mTradeCache.mTradeDate);
                recap.setIrregPrice(mTradeCache.mIrregPrice);
                recap.setIrregVolume(mTradeCache.mIrregVolume);
                recap.setIrregPartId(mTradeCache.mIrregPartId);
                recap.setIrregTime(mTradeCache.mIrregTime);
                recap.setAccVolume(mTradeCache.mAccVolume);
                recap.setOffExAccVolume(mTradeCache.mOffExAccVolume);
                recap.setOnExAccVolume(mTradeCache.mOnExAccVolume);
                recap.setNetChange(mTradeCache.mNetChange);
                recap.setPctChange(mTradeCache.mPctChange);
                recap.setTradeDirection(mTradeCache.mTradeDirection);
                recap.setSide(mTradeCache.mSide);
                recap.setOpenPrice(mTradeCache.mOpenPrice);
                recap.setHighPrice(mTradeCache.mHighPrice);
                recap.setLowPrice(mTradeCache.mLowPrice);
                recap.setClosePrice(mTradeCache.mClosePrice);
                recap.setPrevClosePrice(mTradeCache.mPrevClosePrice);
                recap.setPrevCloseDate(mTradeCache.mPrevCloseDate);
                recap.setAdjPrevClose(mTradeCache.mAdjPrevClose);
                recap.setBlockCount(mTradeCache.mBlockCount);
                recap.setBlockVolume(mTradeCache.mBlockVolume);
                recap.setVwap(mTradeCache.mVwap);
                recap.setOffExVwap(mTradeCache.mOffExVwap);
                recap.setOnExVwap(mTradeCache.mOnExVwap);
                recap.setTotalValue(mTradeCache.mTotalValue);
                recap.setOffExTotalValue(mTradeCache.mOffExTotalValue);
                recap.setOnExTotalValue(mTradeCache.mOnExTotalValue);
                recap.setStdDev(mTradeCache.mStdDev);
                recap.setStdDevSum(mTradeCache.mStdDevSum);
                recap.setStdDevSumSquares(mTradeCache.mStdDevSumSquares);
                recap.setOrderId(mTradeCache.mOrderId);
                recap.setSettlePrice(mTradeCache.mSettlePrice);
                recap.setSettleDate(mTradeCache.mSettleDate);

                recap.setEventSeqNum(mTradeCache.mEventSeqNum);
                recap.setEventTime(mTradeCache.mEventTime);

                recap.setTradePrice(mTradeCache.mTradePrice);
                recap.setTradeVolume(mTradeCache.mTradeVolume);
                recap.setTradePartId(mTradeCache.mTradePartId);
                recap.setTradeQualStr(mTradeCache.mTradeQualStr);
                recap.setTradeQualNativeStr(mTradeCache.mTradeQualNativeStr);
                recap.setTradeCondStr(mTradeCache.mTradeCondStr);
                recap.setSellersSaleDays(mTradeCache.mSellersSaleDays);
                recap.setStopStockInd(mTradeCache.mStopStockInd);

                recap.setTradeExecVenue(mTradeCache.mTradeExecVenue);
                recap.setOffExchangeTradePrice(mTradeCache.mOffExTradePrice);
                recap.setOnExchangeTradePrice(mTradeCache.mOnExTradePrice);

                recap.setTradeUnits(mTradeCache.mTradeUnits);
                recap.setLastSeqNum(mTradeCache.mLastSeqNum);
                recap.setHighSeqNum(mTradeCache.mHighSeqNum);
                recap.setLowSeqNum(mTradeCache.mLowSeqNum);
                recap.setTotalVolumeSeqNum(mTradeCache.mTotalVolumeSeqNum);
                recap.setCurrencyCode(mTradeCache.mCurrencyCode);

                recap.setTradeCount(mTradeCache.mTradeCount);

                recap.setOrigSeqNum(mTradeCache.mOrigSeqNum);
                recap.setOrigPrice(mTradeCache.mOrigPrice);
                recap.setOrigVolume(mTradeCache.mOrigVolume);
                recap.setOrigPartId(mTradeCache.mOrigPartId);
                recap.setOrigQualStr(mTradeCache.mOrigQualStr);
                recap.setOrigQualNativeStr(mTradeCache.mOrigQualNativeStr);
                recap.setOrigCondStr(mTradeCache.mOrigCondStr);
                recap.setOrigSellersSaleDays(mTradeCache.mOrigSellersSaleDays);
                recap.setOrigStopStockInd(mTradeCache.mOrigStopStockInd);

                recap.setCorrPrice(mTradeCache.mCorrPrice);
                recap.setCorrVolume(mTradeCache.mCorrVolume);
                recap.setCorrPartId(mTradeCache.mCorrPartId);
                recap.setCorrQualStr(mTradeCache.mCorrQualStr);
                recap.setCorrQualNativeStr(mTradeCache.mCorrQualNativeStr);
                recap.setCorrCondStr(mTradeCache.mCorrCondStr);
                recap.setCorrSellersSaleDays(mTradeCache.mCorrSellersSaleDays);
                recap.setCorrStopStockInd(mTradeCache.mCorrStopStockInd);
                recap.setCancelTime(mTradeCache.mCancelTime);
                recap.setIsIrregular(mTradeCache.mIsIrregular);
                recap.setIsCancel(mTradeCache.mIsCancel);
            }
        }