I want colorize current real time ticks by ask or bid (red and green colors).
I do it like that:
protected override void OnMarketData(MarketDataEventArgs e)
{
if (e.MarketDataType == MarketDataType.Last)
{
//buy tick
if(e.Price >=e.MarketData.Ask.Price)
color = Color.Green;
//sell tick
else if(e.Price <= e.MarketData.Bid.Price)
color = Color.Red;
}
}
...but this is dont work correctly such as "time&sales" windows in NT. Colors are different. Whats wrong?
Thanks!
Comment