I'm trying to make a statement for the Bid decrease, similar to High[0] < High[1] for example for bars. I need to check if the current Bid (the real time live Bid) is lower than its previous occurence (the Bid just printed milliseconds before).
I've just learned the difference between GetCurrentBid()/Ask() and stream Bid()/Ask() from that post, but I'm not sure how to implement it.
protected override void OnBarUpdate()
{
currentBidLive = GetCurrentBid();
}
protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
{
if (marketDataUpdate.MarketDataType == MarketDataType.Bid)
{
currentBidLast = marketDataUpdate.Price;
}
}
Thank you for your tips!

Comment