I am using the following code to print changes using OnMarketData and it appears as though it is missing some changes, is this expected or is there something wrong with my code?
protected override void OnMarketData(MarketDataEventArgs e) { if (e.MarketDataType == MarketDataType.Ask)askPrice = e.Price; if (e.MarketDataType == MarketDataType.Ask)askVol = e.Volume; if (e.MarketDataType == MarketDataType.Bid)bidPrice = e.Price; if (e.MarketDataType == MarketDataType.Bid)bidVol = e.Volume; if (e.MarketDataType == MarketDataType.Last)lastPrice = e.Price; if (e.MarketDataType == MarketDataType.Last)lastVol = e.Volume; if (e.MarketDataType != MarketDataType.Last)return; { if(storeBid != bidPrice) { storeBid = bidPrice; storeBV = bidVol; } else if(storeBid == bidPrice) { storeBV = bidVol; Print("StoreBV = " + storeBV + " @ " + bidPrice + " Time " + Time[0]); } } }
suprsnipes
Comment