Files
externals/linux/doc/Onixs.CME.4.8.0/html/TrackingBestBidOffer_8md_source.html

82 lines
11 KiB
HTML

<!-- HTML header for doxygen 1.8.11-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>OnixS C++ CME Market Data Handler: Pages/TrackingBestBidOffer.md Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="onixs-doxygen.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript">
$(window).scroll(function() {
if ($(this).scrollTop() > 1)
{
$('header').addClass("sticky");
}
else
{
$('header').removeClass("sticky");
}
});
</script>
</head>
<body>
<header>
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><a href="http://www.onixs.biz"><img alt="Logo" src="onixs.svg"/></a></td>
<td style="padding-left: 0.5em;">
<div id="projectname">OnixS C++ CME Market Data Handler
&#160;<span id="projectnumber">4.8.0.10</span>
</div>
<div id="projectbrief">API documentation</div>
</td>
</tr>
</tbody>
</table>
</div>
</header>
<div id="wrapper">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Home</span></a></li>
<li><a href="modules.html"><span>Contents</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Pages/TrackingBestBidOffer.md</div> </div>
</div><!--header-->
<div class="contents">
<a href="TrackingBestBidOffer_8md.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;\addtogroup best-bid-offer</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;</div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;\brief Uncovers how to track changes in best bid/offer only. </div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;</div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;By default, the Handler invokes the OnixS::CME::MDH::SecurityListener::onBookUpdate </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;callback each time it receives book-related data via real-time or recovery feeds. </div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;Received and processed updates may refer to any level and side in a book. Sometimes, </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;there&#39;s no interest in having updates for any price level in a book except top one. </div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;For this reason, the Handler allows getting notified only about updates of the best </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;bid or offer.</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;To take advantage of such facility the Handler exposes best bid/offer tracking</div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;parameters which may be defined through the OnixS::CME::MDH::HandlerSettings</div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;class interface. Its OnixS::CME::MDH::HandlerSettings::bookManagement section</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;exposes three members: OnixS::CME::MDH::BookManagement::directBooks,</div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;OnixS::CME::MDH::BookManagement::impliedBooks and</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;OnixS::CME::MDH::BookManagement::consolidatedBooks each of which returns a</div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;mutable instantiation of the OnixS::CME::MDH::BookManagementAndTracking template</div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;class. Returned instance of OnixS::CME::MDH::BookManagementAndTracking in own</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;turn provides access to BBO tracking parameters specialized for a particular</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;book type via OnixS::CME::MDH::BookManagementAndTracking::bboTracking member.</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;</div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;OnixS::CME::MDH::DirectBBOTracking structure for direct books</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;(OnixS::CME::MDH::ImpliedBBOTracking structure for implied and</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;consolidated books respectively) exposes members for each price level</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;attribute like price (OnixS::CME::MDH::DirectBBOTracking::price) and</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;quantity (OnixS::CME::MDH::DirectBBOTracking::quantity) allowing to</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;define tracking.</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;OnixS::CME::MDH::BBOThreshold::enabled member defines whether the particular</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;attribute must be tracked for changes. The Handler raises a book update </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;only if the best bid/offer exceeds threshold bounds.</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;OnixS::CME::MDH::BBOThreshold::threshold member allows to control the sensitivity</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;of Handler to the updates. The value specified via given member allows defining </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;sensitivity threshold for the best bid/offer. If price level attribute (price,</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160;quantity) of the best bid or offer changes for more than the specified value,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;the Handler raises an appropriate event. Otherwise - not.</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;\section bbo-tracking-example Example</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160;The following example demonstrates how to configure the Handler to </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;get book updates only when the price of the best bid or offer changes </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;for more than 10% or quantity changes for more than 50%.</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;~~~{.cpp}</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;using namespace OnixS::CME::MDH;</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;HandlerSettings settings;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;DirectBBOTracking&amp;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160;bboTracking =</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; settings.</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; bookManagement().</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; directBooks().</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; bboTracking();</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;bboTracking.price().enabled(true);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;bboTracking.price().threshold(FLOAT(100000));</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;bboTracking.quantity().enabled(true);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;bboTracking.quantity().threshold(FLOAT(500000));</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;~~~</div></div><!-- fragment --></div><!-- contents -->
<!-- HTML footer for doxygen 1.8.11-->
<!-- start footer part -->
<footer>
<hr class="footer"/>
<address class="footer">
<small>&copy; <a href="http://www.onixs.biz">Onix Solutions [On<span class="corporate-orange">i</span>x<span class="corporate-orange">S</span>]</a>. All rights reserved.</small>
</address>
</footer>
</div> <!-- wrapper -->
</body>
</html>