
The stock market is an extremely high-tech industry, which involves a lot of interesting technologies and extremely complex infrastructure. Today we want to talk about how in the financial sector is working on IT-projects. In particular, to highlight the aspect of software development on the example of creating a
trading terminal SmartX.
Prehistory
We at ITinvest, unlike most other brokers, have always paid attention to developing their own software. In particular, in the 2000s, the
SmartTrade terminal we created, which, in principle, still meets the basic requirements of traders, enjoyed great popularity in the market.
')
However, software, like everything in this world, is becoming outdated, and sometimes you just need to move on. Therefore, it was decided to create a new flagship terminal, which would incorporate all the best qualities of our previous products, but would be more modern, both in terms of interface and functionality, and, moreover, more flexible than its predecessors.
That is why we decided not to develop the trading terminal completely from scratch, but to license the technology of the American company
Modulus FE , in particular, the
M4 trading platform, which came with all the source code and could be modified to meet the needs of our customers.

Stages of development
Immediately after the acquisition of the technology and its initial adaptation to our systems, the terminal, called SmartX, was able to connect to the server, download graphics, glasses, and that was the end of its capabilities. So there was a lot of work.
In addition, almost immediately it became obvious that Modulus FE technologies do not meet the performance requirements of commercial applications on the Russian stock market. Simply put, even with a not particularly large load, the terminal began to slow down extremely, which in situations where a fraction of a second can lead either to significant profits or to large losses, is simply unacceptable.
Charts
One of the main reasons for poor performance was the graphics on the COM + platform embedded in the M4 platform. When opening 5-minute or 15-minute schedules, the speed was still acceptable, but the tick schedule tightly “hung” the terminal.
In addition, the “default” graphics had serious flaws in terms of usability - for example, to draw a line on the chart (completely standard for any terminal function), the user had to press a special button to stop the chart update, draw a line, and then turn on the download again.
After the release of the first release of the SmartX 1.0 product, the final decision was made to abandon the M4 charts and find some other solution. As a result, a new graphics core was chosen — the open-source
project Gordago — which was then heavily “finished” in accordance with our needs in terms of performance.

At the moment, we are proud that our terminal has some of the most nimble schedules, fully implemented on .Net.
Controls
Modulus FE solutions are built on the .NET platform, so initially all controls were standard “dotnetovskimi”, but, for the same performance reasons, it was decided to abandon them as well. A good replacement, after some refinement, was another open
SourceGrid project. The speed of updating tables on large amounts of data was eventually increased by almost 2 orders of magnitude.

Data manager
As is often the case, having begun to change something, it is difficult to stop, and after starting the development of a new terminal, work began on creating an entirely new brokerage trading system. The main part of these works was completed in the fall of 2013, the resulting
system was named MatriX ™ (a separate topic will be described in more detail about it). One of its main features was a single cash position.
When using the previous version of our trading system, which was called it-trade / SmartTrade, the client was provided with a separate personal account for each trading platform. For example, the Moscow Exchange Stock Market is an MS account; Derivatives Market of the Moscow Exchange - RF account; The foreign exchange market of the Moscow Stock Exchange - FX account (non-deliverable) or CD account (deliverable) and others. With such a division, securities and cash located on the same trading platform cannot serve as collateral for transactions on the other.
When using a single cash position, the client is provided with a single account with the MO identifier, which includes several trading platforms at once:
- Moscow Exchange Stock Market (all instruments traded in T + 2 mode).
- Derivatives Market of the Moscow Exchange (futures, options).
- Foreign exchange market of the Moscow Exchange (non-deliverable mode).
- London Stock Exchange section IOB (ADR of Russian issuers).
This account becomes the same for all trading platforms, and assets (money, securities) located on the same trading platform of the market can be used as collateral in other markets included in a single cash position.
Accordingly, the new trading terminal had to comply with these innovations and be able to work with a single monetary position. This, in turn, led to the need to rework the previously existing Data Manager module, which SmartX inherited from its predecessor, the SmartTrade terminal.
The Data Manager module is responsible for the interaction of the terminal with the
brokerage trading system . The old module was single-threaded and it wasn’t doing well with performance, which was unacceptable in a situation where gigabytes of stock data could be pumped through the terminal per day. The new Data Manager has become multi-threaded and asynchronous, so now the terminal can display 2 million client requests without any problems - when trading with a robot, sometimes traders control the account situation using a trading terminal, so this is quite a valuable opportunity.
Expansion of functionality: Plugins
After SmartX received the necessary basic set of functions (charts, transaction tapes, quotes tables, stock glasses, account status, information on bids and positions), we thought about expanding its capabilities. At the same time, the terminal itself was very complicated and did not want to be inflexible; therefore, the extension / plug-in mechanism was invented and implemented, which allows those SmartX users who lack the basic functionality of the terminal to expand its capabilities. Currently available plugins include:
- Package of optional plugins.
- Robot Designer TradeScript ™ (more on this topic ).
- Bond trading.
- Easy trade.
- The lifetime of the application.
- Additional window quotes.
- EasyMANi auto-follow is the first third-party plugin.
- The famous game "Snake".
Initially, plugins were connected to the terminal manually - the user had to copy the corresponding .dll library into the desired folder, and now the terminal is able to independently download extensions from the site.

Interface and Usability
The color scheme of the terminal remained in it from the M4 platform, which had a good design and an interesting opportunity to include different design schemes, and not just some standard one. In fact, all that SmartX and M4 have in common at the moment is just the visual design.

As for typography, it was decided to use standard Windows fonts in the terminal, so if the user changes his default font, then he will change in the terminal.
In general, the work on usability has never stopped and continues to this day. The general scheme of work on adding new functions to the terminal can be divided into two stages:
- Transfer to the predecessor functional terminal (SmartTrade).
- Upon completion of this phase, adding new functions at the request of customers and on the initiative within the company.
After the introduction of any innovations, collecting feedback from users begins, taking into account that next changes occur in the next version of the terminal (including from the point of view of the interface) - this is a continuous process that allows you to constantly move forward.
In addition, one of the main differences between SmartX and previous products is the fact that it is optimized for working with multiple monitors. This is reflected in the fact that all the elements of his workspace are a table, quotation windows, etc. - can be moved outside the terminal itself. Then this workspace can be saved and loaded, for example, on another computer.
Another important from the point of view of usability is innovation - in the new terminal, the client can see all his accounts and requests for them at the same time, while working with previous terminals, when switching from one account to another, the opportunity was lost in real-time mode see the situation on the rest and carry out operations on them.
Also, for the first time for ITinvest products, SmartX has an automatic update feature. Now users in two clicks can get a new version of the terminal.
Risk management
In order to help clients protect themselves and their money when trading on the stock exchange,
a risk management module was implemented in the terminal. It works on the client side and allows the user to set restrictions, in violation of which it is prohibited to send new orders and open new positions, as well as to set up automatic setting of orders protecting positions (stop loss, take profit, etc.).

Plans
Despite the fact that the
SmartX project has been
going on for several years now, the constant development and improvement of the terminal never stops. In particular, among the nearest plans, the introduction of functionality in it, which is available to users through the web interface of the trading system, including the signing of reporting documents, transfers between accounts, subscriptions to services.
In full compliance with the rules set forth in
this topic , we pay a lot of attention to security, but we try to make it so that it does not complicate the users to work with the program. Therefore, it will be possible to perform all operations with accounts using a new digital signature system similar to many Internet banks. By pressing the button, the user will receive an SMS code, after entering which, for example, the document will be considered signed.
That's all for today. We will be happy to answer questions in the comments. Thanks for attention!
PS You can independently get acquainted with what we have as a result of development, without the need to open a real account and make money on it. Especially for these purposes, we have a
test access - risk-free virtual exchange, with money, stocks, futures and everything necessary for full-fledged trading.