MarketDepthEventArgs
Previous Topic  Next Topic 

Definition
Represents a change in level two market data also known as market depth and is passed as a parameter in the OnMarketDepth() method.

Methods and Properties

MarketDataType

Possible values are:


MarketDataType.Ask

MarketDataType.Bid

MarketMaker

A string representing the market maker id

Position

An int value representing the zero based position in the depth ladder.

Operation

Represents the action you should take when building a level two book.


Possible values are:


Operation.Insert

Operation.Remove

Operation.Update

Price

A double value representing the price

Time

A DateTime structure representing the time

ToString()

A string representation of the MarketDataEventArgs object

Volume

An int value representing volume


Examples

protected override void OnMarketDepth(MarketDepthEventArgs e)
{
    // Print some data to the Output window
    if (e.MarketDataType == MarketDataType.Ask && e.Operation == Operation.Update)
        Print("The most recent ask change is " + e.Price + " " + e.Volume);
}