Пример #1
0
        private void RaiseSecurityChanged(Security security)
        {
            SecurityChanged.SafeInvoke(security);

            var multiEvt = SecuritiesChanged;

            if (multiEvt == null)
            {
                return;
            }

            multiEvt.SafeInvoke(new[] { security });
        }
Пример #2
0
 internal void OnUpdateSecurity(string securityId, DateTime time, double open, double high, double low, double close, double lastTradePrice, double volume,
                                double lastTradeVolume, double bid, double ask, double bidSize, double askSize, double openInt, double goBuy, double goSell, double goBase,
                                double goBaseBacked, double highLimit, double lowLimit, int tradingStatus, double volat, double theorPrice)
 {
     SecurityChanged.SafeInvoke(securityId,
                                Tuple.Create(lastTradePrice.ToDecimal(), lastTradeVolume.ToDecimal(), time),
                                open.ToDecimal(), high.ToDecimal(), low.ToDecimal(), close.ToDecimal(), volume.ToDecimal(),
                                new QuoteChange(Sides.Buy, bid.ToDecimal() ?? 0, bidSize.ToDecimal() ?? 0),
                                new QuoteChange(Sides.Sell, ask.ToDecimal() ?? 0, askSize.ToDecimal() ?? 0),
                                openInt.ToDecimal(),
                                Tuple.Create(goBuy.ToDecimal(), goSell.ToDecimal()),
                                Tuple.Create(goBase.ToDecimal(), goBaseBacked.ToDecimal()),
                                Tuple.Create(lowLimit.ToDecimal(), highLimit.ToDecimal()),
                                tradingStatus, Tuple.Create(volat.ToDecimal(), theorPrice.ToDecimal()));
 }
Пример #3
0
 internal void OnUpdateSecurity(string securityId, DateTime time, double open, double high, double low, double close, double lastTradePrice, double volume,
                                double lastTradeVolume, double bid, double ask, double bidSize, double askSize, double openInt, double goBuy, double goSell, double goBase,
                                double goBaseBacked, double highLimit, double lowLimit, int tradingStatus, double volat, double theorPrice)
 {
     SecurityChanged.SafeInvoke(securityId,
                                Tuple.Create(SafeCast(lastTradePrice), SafeCast(lastTradeVolume), time),
                                SafeCast(open), SafeCast(high), SafeCast(low), SafeCast(close), SafeCast(volume),
                                new QuoteChange(Sides.Buy, SafeCast(bid), SafeCast(bidSize)),
                                new QuoteChange(Sides.Sell, SafeCast(ask), SafeCast(askSize)),
                                SafeCast(openInt),
                                Tuple.Create(SafeCast(goBuy), SafeCast(goSell)),
                                Tuple.Create(SafeCast(goBase), SafeCast(goBaseBacked)),
                                Tuple.Create(SafeCast(lowLimit), SafeCast(highLimit)),
                                tradingStatus, Tuple.Create(SafeCast(volat), SafeCast(theorPrice)));
 }
Пример #4
0
 private void SecurityChangedHandler(Security security)
 {
     AddGuiAction(() => SecurityChanged.SafeInvoke(security));
 }