public void SetUp()
        {
            try
            {
                //Intialise mama
                myBridge = new MamaBridge("lbm");
                Mama.open();

                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);

                ticker = new tradetickerCB();
                mTradeListener.addHandler(ticker);

            }
            catch (Exception e)
            {
                Console.Error.WriteLine(e.ToString());
                Environment.Exit(1);
            }
        }
Exemplo n.º 2
0
            public void onParticipantCreate(
				MamdaSubscription             subscription,
				MamdaMultiParticipantManager  manager,
				string                        participantId,
				NullableBool                   isPrimary)
            {
                MamdaTradeListener aTradeListener = new MamdaTradeListener();
                MamdaQuoteListener aQuoteListener = new MamdaQuoteListener();
                ComboTicker        aTicker        = new ComboTicker();

                aTradeListener.addHandler(aTicker);
                aQuoteListener.addHandler(aTicker);

                manager.addParticipantListener(aTradeListener, participantId);
                manager.addParticipantListener(aQuoteListener, participantId);
            }
Exemplo n.º 3
0
            public void onConsolidatedCreate(
				MamdaSubscription              subscription,
				MamdaMultiParticipantManager   manager)
            {
                MamdaTradeListener aTradeListener = new MamdaTradeListener();
                MamdaQuoteListener aQuoteListener = new MamdaQuoteListener();
                ComboTicker        aTicker        = new ComboTicker();

                aTradeListener.addHandler(aTicker);
                aQuoteListener.addHandler(aTicker);

                manager.addConsolidatedListener(aTradeListener);
                manager.addConsolidatedListener(aQuoteListener);
            }
Exemplo n.º 4
0
            public void onSecurityCreate(
				MamdaSubscription           subscription,
				MamdaMultiSecurityManager   manager,
				string                      symbol)
            {
                MamdaTradeListener aTradeListener = new MamdaTradeListener();
                MamdaQuoteListener aQuoteListener = new MamdaQuoteListener();
                ComboTicker        aTicker        = new ComboTicker();

                aTradeListener.addHandler(aTicker);
                aQuoteListener.addHandler(aTicker);

                manager.addListener(aTradeListener, symbol);
                manager.addListener(aQuoteListener, symbol);
            }