﻿<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/css' href='https://stocksharp.com/css/style.css'?>
<?xml-stylesheet type='text/css' href='https://stocksharp.com/css/bbeditor.css'?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title type="html">hft trading. StockSharp</title>
  <id>https://stocksharp.com/handlers/atom.ashx?category=tag&amp;id=hft trading&amp;type=articles</id>
  <rights type="text">Copyright @ StockSharp Platform LLC 2010 - 2025</rights>
  <updated>2026-04-04T08:35:38Z</updated>
  <logo>https://stocksharp.com/images/logo.png</logo>
  <link href="https://stocksharp.com/handlers/atom.ashx?category=tag&amp;id=hft trading&amp;type=articles" rel="self" type="application/rss+xml" />
  <entry>
    <id>https://stocksharp.com/topic/11483/</id>
    <title type="text">S#.API and S#.Shell is your step in trading.</title>
    <published>2020-03-17T20:31:25Z</published>
    <updated>2020-03-17T20:31:25Z</updated>
    <author>
      <name>Marat</name>
      <uri>https://stocksharp.com/users/101940/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <category term="HFT robots" />
    <category term="HFT trading" />
    <category term="HFT trade" />
    <category term="trade robots" />
    <category term="trade strategy" />
    <content type="html">Good afternoon!&lt;br /&gt;It was no accident that we decided to tell you about two products of our company that are part of the basic software from S#.&lt;br /&gt;Our choice was made based on the opinions of our users, who are interested in learning a little more about the purpose of programs, how they work and how they are used in trading.&lt;br /&gt;It should be noted that &lt;b&gt;S#.Shell&lt;/b&gt; and &lt;b&gt;S#.API&lt;/b&gt; is a &lt;b&gt;comprehensive solution for creating trading robots in C#&lt;/b&gt;. However, the use of these programs is not limited to creating trading robots.&lt;br /&gt;&lt;br /&gt;&lt;u&gt;So, first let&amp;#39;s look at what S#.API.&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The term API, according to Wikipedia, means:&lt;/b&gt;&lt;br /&gt;&lt;em&gt;The Application programming interface (API) is a description of the ways (a set of classes, procedures, functions, structures, or constants) that one computer program can interact with another program. It is usually included in the description of an Internet Protocol, software framework, or standard for calling operating system functions. It is often implemented by a separate software library or operating system service. It is used by programmers when writing various applications.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;S#.API is a completely free library that allows novice and experienced traders with even basic programming knowledge to use it to create their own trading systems in the field of algotrading.&lt;br /&gt;The library is based on the C# language, with the ability to use it in the &lt;em&gt;Visual Studio&lt;/em&gt; programming environment. The library is designed for the user to create their own unique trading systems: from positional strategies with a long timeframe to high-frequency strategies (&lt;em&gt;HFT&lt;/em&gt;) that use direct access (DMA) to stock trading.&lt;br /&gt;The uniqueness of this product is that it is based on the work of all the basic products of StockSharp, such as: &lt;a href="https://stocksharp.com/products/designer/" title="https://stocksharp.com/products/designer/"&gt;S#.Designer&lt;/a&gt;, &lt;a href="https://stocksharp.com/products/hydra/" title="https://stocksharp.com/products/hydra/"&gt;S#.Data&lt;/a&gt;, as well as the &lt;a href="https://stocksharp.com/products/pricing/#sources" title="https://stocksharp.com/products/pricing/#sources"&gt;S#MatLab&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/111782/trade-terminal-system.png' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/111782/trade-terminal-system.png?size=800x800" alt="trade-terminal-system.png" title="trade-terminal-system.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For example, the use of library elements is widely used to create &lt;a href="https://doc.stocksharp.com/html/20a8932b-09cb-4f13-bade-770a68ac96fd.htm" title="https://doc.stocksharp.com/html/20a8932b-09cb-4f13-bade-770a68ac96fd.htm"&gt;unique cubes&lt;/a&gt; in the Designer program. in fact, the user takes a ready-made component represented by the program code, combines it with other components, or modifies it and applies it in the designer trading robot constructor, placing it in their own cubes.&lt;br /&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/111787/source-code-designer.jpg' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/111787/source-code-designer.jpg?size=800x800" alt="source-code-designer.jpg" title="source-code-designer.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;The Mechanism Of S#.API is based on the use of messages.&lt;/b&gt;&lt;br /&gt;&lt;u&gt;This mechanism consists of three elements:&lt;/u&gt;&lt;br /&gt;&lt;em&gt;- &lt;b&gt;message Message,&lt;/b&gt;&lt;br /&gt;-&lt;b&gt; message adapter MessageAdapter&lt;/b&gt;&lt;br /&gt;- &lt;b&gt;IMessageChannel transport channel.&lt;/b&gt;&lt;/em&gt;&lt;br /&gt;The message acts as an agent that transmits information.&lt;br /&gt;&lt;u&gt;Messages can be outgoing and incoming.&lt;/u&gt;&lt;br /&gt;&lt;em&gt;- Outgoing messages - messages that are sent to an external system. These are usually commands that the program generates, such as the ConnectMessage message, a command requesting a connection to the server.&lt;br /&gt;- Incoming messages - messages coming from an external system. These are messages that transmit information about market data, transactions, portfolios, connection events, and so on.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/111783/Shell-Title-frimework-api.png' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/111783/Shell-Title-frimework-api.png?size=800x800" alt="Shell-Title-frimework-api.png" title="Shell-Title-frimework-api.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This mechanism allows you to unify the work on developing adapters, while at the same time allowing the user to create their own connections to various trading systems.&lt;br /&gt;&lt;u&gt;Let&amp;#39;s look at the main advantages of using S#.API:&lt;/u&gt;&lt;br /&gt;&lt;em&gt;- Independence of the trading robot created by the user from the API of the broker or exchange used. in fact, the created trading robot can work with any connection. This way the user can easily connect their trading robot to Quik, Transaq, or FOREX without changing the program code.&lt;br /&gt;- S # library today.The API supports more than &lt;b&gt;70 connections &lt;/b&gt;(Connectors (Russia), Connectors (America), Forex Connectors, and Cryptocurrency Connectors).&lt;br /&gt;- The library&amp;#39;s versatility allows it to be used by private traders, small development teams, as well as large investment companies and banks.&lt;br /&gt;- An important indicator is high performance, which allows you to simultaneously execute hundreds of strategies for any instrument.&lt;br /&gt;- High speed of processing applications in S#.API allows you to reduce the processing time to a few microseconds.&lt;br /&gt;- The library can use direct access to trade, such as: &lt;em&gt;Plaza II, Micex Bridge, and also supports the FIX Protocol,&lt;/em&gt; which allows you to reduce the processing time of orders.&lt;br /&gt;- The definition of real slippage is achieved through realistic testing, which is carried out using ticks and glasses. This allows the user to minimize the risk of possible losses and more flexibly and accurately configure their trading strategy.&lt;br /&gt;- The widespread use of the C# language used in creating the library and&lt;em&gt; Visual Studio&lt;/em&gt; environment simplifies the user&amp;#39;s work, due to excessive information about their capabilities.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;For the convenience of working with S#.API is divided into blocks, which allows the user to easily find the section that interests them.&lt;br /&gt;The ease of installation on a computer, the prevalence of the programming language and the use environment make the library S#.API is a universal way to develop trading robots. Once a user has created a trading robot, they can connect it to any chosen trading platform or broker.&lt;/b&gt;&lt;br /&gt;Also, knowledge of working with the library allows you to develop the user&amp;#39;s programming skills.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;We have considered the main element-the S#.API that all the basic StockSharp software products are built on.&lt;br /&gt;Great, now it is clear that with the use of the S#.API users can create their own trading robots and use them in trading.&lt;br /&gt;However, using the Visual Studio development environment is not very convenient for working with created trading systems, let alone testing trading systems.&lt;/b&gt;&lt;br /&gt;For convenience and ease of operation, StockSharp has developed a ready-made graphical framework with the ability to quickly change to the needs of the user - trader, while open source, created in C# - S#.Shell.&lt;br /&gt;&lt;u&gt;Let&amp;#39;s look at the main advantages of this graphical framework:&lt;/u&gt;&lt;br /&gt;&lt;em&gt;- The main advantage of the product is open source code. What does this give the user?&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/111785/gui-shell-source-code.jpg' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/111785/gui-shell-source-code.jpg?size=800x800" alt="gui-shell-source-code.jpg" title="gui-shell-source-code.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The open source code of the program allows the user to use all the features of the product, complementing it with their own add-ons. The user can set up their own control panels, use ready-made elements, or create their own. Easy configuration increases the speed of preparing the program for launch.&lt;br /&gt;Availability of S#modulations.Shell, allows you to create a user-friendly environment that is understandable to them.&lt;br /&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/111784/Shell-Title-frimework.png' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/111784/Shell-Title-frimework.png?size=800x800" alt="Shell-Title-frimework.png" title="Shell-Title-frimework.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thus, the use of open source code does not just allow the user to create a convenient individual interface, but it is ideal for creating custom trading robots, and this expands the scope of the user&amp;#39;s knowledge, opening up a resource for additional earnings.&lt;br /&gt;&lt;em&gt;- The next undisputed advantage of S#.Shell supports more than 70 different connections to global exchanges (Connectors (Russia), Connectors (America), Forex Connectors, Cryptocurrency connectors, General).&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/111781/gui-shell-connector-exchange.jpg' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/111781/gui-shell-connector-exchange.jpg?size=800x800" alt="gui-shell-connector-exchange.jpg" title="gui-shell-connector-exchange.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;- S#.Shell allows the user to fully test their trading systems before entering real trading. Convenient statistics, Equity curves, and a detailed report on the testing process allow the user to take into account possible risks at the development and testing stage and make changes to the trading robot code.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/111786/gui-shell-equti-exchange.png' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/111786/gui-shell-equti-exchange.png?size=800x800" alt="gui-shell-equti-exchange.png" title="gui-shell-equti-exchange.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;- The user can also save backup copies of their trading robots, restore settings and compare changes with the original code of the trading robot.&lt;br /&gt;- A very important and convenient S#function.Shell is a simultaneous launch of strategies. What does this mean? The user is no longer limited to a single platform for work and can also apply a set of several strategies that can operate separately from each other, or can be applied as a set of strategies.&lt;/em&gt;&lt;br /&gt;Such complexes allow you to compensate or insure each other, conduct a policy of hedging and arbitration.&lt;br /&gt;At the same time, the user receives detailed information about the course of trading, receiving information about orders, transactions, positions, profits, logs, and other information, the output of which can be configured in the program.&lt;br /&gt;The user can also set up a scheduled strategy launch by setting a clear schedule for each of the launched trading strategies.&lt;br /&gt;S#.Shell is a convenient and multifunctional software solution that can be customized for the user.&lt;br /&gt;&lt;br /&gt;To sum up, we can say the following, that the use of the complex from the&lt;b&gt; S#.API &lt;/b&gt;and &lt;b&gt;S#.Shell&lt;/b&gt;, allows the user to get a fully customizable shopping complex for their needs. The user gets not just a shell for trading, but a solution for testing, trading, and complex interaction of their created strategies with different markets simultaneously or separately.&lt;br /&gt;Ease of use is obvious, it not only reduces the time to prepare and trade, but also allows the user to develop solutions for sale, which increases revenue.&lt;br /&gt;A convenient&lt;a href="https://stocksharp.com/edu/" title="https://stocksharp.com/edu/"&gt; training course from StockSharp&lt;/a&gt; allows you to quickly master both programs, learn how to program and earn money. &lt;b&gt;S# source code already included in the price&lt;/b&gt; S#.Shell and additional trading systems reduce the user&amp;#39;s costs and allow you to start trading immediately.</content>
  </entry>
  <entry>
    <id>https://stocksharp.com/topic/11166/</id>
    <title type="text">FAQ on FIX Protocol. Limit orders FOK and IOC (FAK).</title>
    <published>2019-11-15T18:04:12Z</published>
    <updated>2019-11-15T18:04:32Z</updated>
    <author>
      <name>Marat</name>
      <uri>https://stocksharp.com/users/101940/</uri>
      <email>info@stocksharp.com</email>
    </author>
    <category term="Algorithmic trading" />
    <category term="trading" />
    <category term="FIX 4" />
    <category term="FIX 5" />
    <category term="FIX protocol" />
    <category term="exchange trading" />
    <category term="exchange information" />
    <category term="Moscow exchange" />
    <category term="high-frequency trading" />
    <category term="HFT trading" />
    <category term="FIX connector" />
    <category term="connector to the exchange" />
    <category term="connector for trading" />
    <category term="exchange trade" />
    <category term="FOK order" />
    <category term="IIOC order" />
    <category term="FAK order" />
    <content type="html">Earlier, we said that the &lt;b&gt;FIX Protocol&lt;/b&gt; not only increased the&lt;b&gt; speed of traders&lt;/b&gt; in the market, but also provided an opportunity for market participants to use &lt;b&gt;limit orders&lt;/b&gt;, which reduced the risks of trading. Let&amp;#39;s take a closer look at two types of limit orders. &lt;br /&gt;Let&amp;#39;s start with the &lt;em&gt;FOK&lt;/em&gt; order.&lt;br /&gt;Literally, its name stands for - &lt;em&gt;&amp;#39;Fill Or Kill&amp;#39;&lt;/em&gt;. The essence of this order is that it is&lt;b&gt; executed immediately&lt;/b&gt; and in &lt;b&gt;full at the stated price&lt;/b&gt;, or will not be executed at all, which eliminates the possibility of slippage. Thus, if your order&lt;b&gt; cannot be executed in full&lt;/b&gt;, then the order is&lt;b&gt; simply rejected&lt;/b&gt;, if the order &lt;b&gt;can be executed in full&lt;/b&gt;, then the &lt;b&gt;order is executed in full at the specified price&lt;/b&gt;. [nerd] This type of order is very &lt;b&gt;convenient&lt;/b&gt; for &lt;b&gt;scalping&lt;/b&gt; or &lt;b&gt;arbitrage strategies&lt;/b&gt;, as they &lt;b&gt;eliminate the risk of slippage&lt;/b&gt;. In fact, we can say that the &lt;a href="https://stocksharp.com/robot/18/edward-scissorhands/" title="https://stocksharp.com/robot/18/edward-scissorhands/"&gt;&amp;quot;Edward – Scissorhands&amp;quot;&lt;/a&gt;&lt;b&gt; arbitrage strategy&lt;/b&gt; from StockSharp &lt;b&gt;eliminates risks&lt;/b&gt;. Below is an example of the rejection of the &lt;em&gt;FOK&lt;/em&gt; order in the &lt;em&gt;CME&lt;/em&gt; system, due to the fact that the &lt;b&gt;order size is 20&lt;/b&gt;, and the&lt;b&gt; book contains only 19&lt;/b&gt;, so the order &lt;b&gt;can not be executed completely&lt;/b&gt;, and the system cancels it. &lt;br /&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/110086/FOK-orde-FIX-protocol.jpg' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/110086/FOK-orde-FIX-protocol.jpg?size=800x800" alt="FOK-orde-FIX-protocol.jpg" title="FOK-orde-FIX-protocol.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The next type of limit orders are &lt;em&gt;IOC&lt;/em&gt; orders. &lt;br /&gt;The name &lt;em&gt;&amp;#39;Immediate OR Cancel&amp;#39; &lt;/em&gt;means that the &lt;b&gt;order is executed in whole or in part at the set price&lt;/b&gt;, otherwise the order will be canceled. For example, if the &lt;b&gt;order size is 100 units&lt;/b&gt;, only &lt;b&gt;50 units can be sold at the set price&lt;/b&gt;. If we use an order of type &lt;em&gt;FOK&lt;/em&gt;, the system will cancel it, as it can not be fully executed. When using the &lt;em&gt;IOC&lt;/em&gt; &lt;b&gt;limit order&lt;/b&gt;, the order will be &lt;b&gt;executed for 50 units&lt;/b&gt;, and the &lt;b&gt;remaining ones will be canceled&lt;/b&gt;. &lt;em&gt;IOC&lt;/em&gt; also has another name &lt;em&gt;FAK&lt;/em&gt;, which stands for &lt;em&gt;&amp;#39;Fill And Kill&amp;#39;&lt;/em&gt;, executed and discarded the remainder.[nerd]&lt;br /&gt;For example, an &lt;em&gt;IOC&lt;/em&gt; order will be partially executed (in the &lt;em&gt;CME&lt;/em&gt; system, its name is &lt;em&gt;FAK&lt;/em&gt;). If we &lt;b&gt;buy 15&lt;/b&gt;, and the book &lt;b&gt;contains only 10&lt;/b&gt;, then we &lt;b&gt;buy 10&lt;/b&gt;, and the &lt;b&gt;remaining 5&lt;/b&gt; are rejected, so this order can be called partially executable:&lt;br /&gt;&lt;br /&gt;&lt;a href='https://stocksharp.com/file/110085/IOK-order-FIX-protocol.jpg' class='lightview' data-lightview-options="skin: 'mac'" data-lightview-group='mixed'&gt;&lt;img src="https://stocksharp.com/file/110085/IOK-order-FIX-protocol.jpg?size=800x800" alt="IOK-order-FIX-protocol.jpg" title="IOK-order-FIX-protocol.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Limit orders&lt;/b&gt; when working through the &lt;b&gt;FIX Protocol&lt;/b&gt; allow the trader to &lt;b&gt;reduce risks&lt;/b&gt;, and in some cases, especially when working with &lt;b&gt;arbitrage strategies&lt;/b&gt; to &lt;b&gt;reduce them to zero&lt;/b&gt;. Our company provides a range of programs to work in the market through &lt;b&gt;FIX connect&lt;/b&gt;, such as: designer trading strategies &lt;a href="https://stocksharp.com/products/designer/" title="https://stocksharp.com/products/designer/"&gt;Designer&lt;/a&gt;, trading program &lt;a href="https://stocksharp.com/products/terminal/" title="https://stocksharp.com/products/terminal/"&gt;Terminal&lt;/a&gt;. We also provide a full range of connectors for connection to trades, including FIX. Flexible system of discounts and reliability of connection, makes us one of leaders in the market. The full range of connectors and software can be found on our &lt;a href="https://stocksharp.com/products/pricing/" title="https://stocksharp.com/products/pricing/"&gt;website&lt;/a&gt;.&lt;br /&gt;</content>
  </entry>
</feed>