Saturday 21 April 2012

Trading blotter

For a trading blotter application to be good it needs to incorporate the real time feature to satisfy the needs of the user. Trading blotter application must be able display data that are real time data which are used heavily by the users. For a simple trading blotter application it must have some kind of trading benchmark in this CAC40 Is used and another tab for currencies. CAC40 is used in French stock market. In developing trading blotter application developers needs to create three classes which are Market, Instrument and Feeder classes respectively. In market class all the common and necessary properties are included such as CloseTime, OpenTime, Name and MarketState. Instrument class has different important properties such as Shares, Weight, and Capitalization etc. Instrument class also helps to track different market worldwide such as the NASDAQ, BSE etc. In the Feeder class information of the Instrument class is stored and other important information’s like the price information, information of that particular instrument, history of the change in price and availability of a product. Every change in the instrument like selling or purchasing must be notified to the user with the help of the trading blotter application which is done with the Feeder Class. That’s why Feeder class implements the INotifyPropertyChanged interface. As earlier mentioned that the trading blotter application should be able to access different market wit the help of Instrument class, creation of the CAC40 class is done to put it under the Tab Control. A good trading blotter application must have separate design and data presentation. This trading blotter application makes use of this design. To connect data to the .net grid the following code is added.       
public CAC40Control()
{
    InitializeComponent();
    grid.DataSource = Provider.Instance.Cac40Feeders;
}
Composite objects can also be incorporated in this trading blotter application. Composite objects are nothing but the amalgamation of different properties and the returned object will also be a composite object. In this trading blotter application, feeder class has the reference of the Instrument class so the properties of these classes are combined to form a composite property. This property is marked with the CompositeFieldAttribute attribute.
public class Feeder : INotifyPropertyChanged
{
    private readonly Instrument _instrument;
    ...
    [CompositeField]
    public Instrument Instrument
    {
        get { return _instrument; }
    }
}

public class Instrument
{
   ...
    [Field("InstrumentId")]
    public string Isin
    {
        get { return _isin; }
    }
}
This will display ISIN from the Instrument class on the grid of the trading blotter application. Other type of Instrument can also be incorporated in the trading blotter application with the help of InstrumentId identifier. This will use market object in Feeder class.
public class Feeder : INotifyPropertyChanged
{
    private readonly Market _market;
    ...
    [CompositeField]
    public Market Market
    {
        get { return _market; }
    }
}
  

No comments:

Post a Comment