Exemplo n.º 1
0
        internal void OnRunnerDefinitionChange(RunnerDefinition runnerDefinition)
        {
            //snap is invalid
            _snap = null;

            _runnerDefinition = runnerDefinition;
        }
Exemplo n.º 2
0
        internal void OnPriceChange(bool isImage, RunnerChange runnerChange)
        {
            //snap is invalid
            _snap = null;

            MarketRunnerPrices newPrices = new MarketRunnerPrices();


            newPrices.AvailableToLay    = _atlPrices.OnPriceChange(isImage, runnerChange.Atl);
            newPrices.AvailableToBack   = _atbPrices.OnPriceChange(isImage, runnerChange.Atb);
            newPrices.Traded            = _trdPrices.OnPriceChange(isImage, runnerChange.Trd);
            newPrices.StartingPriceBack = _spbPrices.OnPriceChange(isImage, runnerChange.Spb);
            newPrices.StartingPriceLay  = _splPrices.OnPriceChange(isImage, runnerChange.Spl);


            newPrices.BestAvailableToBack        = _batbPrices.OnPriceChange(isImage, runnerChange.Batb);
            newPrices.BestAvailableToLay         = _batlPrices.OnPriceChange(isImage, runnerChange.Batl);
            newPrices.BestDisplayAvailableToBack = _bdatbPrices.OnPriceChange(isImage, runnerChange.Bdatb);
            newPrices.BestDisplayAvailableToLay  = _bdatlPrices.OnPriceChange(isImage, runnerChange.Bdatl);


            newPrices.StartingPriceNear = Utils.SelectPrice(isImage, ref _spn, runnerChange.Spn);
            newPrices.StartingPriceFar  = Utils.SelectPrice(isImage, ref _spf, runnerChange.Spf);
            newPrices.LastTradedPrice   = Utils.SelectPrice(isImage, ref _ltp, runnerChange.Ltp);
            newPrices.TradedVolume      = Utils.SelectPrice(isImage, ref _tv, runnerChange.Tv);

            //copy on write
            _runnerPrices = newPrices;
        }