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; }
    }
}
  

Get the latest and most updated stock trading quotes

For the organizations dealing in stocks and shares, stock trading quotes are the most valuable data necessary to run the organization. The stock trading quotes depicts the quotes and the prices of the various types of shares in the present stock market. The best part of stock trading quotes is that it keeps on updating almost every minute when the stock market is open. Therefore the trading system an organization is using must be able to update these stock trading quotes as soon it is actually updated. We call it real time updating in terms of computer systems. While handling stock trading quotes and the associated various real time updates, the system needs to use safety features and facilities like data security, thread safe application environment, able to use customized data types, handling the data as and when the user wants etc… Therefore designing almost a perfect trading system with stock trading quotes facility is very essential for such organizations. Dapfor has been in the business of stock trading quotes since 2007. They have managed to develop the most useful technology for stock trading quotes named as .net grid.

//Some data object
public class Product : INotifyPropertyChanged
{
    //Some fields
    private double price;
    private DateTime maturity;

    [DoubleFormat(Precision = 3, ShortForm = true, ShowZero = false)]
    public double Price
    {
        get { return price; }
        set
        {
            price = value;
            if(PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs("Price"));
            }
        }
    }
    public DateTime Maturity
    {
        get { return maturity; }
    }
    public event PropertyChangedEventHandler PropertyChanged;
}

//Add a data object to the grid.
Product product = new Product();
Row row = grid.Rows.Add(product);

//The grid will automatically sort, filter, group and highlight corresponding row!
//NOTE, YOU DO NOT TOUCH THE GRID HERE!!!
//The product is your business logic and may be placed in any assembly that
//doesn't need to have references to Dapfor assemblies!
product.Price = 123;

//The value in the "Price" cell should equal to '123'.
Assert.AreEqual(row["Price"].Value, 123)

For example the above code handles the real time updating of the .net grids of the stock trading quotes. This development methodology ensures that the data is not lost due to sudden real time updating process. Most of the stock trading quotes based .net grids are able to handle huge amount of data too. Thus the trading systems with stock trading quotes built by Dapfor are the most popular in the market. The .net grid based stock trading quotes is able to deal with any amount of updated data everyday.      

Thursday 19 April 2012

Get to know more using the Dapfor real time stock quotes API

For developers and software designers API (Application programming interface) is an important concept. But it is real time stock quotes API is crucial too for the people dealing in finance and trade. The real time stock quotes API allows people to deal with the regular aspects of stock trading and the internal tutorials to deal with the trading system better. For a financial organization to flourish, real time stock quotes API must be well read. For the reading purposes real time stock quotes API must be well documented. Dapfor is an organization dealing with real time stock quotes since 2007, and hence has the most comprehensive real time stock quotes API in the trade and finance software industry today. The facilities provided by the real time stock quotes API of Dapfor allows you to learn things effectively, quickly and apply them in the real industry.

public class Product : INotifyPropertyChanged
{
    private double price;

    public double Price
    {
        get { return price; }
        set
        {
            //If the price is not the same, change it and notify about price changing
            if (price != value)
            {
                price = value;
                //The event can be raised from any thread. The grid will synchronize thread with GUI without blocking the calling thread.
                //While painting, sorting or filtering the grid can ask this object in the GUI (!) thread to return the price value.
                if(PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs("Price"));
                }
            }
        }
    }

    public event PropertyChangedEventHandler PropertyChanged;
}

public void CreateFilter(Grid grid)
{
    //Set a filter that hides all rows, that contain products with price less than 10
    grid.Filter = new Filter(delegate(Row row)
    {
        //There are three ways to get price:
        //1. From the Cell through the Value property, which returns a double value: row["Price"].Value
        //2. Through the IDataAccessor and IDataField: row.DataAccessor["Price"].Value
        //3. From the data object itself: ((Product)row.DataObject).Price

        if ((double)row["Price"].Value < 10)
        {
            //Filter the row
            return true;
        }

        //The row is not filtered
        return false;
    });
}

//Populate the grid
public void PopulateGrid(Grid grid)
{
    Product product1 = new Product();
    Product product2 = new Product();

    grid.Rows.Add(product1);
    grid.Rows.Add(product2);

    //Update the product's price
    //Data objects will notify the Grid, and it will display only the product2.
    //The product1 will be hidden
    product1.Price = 9;
    product2.Price = 11;
}

The above comprehensive code of the real time stock quotes API developed by Dapfor allows you to understand the concept of IFilter. The IFilter is called whenever new data is added to the .net grid. Therefore just by studying the real time stock quotes API you will be able to understand how it works. Even the real time stock quotes API are given online as a tutorial on the Dapfor website. So whichever method you feel is convenient you should choose that. The real time stock quotes API also have other features and tutorials enlisted in it. Check the real time stock quotes API online for more on trade related software information.

Wednesday 18 April 2012

Managing market orders with trading system from Dapfor

A trading and finance company is dependent on the market orders. These market orders can be of two types. Generally if an organization produces finished or manufactured goods/services then incoming market orders and market orders for buying raw materials for the product manufacturing process. Based on the size of your company you might have a huge bulk of market orders being utilized every day. Therefore the trading software system that you use, should be able to help you in managing these market orders daily, and should also help you in generating market strategy based on the list of market orders.

Dapfor is one of the biggest names in trading software systems development. Started in the year 2007, Dapfor have fully utilized the experience of its developers in the trading field in order to produce the best and easy to use trading system. This software system is based on the reliable technology of .net grid which allows the data to be updated and viewed as and when required. This trading system developed by Dapfor keeps performance, robustness, data safety, easily usable interactive interface, and customizability in viewpoint. The code below shows you the feature of real time blotting for example.

grid.RowUpdated += delegate(object sender, GridRowUpdateEventArgs e)
{
    Feeder feeder = (Feeder) e.Row.DataObject;
    if (e.DataField != null && feeder != null)
    {
        Color color = grid.Highlighting.Color;
        TimeSpan duration = grid.Highlighting.Interval;

        switch (e.DataField.Id)
        {
            case Feeder.FieldLast:
            case Feeder.FieldLastQty:
                color = feeder.PrevLast < feeder.Last ? Color.FromArgb(128, Color.Green) : Color.FromArgb(128, Color.Red);
                break;

            case Feeder.FieldChange:
                double value = (double) e.Row[e.DataField.Id].Value;
                color = Color.FromArgb(128, value > 0 ? Color.DarkGreen : Color.DarkRed);
                break;


            case Feeder.FieldState:
                FeederState state = (FeederState) e.Row[e.DataField.Id].Value;
                color = (Equals(FeederState.Ok, state))
                            ? Color.FromArgb(128, Color.DarkGreen)
                            : Color.FromArgb(128, Equals(FeederState.Nok, state) ? Color.DarkRed : Color.DarkOrange);
                break;

            case Feeder.FieldBid:
            case Feeder.FieldBidQty:
            case Feeder.FieldAsk:
            case Feeder.FieldAskQty:
            case Feeder.FieldVolume:
            case Feeder.FieldHi:
            case Feeder.FieldLow:
                color = Color.FromArgb(128, Color.Orange);
                duration = TimeSpan.FromMilliseconds(500);
                break;
        }

        e.Row[e.DataField.Id].Highlight(duration, color);
    }
}

During the management of market orders in a real time trading system, real time blotting technology helps a lot in the process of updating data. As soon as a particular field is changed in the market orders form, you are kept updated. In fact based on the needs, you might be able to view all the market orders that are being sent and accepted from within the organization. Thread safety and data binding ensures that the updated market orders data remain safe, and is easily viewed by others without the need to change its format. The market orders is a crucial part of a real time trading system and thus should be given importance.

Thursday 5 April 2012

.NET Framework evolving development within itself

Development field has been producing many clinching artifacts since primitive times. Though support of technology based platform has now been prominent in modern age but innovative ideas have always been in abundance. There are some outlined distinctive developments in this world that proves to be a building asset for many other for their own development. Among such kind of amazing development and innovations comes .NET Framework. Developed by Microsoft Incorporations, it works prominently for Windows operating systems.

Grandeur of this software platform can be seen when developing console based applications and websites. There are many things attached to .NET Framework that sets it apart from others in this genre. User friendly graphical interface is one of the most basic and also important aspects of .NET framework. Since it incorporates many features, it is natural to have a big library to hold all entities in it. Compatibility with different languages for coding purposes along with inter-compatibility option between different languages is induced in this platform.

You can create all Windows application on it including real time software along with co-related console based applications. Website designing is also a part of .NET framework. Inter related synchronization with other base development software like SQL Server makes it even more flexible. One of the most important and unique attribute of .NET Framework is IDE, which stands for Integrated Development Environment. This covers up the whole idea vested behind .NET framework of providing the most user friendly platform for developing other interfaces. It is named as Visual Studio and has updated versions available prominently in market.

Another important part of this framework is CLR i.e. Common Language Runtime which is a run time environment especially designed to execute applications created on it. CLR along with its huge library makes .NET Framework. Importance of this base platform will always remain prominent due to its accessibility and brilliant support to other developments.
We can also use various testing tools which allow us to monitor the status of the program and it helps in keeping a track of the performance meter

Hierarchical Data Binding in .Net

.net provides the programmers with server-side controls to bind the data. In other words, it is used to display the client with the format the control is designed for. Many data binding examples are two dimensional i.e. binding of simple flat data source with the result of queries made to the database. But sometimes there are several occasion when data doesn’t fit into a two dimensional spaces that’s where it fails. Data binding are of three types: Hierarchical data binding, Hierarchical Database data binding and binding with XML data.

The only required condition to bind the data to the server-side control is the control must support the property called DataSource including the method called DataBind(). The data source to which the control is to be attached must implement IEnumerable interface with the exception of DataSet and DataTable which can be bound directly. For nested Hierarchical data binding, developers are required to bind the data on the sub-items of each one of them. In other word, the needed condition for programmers is that another data bound control with the ItemTemplate of the Repeater (this server-side control is needed for the purpose of hierarchical data binding which gives the ItemTemplate that shows the each given item in the enumerable data source).
The tough part is to map the SubItems collection of the Item currently attached to the DataSource property of the nested Repeater. There is also a coding type of declaration in the DataSource property of the nested Repeater to achieve hierarchical data binding. The nested data bind will occur only once per Item in the top level. It is important to note that when the pair of nested data bound control, the expressions are scoped to the closest control. To bind the data from the database is to able defining the relationship within the DataSet for extracting the data hierarchically. For XML hierarchical data binding the provided XML API is used for simplifying the coding. For satisfying all the data bonded controls hierarchical data binding must be used.

Hierarchical data binding is very important in desktop applications and it brings flexibility to all the programs. Hierarchical data binding is used in many other frameworks but in .NET it is very easy to implement.