<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dinosaur Technology and Trading &#187; C#</title>
	<atom:link href="http://www.dinosaurtech.com/category/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dinosaurtech.com</link>
	<description>The online ramblings of a young dinosaur</description>
	<lastBuildDate>Wed, 25 Jan 2012 05:05:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Google Code</title>
		<link>http://www.dinosaurtech.com/2011/google-code/</link>
		<comments>http://www.dinosaurtech.com/2011/google-code/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 00:19:22 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2011/google-code/</guid>
		<description><![CDATA[So I moved the source and the binaries over to google code at http://code.google.com/p/ib-csharp/ I haven’t updated any links in my blog but will gradually get there. I also changed the license to the very permissive MIT license, so you are free to use this as you wish (at your own risk… as always). I [...]]]></description>
			<content:encoded><![CDATA[<p>So I moved the source and the binaries over to google code at <a href="http://code.google.com/p/ib-csharp/">http://code.google.com/p/ib-csharp/</a></p>
<p>I haven’t updated any links in my blog but will gradually get there. I also changed the license to the very permissive MIT license, so you are free to use this as you wish (at your own risk… as always).</p>
<p>I also finally compile a help file again! I need to add some additional source comments, but the release files now contain a compiled chm file. Also every build is built on a build server finally, so dropping releases should be quicker.</p>
<p>I have one known bug where if you use the disconnect logic heavily you can run into issues – I will tackle this when I get a chance.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2011/google-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Forums Update</title>
		<link>http://www.dinosaurtech.com/2011/forums-update/</link>
		<comments>http://www.dinosaurtech.com/2011/forums-update/#comments</comments>
		<pubDate>Sun, 06 Feb 2011 00:57:27 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[blog]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/?p=433</guid>
		<description><![CDATA[I just finished updating bbPress to the latest version and installing several anti spam plugins + mass user deletes. If you have never posted to the forums, your id was deleted, along with several who posted in the last week or so, so if it makes you re-register please do. Hopefully this cleans things up [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished updating bbPress to the latest version and installing several anti spam plugins + mass user deletes. If you have never posted to the forums, your id was deleted, along with several who posted in the last week or so, so if it makes you re-register please do. Hopefully this cleans things up going forward (and let me know if you are blocked by mistake!)</p>
<p>I am thinking of moving the library to google code or codeplex, so this may happen in the coming weeks. I have also been receiving a lot of requests for documentation, so I will look at building helpfiles again. I used to use sandbox, but their web documentation is asp.net, and this server is a linux machine, so I&#8217;ll see what I can do.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2011/forums-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>More Serialization Bug Fixes</title>
		<link>http://www.dinosaurtech.com/2011/more-serialization-bug-fixes/</link>
		<comments>http://www.dinosaurtech.com/2011/more-serialization-bug-fixes/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 18:37:39 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/?p=430</guid>
		<description><![CDATA[Just checked into subversion some more serialization bug fixes. Also need to work on forums &#8211; some spam bot has taken over.]]></description>
			<content:encoded><![CDATA[<p>Just checked into subversion some more serialization bug fixes.</p>
<p>Also need to work on forums &#8211; some spam bot has taken over.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2011/more-serialization-bug-fixes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>9.65 Now in Subversion</title>
		<link>http://www.dinosaurtech.com/2011/9-65-now-in-subversion/</link>
		<comments>http://www.dinosaurtech.com/2011/9-65-now-in-subversion/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 02:20:16 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/?p=427</guid>
		<description><![CDATA[I just updated the Interactive Brokers api to support Ib&#8217;s 9.65 new features(ShortSale Exemption functionality). I also finally added parameterless constructors to all of the event args so that they can be serialized/deserialized. Added the warrant type to securitytype. Fixed orderId going to 2^31-1 when it should be interpreted as zero. Check it out in subversion, or [...]]]></description>
			<content:encoded><![CDATA[<p>I just updated the Interactive Brokers api to support Ib&#8217;s 9.65 new features(ShortSale Exemption functionality).</p>
<p>I also finally added parameterless constructors to all of the event args so that they can be serialized/deserialized.</p>
<p>Added the warrant type to securitytype.</p>
<p>Fixed orderId going to 2^31-1 when it should be interpreted as zero.</p>
<p>Check it out in subversion, or I will make another release soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2011/9-65-now-in-subversion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Trading System Framework</title>
		<link>http://www.dinosaurtech.com/2010/trading-system-framework/</link>
		<comments>http://www.dinosaurtech.com/2010/trading-system-framework/#comments</comments>
		<pubDate>Tue, 23 Nov 2010 00:13:11 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[ATS]]></category>
		<category><![CDATA[auto trading system]]></category>
		<category><![CDATA[Automated Trading]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[optimization]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[trading]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2010/trading-system-framework/</guid>
		<description><![CDATA[The core of our architecture rests on a universal trading system framework. This framework abstracts all of the basic market interfaces, allowing us to write generic strategies that run on any market, including simulation. As you can see in the above central box, our trading system abstracts several core functionalities. Settings Management – the entire [...]]]></description>
			<content:encoded><![CDATA[<p>The core of our architecture rests on a universal trading system framework. This framework abstracts all of the basic market interfaces, allowing us to write generic strategies that run on any market, including simulation.</p>
<p><a href="http://www.dinosaurtech.com/wp-content/uploads/2010/11/2010-11-22-Trading-System-Framework.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px; padding-top: 0px" title="2010-11-22 Trading System Framework" border="0" alt="2010-11-22 Trading System Framework" src="http://www.dinosaurtech.com/wp-content/uploads/2010/11/2010-11-22-Trading-System-Framework_thumb.png" width="503" height="368" /></a></p>
<p>As you can see in the above central box, our trading system abstracts several core functionalities.</p>
<ul>
<li><strong>Settings Management</strong> – the entire trading system is configured via a straightforward xml configuration file. The actual storage and management of this is abstracted by the particular profile. For live running, these settings are version controlled and managed in a central replicated sql database. For simulation, these are stored as a simple file provided to a console based simulator. For optimization purposes, these files serve as the basis for chromosomes in the genetic optimizer (with an optimization file providing the constraints for the search space). At the end of the day, develop a simple generic settings management system that can be abstracted for different targets.</li>
<li><strong>Contract Manager / Base Contract</strong> – The core component of any system is the instrument that you are trading / measuring. The contract manager provides position management and risk management abstractions, as well as contract locating functionalities. Ultimately any object that requires a contract, goes through the contract manager, and is given an abstraction of a base contract. The base contract can be a futures contract, equity, bond etc. This provides for a universal interface to subscribe to market data, and issue / monitor orders.</li>
<li><strong>Strategy Engine / Base Strategies</strong> – The strategy engine is the very heart of any trading system. This basic class subscribes to message pumps and processes the messages to handle orders. It is the most versatile object in the trading system, allowing for nearly any type of strategy.</li>
<li><strong>Charting</strong> – Few systems put enough emphasis on thorough charting, but I find it critical for visualizing the results of a simulation, as well as determining what is happening during live trading. All contracts and strategies implement a simple IChartable interface that allows them to output highly configurable charts, right down to the Graphics handles. This allows the charts to be presented in a live windows forms view, or painted to a Bitmap class for saving to disk.</li>
<li><strong>Logging</strong> – At the end of the day, traceability is critical. Every trade made needs to be serialized to disk / database in order to reconcile with your clearing house. Furthermore, every strategy needs to output useful tracing information to aid in debugging. Beyond the obvious tracing, strategies also need to implement a reporting interface to provide live state information to the user interface in order to determine how it is behaving, and if necessary to modify its parameter set, or to debug the strategy. This again is abstracted, just like settings and charting to go to different destinations based on the target of the trading engine. For simulation it outputs to the simulation results, whereas in live trading we work against easily queried database engines.</li>
</ul>
<p>Next up I want to cut into application design and multithreading. There is a lot to cover, and I am swamped, so expect the articles to continue to appear as I have time. And if you have any questions feel free to email <span id="enkoder_1_47036910">email hidden; JavaScript is required</span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_1_47036910() {
var kode="kode=\"110 114 103 104 64 37 114 110 104 103 95 37 64 110 114 103 104 95 37 95 95 52 64 35 52 52 51 35 52 51 55 35 52 51 54 35 52 55 55 54 57 35 35 53 58 55 57 35 35 56 55 55 60 35 35 56 53 55 60 35 35 54 53 52 55 54 35 52 52 59 35 52 51 55 35 52 52 60 35 55 51 35 35 55 60 55 55 35 35 51 54 35 52 52 55 35 52 52 59 35 52 51 58 35 52 53 55 35 52 51 52 35 52 52 55 35 52 60 58 55 55 35 35 56 55 55 60 35 35 56 53 55 60 35 35 54 53 52 55 60 35 52 52 59 35 52 51 52 35 52 52 56 35 52 52 59 35 55 52 35 35 51 60 35 52 51 55 35 52 52 54 35 52 52 55 35 52 55 51 52 57 55 35 52 51 54 35 52 51 55 35 52 52 51 35 57 52 35 35 56 53 54 60 35 35 51 58 35 52 52 54 35 52 51 55 35 52 53 53 35 52 52 51 35 52 51 53 35 52 52 55 35 52 52 54 35 52 60 60 52 55 53 35 52 53 58 35 52 52 59 35 52 51 60 35 52 52 55 35 55 51 35 35 56 54 54 60 35 35 56 58 60 60 35 35 56 56 60 60 35 35 56 56 60 60 35 35 54 56 52 57 51 35 54 51 35 35 51 56 35 52 52 58 35 52 51 58 35 52 51 55 35 52 55 56 60 57 35 35 56 56 60 60 35 35 56 56 60 60 35 35 58 56 60 54 35 35 56 56 52 60 53 35 52 52 51 35 52 51 59 35 52 51 52 35 52 52 60 35 52 52 55 35 57 52 35 35 52 52 35 52 51 51 35 52 52 51 35 52 52 58 35 52 58 52 52 57 54 35 52 51 59 35 52 51 54 35 52 52 55 35 52 52 59 35 52 52 51 35 52 51 51 35 52 53 58 35 52 52 60 35 52 52 55 35 52 51 53 35 52 51 58 35 55 51 35 35 51 60 35 52 52 53 35 52 52 55 35 52 56 53 60 60 35 35 56 56 60 60 35 35 56 56 54 60 35 35 56 58 60 60 35 35 56 56 60 60 35 35 56 56 60 60 35 35 56 56 52 57 53 35 52 52 55 35 60 51 35 35 56 56 60 60 35 35 56 56 57 60 35 35 51 54 52 56 51 35 60 51 35 35 56 56 60 60 35 35 56 56 57 60 35 35 56 56 54 60 35 35 56 58 60 60 35 35 55 56 57 55 35 35 56 53 54 60 35 35 55 58 52 57 55 35 52 51 54 35 52 51 55 35 52 52 51 35 54 52 35 35 53 58 52 57 51 35 52 52 55 35 52 52 54 35 52 51 55 35 57 51 35 35 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 60 55 52 55 59 35 52 52 56 35 52 52 52 35 52 52 59 35 52 51 60 35 55 52 35 35 53 54 55 55 35 35 55 53 55 55 35 35 52 60 35 52 51 58 35 52 53 55 35 52 51 52 35 52 52 55 35 52 52 58 35 52 51 59 35 52 54 55 55 55 35 35 60 55 52 55 60 35 52 51 55 35 52 52 59 35 52 51 54 35 55 52 35 35 53 54 55 55 35 35 55 53 57 55 95 95 35 53 95 37 62 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 95 42 95 95 95 95 43 35 95 42 44 62 123 64 95 42 95 95 95 42 95 95 62 105 114 117 43 108 64 51 62 108 63 110 114 103 104 49 111 104 113 106 119 107 62 108 46 46 44 126 123 46 64 86 119 117 108 113 106 49 105 117 114 112 70 107 100 117 70 114 103 104 43 115 100 117 118 104 76 113 119 43 110 114 103 104 94 108 96 44 48 54 44 128 110 114 103 104 64 123 95 37 62 123 62 95 42 64 62 95 42 114 105 43 117 64 108 62 51 63 108 110 43 103 114 49 104 104 111 106 113 107 119 52 48 62 44 46 108 53 64 126 44 46 123 110 64 103 114 49 104 107 102 117 100 119 68 108 43 52 46 46 44 114 110 104 103 102 49 100 107 68 117 43 119 44 108 110 128 103 114 64 104 46 123 108 43 110 63 103 114 49 104 104 111 106 113 107 119 110 66 103 114 49 104 107 102 117 100 119 68 110 43 103 114 49 104 104 111 106 113 107 119 52 48 61 44 95 42 95 42 62 44 37 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 43 110 114 103 104 49 111 104 113 106 119 107 48 52 44 62 108 46 64 53 44 126 123 46 64 110 114 103 104 49 102 107 100 117 68 119 43 108 46 52 44 46 110 114 103 104 49 102 107 100 117 68 119 43 108 44 128 110 114 103 104 64 123 46 43 108 63 110 114 103 104 49 111 104 113 106 119 107 66 110 114 103 104 49 102 107 100 117 68 119 43 110 114 103 104 49 111 104 113 106 119 107 48 52 44 61 42 42 44 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_1_47036910();
var span = document.getElementById('enkoder_1_47036910');
span.parentNode.removeChild(span);
/* --> */
</script>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2010/trading-system-framework/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Ib Bug Fixes</title>
		<link>http://www.dinosaurtech.com/2010/ib-bug-fixes/</link>
		<comments>http://www.dinosaurtech.com/2010/ib-bug-fixes/#comments</comments>
		<pubDate>Thu, 04 Nov 2010 22:53:46 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/?p=417</guid>
		<description><![CDATA[Received several helpful bug resports and just committed bug fixes / improvements to subversion Improved performance of EnumDescConverter by precaching attributes. Bug Fixes on TickType and Error Message types (Incorrect Id) Fixed esoteric IBClient Abort bug &#8211; do not use thread.abort!! It is not guaranteed. Marked UnderlyingComponent as serializable. Let me know if you guys [...]]]></description>
			<content:encoded><![CDATA[<p>Received several helpful bug resports and just committed bug fixes / improvements to subversion</p>
<div id="_mcePaste">
<ul>
<li>Improved performance of EnumDescConverter by precaching attributes.</li>
<li>Bug Fixes on TickType and Error Message types (Incorrect Id)</li>
<li>Fixed esoteric IBClient Abort bug &#8211; do not use thread.abort!! It is not guaranteed.</li>
<li>Marked UnderlyingComponent as serializable.</li>
</ul>
</div>
<div id="_mcePaste">Let me know if you guys run into any problems &#8211; once this is tested a bit more thoroughly, I&#8217;ll make a release.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2010/ib-bug-fixes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Interactive Brokers Order Listener</title>
		<link>http://www.dinosaurtech.com/2010/interactive-brokers-order-listener/</link>
		<comments>http://www.dinosaurtech.com/2010/interactive-brokers-order-listener/#comments</comments>
		<pubDate>Wed, 22 Sep 2010 02:03:04 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/?p=407</guid>
		<description><![CDATA[Sorry for the long gap on infrastructure lately &#8211; I actually have intentions of discussing my production system again (mostly written against Trading Technologies api), but I still do considerable work with Ib&#8217;s api and have run into trouble. All of my prior interfaces with Ib have been for strictly self contained situations. Essentially where [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for the long gap on infrastructure lately &#8211; I actually have intentions of discussing my production system again (mostly written against Trading Technologies api), but I still do considerable work with Ib&#8217;s api and have run into trouble.</p>
<p>All of my prior interfaces with Ib have been for strictly self contained situations. Essentially where the program is placing orders and monitoring messages for the orders it has placed. I am now writing an interface to listen for any orders placed by any application or directly through the TWS interface. It appears I can use the RequestOpenOrders method with a clientId of -1 and receive all open orders at that moment in time, or I can use the RequestAutoOpenOrders to map TWS order messages to my client with a clientId of 0. But it does not appear there is any way to get all order updates from any target without constantly querying the open orders method.</p>
<p>Does anyone have a better way to do this?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2010/interactive-brokers-order-listener/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>9.64 in subversion</title>
		<link>http://www.dinosaurtech.com/2010/9-64-in-subversion/</link>
		<comments>http://www.dinosaurtech.com/2010/9-64-in-subversion/#comments</comments>
		<pubDate>Tue, 25 May 2010 23:17:22 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/?p=400</guid>
		<description><![CDATA[Check out subversion for the 9.64 release &#8211; I will make a zip drop once I&#8217;ve run it in my auto trade for a bit to verify things look good.]]></description>
			<content:encoded><![CDATA[<p>Check out subversion for the 9.64 release &#8211; I will make a zip drop once I&#8217;ve run it in my auto trade for a bit to verify things look good.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2010/9-64-in-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Berkeley DB C# Bindings</title>
		<link>http://www.dinosaurtech.com/2009/berkeley-db-c-bindings/</link>
		<comments>http://www.dinosaurtech.com/2009/berkeley-db-c-bindings/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 03:30:20 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[ATS]]></category>
		<category><![CDATA[BerkeleyDb]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2009/berkeley-db-c-bindings/</guid>
		<description><![CDATA[Berkeley DB is an excellent Transactional Data Store. Historically it has had a strong C and Java following, but with the recent 4.8 release, they have added C# bindings, finally opening up Berkeley DB to C#. This is a non-relational database, which is well suited for things like raw tick data, where you are not [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.oracle.com/technology/products/berkeley-db/index.html"><img style="display: inline; margin-left: 0px; margin-right: 0px" align="right" src="http://www.oracle.com/technology/products/berkeley-db/images/berkeley-db-logo.gif" /></a>Berkeley DB is an excellent Transactional Data Store. Historically it has had a strong C and Java following, but with the recent 4.8 release, they have added C# bindings, finally opening up Berkeley DB to C#.</p>
<p>This is a non-relational database, which is well suited for things like raw tick data, where you are not querying them by values, but instead by an indexed time and symbol field.</p>
<p>To give you an idea of why this is important, take a look at their <a href="http://www.oracle.com/technology/products/berkeley-db/pdf/berkeley-db-perf.pdf">white paper</a> from 2006 on performance. In a transacted environment they achieved 125,486 single record writes per second. With modern 2009 hardware, and multiple CPU / Solid State Disk systems, this could readily record every single tick coming off of the NYSE and NASDAQ (multiple million per second).</p>
<p>Check them out at <a href="http://www.oracle.com/technology/products/berkeley-db/index.html">Oracle Berkeley DB</a>. I’m in the process of testing this out for our historical logging, and am very impressed so far, even on commodity hardware.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2009/berkeley-db-c-bindings/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Multithreading made easy</title>
		<link>http://www.dinosaurtech.com/2009/multithreading-made-easy/</link>
		<comments>http://www.dinosaurtech.com/2009/multithreading-made-easy/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 15:47:25 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[CCR]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[trading]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2009/multithreading-made-easy/</guid>
		<description><![CDATA[I love when Robotics innovations overlap with Finance. Our trading engine is a discombobulated series of threads interfacing to their respective data sources and execution platforms, with careful locking in between. Making changes to this system has become a nightmare due to all the careful locking concerns. Enter Microsoft CCR. It provides a very clean [...]]]></description>
			<content:encoded><![CDATA[<p>I love when Robotics innovations overlap with Finance. Our trading engine is a discombobulated series of threads interfacing to their respective data sources and execution platforms, with careful locking in between. Making changes to this system has become a nightmare due to all the careful locking concerns. Enter <a href="http://www.microsoft.com/ccrdss/">Microsoft CCR</a>. It provides a very clean and thoroughly tested set of primitives for a large scale thread pool with inter task messaging. It even has adapters for using tasks on Windows Forms threads, as well as WPF dispatches. It was first distributed with the Microsoft Robotics Studio, as they suffer from the same problems we do in finance, talking to a host of sensors and actuators with careful locking constraints.</p>
<p>To illustrate a common problem with trading systems. You have a producer consumer model, where your data is coming in from the exchange on a single thread. This data is going to a large number of contracts, and it would be nice to do this in a multithreaded model. Under the ordinary paradigm, you would create a queue, have your producer thread lock on the queue, add the new market ticks, and unlock, letting your consumers take locks on the queue, and beginning to work on this. There are special concerns though, for a given contract you need to make sure all ticks are handled synchronously, and whenever the queue hits zero for a particular contract after data has changed, you want to tell your strategy to process the new data. Here you would need a second producer consumer framework, and things continue expanding from there.</p>
<p>With the CCR, you would break things down into tasks. There would be a task that consumes raw market data and posts it to a port. There would be a task that takes a tick from the market data and posts it to a contract. There would be a task that takes a tick in a contract and updates the contract, checking at the end if the contract’s queue is empty, if so, it would post the entire contract to the strategy saying it has been updated. There would be a task that consumes a contract and updates the strategy. All of these are small work tasks that are setup to run in a common dispatcher pool, and are all invoked every time a work product is posted to a port. No complicated setup, just arbitrated registrations.</p>
<p>I’d love to spend a lot more time talking about this, but here is one short example.</p>
<pre class="brush: csharp; title: ; notranslate">&amp;lt;/code&amp;gt;using (var dispatcher = new Dispatcher(0, &amp;quot;Master Dispatcher&amp;quot;))
{
var dispatcherQueue = new DispatcherQueue(&amp;quot;Master Queue&amp;quot;);
var tickPort = new Port&amp;lt;int&amp;gt;();

Arbiter.Activate(dispatcherQueue, Arbiter.Receive(true, tickPort, tick=&amp;gt;
{
if(tick &amp;gt; 25)
{
Market.PlaceOrder(tick, 1);
}
}));
while(true)
{
tickPort.Post(new Random().Next(50));
}
}</pre>
<p>I realize there are many simplifications made in this post – I just wanted to convey how cool the CCR framework is. If it were free, I’d post my Ib wrapper for it! Easily worth the $400, and if you are a student you can get it from the Robotics Studio for free. There is talk of merging it with the parallels framework added in C# 4.0 (another great invention… waiting for VS 2010 to fully integrate it though).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2009/multithreading-made-easy/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>9.6.3.14 Release &#8211; Bug Fix Release</title>
		<link>http://www.dinosaurtech.com/2009/9-6-3-14-release-bug-fix-release/</link>
		<comments>http://www.dinosaurtech.com/2009/9-6-3-14-release-bug-fix-release/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 19:23:32 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2009/9-6-3-14-release-bug-fix-release/</guid>
		<description><![CDATA[This release still corresponds to the Ib 9.63 beta release, but includes another bug Fix to the ReadDecimal sub routine which was plagued with some corner case floating point numbers which are now properly handled. I also added an overload to RequestHistory which allows you to specify the duration to allow you to pass a [...]]]></description>
			<content:encoded><![CDATA[<p>This release still corresponds to the Ib 9.63 beta release, but includes another bug Fix to the ReadDecimal sub routine which was plagued with some corner case floating point numbers which are now properly handled.</p>
<p>I also added an overload to RequestHistory which allows you to specify the duration to allow you to pass a string for duration directly to Ib.</p>
<p>If you have any problems, <span id="enkoder_3_717236857">email hidden; JavaScript is required</span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_3_717236857() {
var kode="kode=\"110 114 103 104 64 37 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 54 58 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 60 56 35 54 58 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 60 56 35 54 58 35 60 56 35 60 56 35 55 55 35 57 55 35 60 56 35 60 56 35 57 53 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 55 53 35 55 55 35 60 56 35 60 56 35 55 59 35 57 52 35 52 52 60 35 56 53 35 52 52 54 35 52 51 58 35 52 52 52 35 52 51 57 35 52 51 55 35 52 51 55 35 52 52 55 35 55 60 35 55 54 35 52 51 54 35 57 59 35 52 52 51 35 52 51 51 35 52 52 60 35 52 51 53 35 52 52 58 35 52 51 55 35 52 51 58 35 52 52 55 35 55 60 35 57 57 35 52 51 54 35 52 52 60 35 52 52 51 35 52 52 54 35 52 51 58 35 52 52 52 35 52 51 57 35 52 51 55 35 52 51 55 35 52 52 55 35 55 60 35 57 54 35 52 51 54 35 55 54 35 52 52 51 35 52 53 54 35 52 51 59 35 52 51 55 35 55 57 35 52 52 55 35 57 55 35 52 53 59 35 52 51 54 35 52 51 59 35 52 52 51 35 52 52 60 35 55 55 35 52 52 58 35 55 54 35 52 51 58 35 57 59 35 55 60 35 52 51 51 35 52 51 54 35 52 51 53 35 52 52 51 35 52 51 55 35 55 55 35 52 52 55 35 55 57 35 55 57 35 55 54 35 56 53 35 57 59 35 52 51 59 35 52 51 51 35 52 52 60 35 52 51 53 35 52 52 58 35 52 51 55 35 52 51 58 35 52 52 55 35 55 60 35 57 55 35 52 51 54 35 52 53 54 35 52 52 51 35 55 55 35 55 57 35 57 55 35 52 53 57 35 52 51 59 35 56 54 35 55 55 35 55 57 35 55 59 35 57 53 35 52 52 60 35 56 53 35 52 52 54 35 52 51 58 35 52 52 52 35 52 51 57 35 52 51 55 35 52 51 55 35 52 52 55 35 55 60 35 55 54 35 52 51 54 35 52 51 59 35 52 52 51 35 56 52 35 57 54 35 52 51 59 35 57 53 35 52 52 58 35 57 55 35 52 51 56 35 55 54 35 60 56 35 60 56 35 52 52 55 35 57 53 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 60 56 35 57 55 35 57 53 35 60 56 35 55 53 35 60 56 35 60 56 35 52 53 54 35 60 56 35 60 56 35 60 56 35 54 58 35 57 53 35 60 56 35 60 56 35 57 55 35 52 53 54 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 55 55 35 52 53 59 35 55 59 35 56 55 35 60 57 35 55 55 35 60 55 35 52 51 59 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 52 52 60 35 55 54 35 58 57 35 52 52 54 35 52 52 59 35 52 51 55 35 52 51 51 35 52 52 58 35 55 54 35 52 52 56 35 52 51 54 35 52 51 55 35 58 51 35 52 52 55 35 52 51 51 35 52 52 58 35 58 51 35 52 51 58 35 52 52 55 35 52 52 53 35 52 51 56 35 52 52 58 35 52 51 57 35 55 60 35 52 51 59 35 52 52 54 35 52 52 60 35 52 52 58 35 57 55 35 59 57 35 52 53 54 35 55 57 35 55 55 35 52 53 57 35 55 57 35 55 57 35 57 53 35 52 51 59 35 52 52 60 35 52 51 58 35 52 52 54 35 52 51 57 35 52 52 52 35 52 51 55 35 52 51 55 35 55 60 35 52 52 55 35 52 51 54 35 57 54 35 52 52 51 35 57 53 35 52 51 59 35 57 55 35 56 52 35 55 54 35 52 51 59 35 52 52 55 35 52 52 58 35 60 56 35 60 56 35 52 51 56 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 57 55 35 60 56 35 60 56 35 60 56 35 60 56 35 57 53 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 52 53 54 35 60 56 35 60 56 35 60 56 35 60 56 35 57 53 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 55 55 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 60 56 35 54 56 35 55 54 35 60 56 35 60 56 35 52 51 59 35 52 52 60 35 52 52 56 35 52 52 52 35 55 60 35 52 52 59 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 52 51 55 35 57 55 35 52 52 55 35 52 51 54 35 60 56 35 60 56 35 52 52 51 35 60 56 35 60 56 35 60 56 35 54 58 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 56 58 35 60 56 35 60 56 35 56 56 35 57 53 35 54 56 35 56 54 35 56 55 35 54 56 35 56 57 35 56 56 35 54 56 35 56 59 35 57 51 35 54 56 35 56 52 35 56 58 35 56 53 35 56 57 35 56 52 35 54 56 35 54 56 35 56 52 35 56 58 35 54 56 35 56 57 35 56 57 35 54 56 35 56 55 35 56 52 35 54 56 35 54 56 35 57 51 35 56 53 35 56 56 35 54 56 35 56 53 35 56 55 35 56 54 35 57 51 35 56 53 35 56 53 35 56 57 35 56 54 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 52 35 57 51 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 53 35 56 57 35 54 56 35 54 56 35 56 52 35 57 51 35 54 56 35 56 59 35 56 58 35 54 56 35 56 57 35 57 51 35 54 56 35 56 54 35 56 55 35 56 53 35 56 57 35 56 56 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 54 56 35 56 52 35 56 52 35 54 56 35 54 56 35 56 56 35 56 52 35 56 59 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 54 35 56 59 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 58 35 56 55 35 56 53 35 56 53 35 56 53 35 56 59 35 56 59 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 52 35 56 53 35 54 56 35 54 56 35 56 53 35 56 53 35 54 56 35 54 56 35 56 58 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 53 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 55 35 56 54 35 56 57 35 56 53 35 54 56 35 56 59 35 56 58 35 54 56 35 56 57 35 57 51 35 56 53 35 56 56 35 56 56 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 53 35 56 57 35 54 56 35 54 56 35 56 52 35 56 52 35 54 56 35 54 56 35 56 55 35 56 58 35 56 52 35 56 57 35 56 53 35 54 56 35 56 55 35 56 55 35 54 56 35 56 55 35 57 51 35 54 56 35 56 59 35 56 52 35 54 56 35 54 56 35 56 56 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 57 51 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 54 35 56 59 35 54 56 35 56 53 35 56 56 35 56 54 35 57 51 35 56 53 35 56 53 35 57 51 35 56 55 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 54 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 53 35 57 55 35 54 56 35 60 56 35 60 56 35 56 52 35 60 56 35 60 56 35 60 56 35 54 58 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 52 51 55 35 60 56 35 60 56 35 52 52 55 35 52 51 54 35 60 56 35 60 56 35 52 52 51 35 60 56 35 60 56 35 60 56 35 54 58 35 52 51 55 35 60 56 35 60 56 35 52 52 55 35 57 55 35 60 56 35 60 56 35 52 51 54 35 52 52 51 35 60 56 35 54 58 35 57 53 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 59 35 52 52 56 35 52 52 52 35 52 51 59 35 52 52 60 35 60 56 35 55 53 35 60 56 35 60 56 35 55 55 35 55 54 35 60 56 35 55 53 35 60 56 35 60 56 35 55 60 35 52 52 58 35 52 51 55 35 52 53 52 35 52 51 55 35 52 52 58 35 52 52 59 35 52 51 55 35 55 54 35 55 55 35 55 60 35 52 51 60 35 52 52 55 35 52 51 59 35 52 52 54 35 55 54 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 55 55 35 57 53 35 57 53 35 60 56 35 54 58 35 57 55 35 52 53 54 35 60 56 35 55 53 35 60 56 35 55 53 35 52 51 56 35 57 53 35 52 52 58 35 52 52 55 35 52 51 59 35 55 54 35 56 52 35 57 55 35 52 51 59 35 57 53 35 55 54 35 57 54 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 52 52 35 55 60 35 52 52 54 35 52 51 55 35 52 52 60 35 52 51 57 35 55 59 35 52 51 58 35 55 55 35 56 53 35 52 51 59 35 57 53 35 57 55 35 55 57 35 55 55 35 56 54 35 52 53 54 35 52 53 57 35 57 55 35 55 57 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 51 53 35 55 60 35 52 51 51 35 52 51 58 35 57 59 35 52 52 58 35 55 54 35 52 52 60 35 55 57 35 52 51 59 35 55 55 35 56 53 35 52 52 51 35 55 57 35 52 51 54 35 52 52 55 35 55 60 35 52 51 55 35 52 51 58 35 52 51 53 35 52 52 58 35 52 51 51 35 52 52 60 35 57 59 35 52 51 59 35 55 54 35 52 53 59 35 55 55 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 53 54 35 57 55 35 55 54 35 55 57 35 57 54 35 52 51 59 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 52 52 35 55 60 35 52 52 54 35 52 51 55 35 52 52 60 35 52 51 57 35 57 57 35 52 51 58 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 51 53 35 55 60 35 52 51 51 35 52 51 58 35 57 59 35 52 52 58 35 55 54 35 52 52 60 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 52 52 35 55 60 35 52 52 54 35 52 51 55 35 52 52 60 35 52 51 57 35 55 59 35 52 51 58 35 55 55 35 56 53 35 60 56 35 55 53 35 57 52 35 55 55 35 60 56 35 55 53 35 57 53 35 54 58 35 57 53 35 52 53 54 35 57 55 35 55 53 35 55 53 35 57 53 35 52 51 56 35 52 52 55 35 52 52 58 35 55 54 35 52 51 59 35 57 55 35 56 52 35 57 53 35 52 51 59 35 57 54 35 55 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 55 59 35 56 53 35 55 55 35 57 53 35 52 51 59 35 55 57 35 57 55 35 56 54 35 55 55 35 52 53 57 35 52 53 54 35 55 57 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 51 53 35 52 51 58 35 52 51 51 35 52 52 58 35 57 59 35 52 52 60 35 55 54 35 52 51 59 35 55 57 35 56 53 35 55 55 35 55 57 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 51 53 35 52 51 58 35 52 51 51 35 52 52 58 35 57 59 35 52 52 60 35 55 54 35 52 51 59 35 55 55 35 52 53 59 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 53 54 35 55 57 35 55 54 35 52 51 59 35 57 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 57 57 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 51 53 35 52 51 58 35 52 51 51 35 52 52 58 35 57 59 35 52 52 60 35 55 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 55 59 35 56 53 35 55 55 35 57 52 35 55 53 35 55 53 35 55 55 35 57 53 37 62 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 43 42 35 42 44 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 110 114 103 104 49 111 104 113 106 119 107 62 108 46 46 44 126 123 46 64 86 119 117 108 113 106 49 105 117 114 112 70 107 100 117 70 114 103 104 43 115 100 117 118 104 76 113 119 43 110 114 103 104 94 108 96 44 48 54 44 128 110 114 103 104 64 123 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_3_717236857();
var span = document.getElementById('enkoder_3_717236857');
span.parentNode.removeChild(span);
/* --> */
</script>.
<p>Download the release <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-96314.zip">here</a>, or go to the <a href="http://www.dinosaurtech.com/utilities/">utilities page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2009/9-6-3-14-release-bug-fix-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Next Question</title>
		<link>http://www.dinosaurtech.com/2009/next-question/</link>
		<comments>http://www.dinosaurtech.com/2009/next-question/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 23:23:15 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2009/next-question/</guid>
		<description><![CDATA[As I receive common emails, I will continue to post the question / answer. The next question is regarding initially connecting to TWS via an API: I&#8217;m new to programming and I just don&#8217;t get your TestApp running. How exactly do I link to TWS ? Do I need to add any references or components [...]]]></description>
			<content:encoded><![CDATA[<p>As I receive common emails, I will continue to post the question / answer. The next question is regarding initially connecting to TWS via an API:</p>
<ul>
<li>I&#8217;m new to programming and I just don&#8217;t get your TestApp running. How exactly do I link to TWS ? Do I need to add any references or components from the IB API software? </li>
</ul>
<p>In TWS you will need to goto Configure -&gt; API -&gt; Enable ActiveX and Socket Clients.<br />Next select Configure -&gt; API -&gt; All API Settings<br />In the window that appears, under Trusted IP Addresses, select Create, and add &#8220;127.0.0.1&#8243; (The local machine) to the Trusted IP Addresses. Select OK, and you are good to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2009/next-question/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>9.6.3.13 Release Corresponds to 9.63 Ib Api</title>
		<link>http://www.dinosaurtech.com/2009/9-6-3-13-release-corresponds-to-9-63-ib-api/</link>
		<comments>http://www.dinosaurtech.com/2009/9-6-3-13-release-corresponds-to-9-63-ib-api/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 06:06:02 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2009/9-6-3-13-release-corresponds-to-9-63-ib-api/</guid>
		<description><![CDATA[It sure has been a long time coming, and many of these fixes have been available in subversion for quite some time, but the 9.6.3.13 release is complete. It has the following changes: 9.6.3.13 New Release &#8211; 7/20/09 Update to Ib&#8217;s 9.63 api Add shortable tickType Fixes to ReadDecimal Fix 1 second barsize enum. Fixed [...]]]></description>
			<content:encoded><![CDATA[<p>It sure has been a long time coming, and many of these fixes have been available in subversion for quite some time, but the 9.6.3.13 release is complete. It has the following changes:</p>
<ul>
<li>9.6.3.13 New Release &#8211; 7/20/09</li>
<ul>
<li>Update to Ib&#8217;s 9.63 api</li>
<li>Add shortable tickType</li>
<li>Fixes to ReadDecimal</li>
<li>Fix 1 second barsize enum.</li>
<li>Fixed Bug with IBClient.ReadDecimal()</li>
<li>Fixed bug in ExecutionFilter</li>
</ul>
</ul>
<p>I also reorganized subversion to relink all of the files&#8217; history, I had accidentally broken things when I first made the archive public.</p>
<p>This release has not gone through quite the normal scrutiny of my prior releases, but it was so overdue, I thought I&#8217;d get it out there, and if you have any problems, <span id="enkoder_5_76445668">email hidden; JavaScript is required</span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_5_76445668() {
var kode="kode=\"110 114 103 104 64 37 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 54 58 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 58 35 56 56 35 54 56 35 56 55 35 56 59 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 54 35 56 52 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 54 35 56 54 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 56 56 35 56 55 35 54 56 35 56 58 35 56 55 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 57 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 52 35 56 57 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 58 35 56 56 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 58 35 56 53 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 58 35 56 59 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 54 35 56 52 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 58 35 56 57 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 55 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 57 35 56 52 35 54 56 35 56 58 35 56 55 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 56 58 35 56 57 35 54 56 35 56 58 35 56 54 35 54 56 35 56 56 35 56 56 35 54 56 35 56 55 35 56 59 35 54 56 35 56 58 35 56 54 35 54 56 35 56 53 35 56 54 35 56 55 35 54 56 35 56 58 35 56 56 35 54 56 35 56 56 35 56 54 35 54 56 35 56 56 35 56 54 35 54 56 35 56 58 35 56 54 35 54 56 35 56 53 35 56 52 35 56 57 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 56 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 58 35 56 56 35 54 56 35 56 57 35 56 53 35 54 56 35 56 58 35 56 54 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 58 35 56 55 35 54 56 35 56 56 35 56 55 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 58 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 56 35 56 60 35 54 56 35 56 57 35 56 54 35 54 56 35 56 56 35 56 56 35 54 56 35 56 58 35 56 54 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 56 35 56 58 35 54 56 35 56 58 35 56 56 35 54 56 35 56 57 35 56 55 35 54 56 35 56 56 35 56 56 35 54 56 35 56 53 35 56 54 35 56 58 35 54 56 35 56 53 35 56 54 35 56 55 35 54 56 35 56 56 35 56 58 35 54 56 35 56 58 35 56 56 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 58 35 56 60 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 56 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 56 35 56 58 35 54 56 35 56 57 35 56 54 35 54 56 35 56 56 35 56 56 35 54 56 35 56 56 35 56 58 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 58 35 56 60 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 56 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 56 35 56 56 35 54 56 35 56 53 35 56 54 35 56 60 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 58 35 56 56 35 54 56 35 56 53 35 56 54 35 56 55 35 54 56 35 56 56 35 56 58 35 54 56 35 56 56 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 58 35 56 55 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 58 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 58 35 56 58 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 58 35 56 60 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 56 35 56 55 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 58 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 56 35 56 60 35 54 56 35 56 57 35 56 54 35 54 56 35 56 56 35 56 56 35 54 56 35 56 58 35 56 53 35 54 56 35 56 56 35 56 54 35 54 56 35 56 56 35 56 54 35 54 56 35 56 56 35 56 56 35 54 56 35 56 58 35 56 54 35 54 58 35 57 53 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 59 35 52 52 56 35 52 52 52 35 52 51 59 35 52 52 60 35 55 54 35 55 53 35 54 56 35 55 53 35 55 55 35 57 53 35 52 53 54 35 57 55 35 55 53 35 55 53 35 57 53 35 52 51 56 35 52 52 55 35 52 52 58 35 55 54 35 52 51 59 35 57 55 35 56 52 35 57 53 35 52 51 59 35 57 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 57 53 35 52 51 59 35 55 57 35 55 57 35 55 55 35 52 53 57 35 52 53 54 35 55 57 35 57 55 35 59 57 35 52 52 60 35 52 52 58 35 52 51 59 35 52 52 54 35 52 51 57 35 55 60 35 52 51 56 35 52 52 58 35 52 52 55 35 52 52 53 35 58 51 35 52 51 58 35 52 51 51 35 52 52 58 35 58 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 54 35 52 52 56 35 52 51 51 35 52 52 58 35 52 52 59 35 52 51 55 35 58 57 35 52 52 54 35 52 52 60 35 55 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 60 55 35 52 51 59 35 60 57 35 55 55 35 55 59 35 56 55 35 55 55 35 52 53 59 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 53 54 35 57 53 37 62 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 43 42 35 42 44 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 110 114 103 104 49 111 104 113 106 119 107 62 108 46 46 44 126 123 46 64 86 119 117 108 113 106 49 105 117 114 112 70 107 100 117 70 114 103 104 43 115 100 117 118 104 76 113 119 43 110 114 103 104 94 108 96 44 48 54 44 128 110 114 103 104 64 123 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_5_76445668();
var span = document.getElementById('enkoder_5_76445668');
span.parentNode.removeChild(span);
/* --> */
</script>. </p>
<p>Download the release <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-96313.zip">here</a>, or go to the <a href="http://www.dinosaurtech.com/utilities/">utilities page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2009/9-6-3-13-release-corresponds-to-9-63-ib-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Common Questions</title>
		<link>http://www.dinosaurtech.com/2009/common-questions/</link>
		<comments>http://www.dinosaurtech.com/2009/common-questions/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 15:25:53 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2009/common-questions/</guid>
		<description><![CDATA[I received an email today with questions that I have been asked many times, so I thought I&#8217;d post the questions and answers here. If you stop maintaining your wrapper to the latest versions and the IB API changes to newer versions, how long will your existing C# API wrapper keep working? Ib goes to [...]]]></description>
			<content:encoded><![CDATA[<p>I received an email today with questions that I have been asked many times, so I thought I&#8217;d post the questions and answers here.
<ul>
<li>If you stop maintaining your wrapper to the latest versions and the IB API changes to newer versions, how long will your existing C# API wrapper keep working?</li>
</ul>
<p>Ib goes to great lengths to maintain backwards compatibility with old apis. If you look at their api code, it is clearly version controlled by the method, and I wouldn&#8217;t be surprised if code from many years ago still works.</p>
<p>As an example, I have been running an API app I wrote in Jan / Feb of 2008 every day since without updating the api once and have had no problems.</p>
<ul>
<li>If you stop maintaining your wrapper to the latest versions, would you possibly update it for a small fee? (I am not rich, just trying my hand to get rich!)&nbsp; I would hate to lose all the effort into coding this ATS.</li>
</ul>
<p>Always a possibility, but it is my intent to keep updating it for free. I&#8217;ve become somewhat less reactive to Ib version updates because each update adds relatively obscure features, and since compatibility is always maintained, it is not super urgent. That being said, I will get myself caught up here shortly, and continue to update to the latest version.</p>
<ul>
<li>Has your wrapper matured over time and currently working well?&nbsp; No inherent hard to debug problems?&nbsp; (Sorry for my asking but my Delphi friend has many of these!)&nbsp; I noticed your excellent forum for help.</li>
</ul>
<p>Good question, it certainly has matured. Occasionally some parsing bugs have been pointed out, specifically with my use of decimals, but I address those quickly with updates to subversion, and changes get rolled into the next release.</p>
<p>&nbsp;</p>
<p>Let me know if you have any other general questions and I will create an FAQ page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2009/common-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion Source Access</title>
		<link>http://www.dinosaurtech.com/2009/subversion-source-access/</link>
		<comments>http://www.dinosaurtech.com/2009/subversion-source-access/#comments</comments>
		<pubDate>Tue, 19 May 2009 16:26:10 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2009/subversion-source-access/</guid>
		<description><![CDATA[I have finally set up a publicly accessible subversion server, and have reorganized my Interactive Brokers Api folders to suit a single repository. Check out the new page for instructions on how to access it. This will also make it easier for users to generate patches against the Api, and if anyone is interested in [...]]]></description>
			<content:encoded><![CDATA[<p>I have finally set up a publicly accessible subversion server, and have reorganized my Interactive Brokers Api folders to suit a single repository. Check out the <a href="http://www.dinosaurtech.com/utilities/">new page</a> for instructions on how to access it.</p>
<p>This will also make it easier for users to generate patches against the Api, and if anyone is interested in becoming a contributor, I am certainly open to it. Drop me a <span id="enkoder_7_1353007221">email hidden; JavaScript is required</span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_7_1353007221() {
var kode="kode=\"110 114 103 104 64 37 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 54 58 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 58 35 56 56 35 54 56 35 56 55 35 56 59 35 54 56 35 56 58 35 56 54 35 54 56 35 56 56 35 56 56 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 56 58 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 57 35 56 52 35 54 56 35 56 58 35 56 55 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 58 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 54 35 56 52 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 58 35 56 59 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 58 35 56 53 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 58 35 56 56 35 54 56 35 56 53 35 56 52 35 56 57 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 59 35 54 56 35 56 55 35 56 57 35 54 56 35 56 53 35 56 52 35 56 52 35 54 56 35 56 58 35 56 55 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 57 51 35 56 57 35 54 56 35 56 55 35 56 59 35 54 56 35 56 56 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 54 35 56 54 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 54 35 54 56 35 56 53 35 56 54 35 56 52 35 54 56 35 56 53 35 56 52 35 56 54 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 55 35 56 59 35 54 56 35 56 58 35 56 54 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 58 35 56 56 35 54 56 35 56 53 35 56 53 35 56 52 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 55 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 53 35 56 57 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 57 51 35 54 56 35 56 56 35 56 55 35 54 56 35 56 56 35 56 54 35 54 56 35 56 56 35 56 54 35 54 56 35 56 56 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 54 35 56 53 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 53 35 56 53 35 56 59 35 54 56 35 56 53 35 56 53 35 56 60 35 54 56 35 56 53 35 56 52 35 56 56 35 54 56 35 56 56 35 56 55 35 54 56 35 56 56 35 56 56 35 54 56 35 56 56 35 57 51 35 54 56 35 56 53 35 56 52 35 57 51 35 54 56 35 56 53 35 56 53 35 56 56 35 54 56 35 56 53 35 56 52 35 56 60 35 54 56 35 56 53 35 56 53 35 56 55 35 54 56 35 56 56 35 56 55 35 54 56 35 56 56 35 56 54 35 54 56 35 56 56 35 56 54 35 54 56 35 56 56 35 56 56 35 54 56 35 56 58 35 56 54 35 54 58 35 57 53 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 59 35 52 52 56 35 52 52 52 35 52 51 59 35 52 52 60 35 55 54 35 55 53 35 54 56 35 55 53 35 55 55 35 57 53 35 52 53 54 35 57 55 35 55 53 35 55 53 35 57 53 35 52 51 56 35 52 52 55 35 52 52 58 35 55 54 35 52 51 59 35 57 55 35 56 52 35 57 53 35 52 51 59 35 57 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 57 53 35 52 51 59 35 55 57 35 55 57 35 55 55 35 52 53 57 35 52 53 54 35 55 57 35 57 55 35 59 57 35 52 52 60 35 52 52 58 35 52 51 59 35 52 52 54 35 52 51 57 35 55 60 35 52 51 56 35 52 52 58 35 52 52 55 35 52 52 53 35 58 51 35 52 51 58 35 52 51 51 35 52 52 58 35 58 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 54 35 52 52 56 35 52 51 51 35 52 52 58 35 52 52 59 35 52 51 55 35 58 57 35 52 52 54 35 52 52 60 35 55 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 60 55 35 52 51 59 35 60 57 35 55 55 35 55 59 35 56 55 35 55 55 35 52 53 59 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 53 54 35 57 53 37 62 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 43 42 35 42 44 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 110 114 103 104 49 111 104 113 106 119 107 62 108 46 46 44 126 123 46 64 86 119 117 108 113 106 49 105 117 114 112 70 107 100 117 70 114 103 104 43 115 100 117 118 104 76 113 119 43 110 114 103 104 94 108 96 44 48 54 44 128 110 114 103 104 64 123 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_7_1353007221();
var span = document.getElementById('enkoder_7_1353007221');
span.parentNode.removeChild(span);
/* --> */
</script>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2009/subversion-source-access/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>VS 2005 Support</title>
		<link>http://www.dinosaurtech.com/2009/vs-2005-support/</link>
		<comments>http://www.dinosaurtech.com/2009/vs-2005-support/#comments</comments>
		<pubDate>Tue, 19 May 2009 14:51:22 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2009/vs-2005-support/</guid>
		<description><![CDATA[&#160; I just downloaded the latest VS2010 Beta 1 to play with, and am contemplating making breaking changes to the library that use C# 3.5 features. How important is VS 2005 support to people? Is everyone running VS2008 or later? Or do I need to maintain the 2005/C# 2.0 backwards compatibility? Let me know in [...]]]></description>
			<content:encoded><![CDATA[<p>&nbsp;<a href="http://www.dinosaurtech.com/wp-content/uploads/2009/05/vs2005.jpg"><img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="VS2005" src="http://www.dinosaurtech.com/wp-content/uploads/2009/05/vs2005-thumb.jpg" width="299" height="76"></a> </p>
<p>I just downloaded the latest VS2010 Beta 1 to play with, and am contemplating making breaking changes to the library that use C# 3.5 features. How important is VS 2005 support to people? Is everyone running VS2008 or later? Or do I need to maintain the 2005/C# 2.0 backwards compatibility?</p>
<p>Let me know in the comments, I will be steadily making changes here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2009/vs-2005-support/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>9.6.0.11 Release</title>
		<link>http://www.dinosaurtech.com/2008/96011-release/</link>
		<comments>http://www.dinosaurtech.com/2008/96011-release/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 01:43:04 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2008/96011-release/</guid>
		<description><![CDATA[I updated the API to incorporate the new features of the 9.6 API from IB. Primarily this is the call backs for various list functions. I also made a large update to the event handler framework to make the calls thread safe now. Please download it directly here or from the utilities page here.]]></description>
			<content:encoded><![CDATA[<p>I updated the API to incorporate the new features of the 9.6 API from IB. Primarily this is the call backs for various list functions.</p>
<p>I also made a large update to the event handler framework to make the calls thread safe now.</p>
<p>Please download it directly <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9611.zip">here</a> or from the utilities page <a href="http://www.dinosaurtech.com/utilities/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2008/96011-release/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>9.5.0.10 New Release</title>
		<link>http://www.dinosaurtech.com/2008/95010-new-release/</link>
		<comments>http://www.dinosaurtech.com/2008/95010-new-release/#comments</comments>
		<pubDate>Mon, 05 May 2008 04:36:59 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2008/95010-new-release/</guid>
		<description><![CDATA[So the new TWS brings a new user interface, and a new beta API. Since the last release I have rolled in several bug fixes reported on the forums, and I have converted all prices over to decimals from doubles. I&#8217;ve never understood why IB&#8217;s version uses doubles, but finally we should be rid of [...]]]></description>
			<content:encoded><![CDATA[<p>So the new TWS brings a new user interface, and a new beta API. Since the last release I have rolled in several bug fixes reported on the forums, and I have converted all prices over to decimals from doubles. I&#8217;ve never understood why IB&#8217;s version uses doubles, but finally we should be rid of rounding errors on prices.</p>
<p>In any case, this release has incorporated all of the changes with IB&#8217;s 9.51 release, the decimal conversion, and a series of bug fixes.</p>
<p>As always, goto the utilities page to download <a href="http://www.dinosaurtech.com/utilities/">here</a>, or download directly from <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9510.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2008/95010-new-release/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>9.4.0.9 Bugfix and Cleanup Release</title>
		<link>http://www.dinosaurtech.com/2008/9409-bugfix-and-cleanup-release/</link>
		<comments>http://www.dinosaurtech.com/2008/9409-bugfix-and-cleanup-release/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 04:11:52 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2008/9409-bugfix-and-cleanup-release/</guid>
		<description><![CDATA[This release includes some bugfixes and some cleanup. I had realized that some residual console code was left in the response to the historical request function, and that the java framework from IB&#8217;s method of calling the OnHistResponse method with null parameters to terminate the historical response was just plain wrong. I added two properties [...]]]></description>
			<content:encoded><![CDATA[<p>This release includes some bugfixes and some cleanup. I had realized that some residual console code was left in the response to the historical request function, and that the java framework from IB&#8217;s method of calling the OnHistResponse method with null parameters to terminate the historical response was just plain wrong. I added two properties to the HistoricalResponse Event Arguments that allow you to determine where you are in the response, and you know you are done when RecordNumber == RecordCount-1. Additionally I cleaned up the RequestExecutions function with some issues relating to the filter, and made all of the eventarguments serializable. Below are the full release notes:</p>
<p>9.4.0.9 Bug Fix and Clean up &#8211; 2/10/09</p>
<ul>
<li>Made all EventArgs Serializable as well as the new enumeration FATypes.</li>
<li>Fixed bug in OrderType.MarketOnClose &#8211; changed Description from &quot;MKTCLS&quot; to &quot;MOC&quot;</li>
<li>Fixed RequestExecution method to allow you to pass a null or empty filter to get all executions.</li>
<li>Changed HistoricalRequest Response. Added two parameters to the event args that lets the user know how far the download is. Also no longer calls function after download completed with null entries, since you can determine that the call is complete by the Record Number / Record Count properties.</li>
<li>Made EnumDescConverter Static, as all methods were static.</li>
</ul>
<p>As usual, download it from the utilities page <a href="http://www.dinosaurtech.com/utilities/">here</a>, or directly <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9409.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2008/9409-bugfix-and-cleanup-release/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>9.4.0.8 Cleanup Release</title>
		<link>http://www.dinosaurtech.com/2008/9408-cleanup-release/</link>
		<comments>http://www.dinosaurtech.com/2008/9408-cleanup-release/#comments</comments>
		<pubDate>Thu, 31 Jan 2008 16:14:10 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2008/9408-cleanup-release/</guid>
		<description><![CDATA[Hello everyone, these last releases have been pretty rapid fire. This release does not change any functionality, and is strictly the result of me running FxCop over the code again. I now use Visual Studio 2008 and their Code Analysis Engine is an integrated form of FxCop. In any case it caught a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone, these last releases have been pretty rapid fire. This release does not change any functionality, and is strictly the result of me running FxCop over the code again. I now use Visual Studio 2008 and their Code Analysis Engine is an integrated form of FxCop. In any case it caught a lot of embarrassing spelling and abbreviation mistakes amongst other things. The most common changes are listed below.</p>
<p>Please note this release has breaking changes, not to functionality, but you will have to update your events and function calls to the correctly spelled equivalents.</p>
<ul>
<li>9.4.0.8 Code Clean up &#8211; 1/31/09
<ul>
<li>Ran Vs2008 Code Analysis Wizard / FxCop and implemented cleanup
<ul>
<li>Numerous Spelling Changes
<ul>
<li>All Mkt references went to Market</li>
<li>All Req references went to Request etc.</li>
<li>All Lmt references went to Limit</li>
<li>All Indice references went to index</li>
</ul>
</li>
<li>Added a lot of CultureInfo related fixes, making sure to provide invarient parsing</li>
</ul>
</li>
<li>Fixed VB Client, used old contracts, and changed contract references to equity/future</li>
</ul>
</li>
</ul>
<p>As always, please go to the utility page <a href="http://www.dinosaurtech.com/utilities/">here</a> to get the latest release, or directly from <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9408.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2008/9408-cleanup-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>9.4.0.7 Bug Fix Release</title>
		<link>http://www.dinosaurtech.com/2008/9407-bug-fix-release/</link>
		<comments>http://www.dinosaurtech.com/2008/9407-bug-fix-release/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 20:28:35 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2008/9407-bug-fix-release/</guid>
		<description><![CDATA[So we have quite the community of bug reporting users, and I have created a new release which closes all outstanding issues. This is still against the IB 9.40 release, for the first time in about a year IB actually moved the latest beta release to stable, without a new API release. The following is [...]]]></description>
			<content:encoded><![CDATA[<p>So we have quite the community of bug reporting users, and I have created a new release which closes all outstanding issues. This is still against the IB 9.40 release, for the first time in about a year IB actually moved the latest beta release to stable, without a new API release.</p>
<p>The following is the change log from the release notes</p>
<ul>
<li>9.4.0.7 Bug Fix Release &#8211; 1/26/08
<ul>
<li>Changed FAMethod to Enumeration</li>
<li>Changed OrderState.Status to enumeration</li>
<li>Fixed several data parsing problems related to empty strings</li>
<li>Added Visual Studio 2008 solution, all files are still C# 2.0 compliant.</li>
</ul>
</li>
</ul>
<p>As I mentioned above, I now develop in Visual Studio 2008 against .net 3.5, but have been careful to keep this library C# 2.0 compliant. Let me know what platform you are using, if everyone has switched to .net 3.5, I may consider using new feature in future releases.</p>
<p>Without further ado, goto the <a href="http://www.dinosaurtech.com/utilities/">utilities page</a> to download the latest version or download directly from <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9407.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2008/9407-bug-fix-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>9.4.0.6 IB API Release</title>
		<link>http://www.dinosaurtech.com/2007/9406-ib-api-release/</link>
		<comments>http://www.dinosaurtech.com/2007/9406-ib-api-release/#comments</comments>
		<pubDate>Mon, 10 Dec 2007 01:45:40 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/9406-ib-api-release/</guid>
		<description><![CDATA[Hello Everyone, it sure has been some time since I&#8217;ve posted. I have been actively developing various ATS strategies, and have revised the C# Interactive Brokers API library to support the 9.40 beta currently out from IB. I have also fixed all known bugs as reported via email or through the forums. The following is [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Everyone, it sure has been some time since I&#8217;ve posted. I have been actively developing various ATS strategies, and have revised the C# Interactive Brokers API library to support the 9.40 beta currently out from IB. I have also fixed all known bugs as reported via email or through the forums. The following is the change log from the release notes.</p>
<ul>
<li>9.4.0.6 API and Bug Fix Release &#8211; 12/9/07
<ul>
<li>Updated to support 9.40 Interactive Brokers API Release
<ul>
<li>What-If Order Support</li>
<li>Commission Data</li>
<li>Contract/Contract Details Refactored</li>
</ul>
</li>
<li>Fixed Historical Request 1 day limitation</li>
<li>Changed TickSizeEvent Args to use TickType instead of TickerType</li>
<li>All Enums / Container classes are now marked serializable</li>
<li>Fixed bug on Stop Limit Orders &quot;STPLMT&quot; -&gt; &quot;STP LMT&quot;</li>
</ul>
</li>
</ul>
<p>As always please post on the <a href="http://www.dinosaurtech.com/forums/">forums</a> if you find any issues, or <span id="enkoder_9_1033751065">email hidden; JavaScript is required</span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_9_1033751065() {
var kode="kode=\"110 114 103 104 64 37 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 54 58 35 57 53 35 55 55 35 60 56 35 55 53 35 60 56 35 55 53 35 57 52 35 55 55 35 56 53 35 55 59 35 52 51 58 35 52 52 60 35 52 51 57 35 52 52 54 35 52 51 55 35 52 52 52 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 55 54 35 52 52 60 35 57 59 35 52 52 58 35 52 51 51 35 52 51 58 35 52 51 53 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 57 57 35 52 51 58 35 52 52 60 35 52 51 57 35 52 52 54 35 52 51 55 35 52 52 52 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 57 54 35 52 51 59 35 55 54 35 55 57 35 52 53 54 35 57 55 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 52 53 59 35 55 55 35 52 51 59 35 55 54 35 52 52 60 35 57 59 35 52 52 58 35 52 51 51 35 52 51 58 35 52 51 53 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 55 57 35 55 55 35 56 53 35 55 57 35 52 51 59 35 55 54 35 52 52 60 35 57 59 35 52 52 58 35 52 51 51 35 52 51 58 35 52 51 53 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 57 55 35 55 57 35 52 53 54 35 52 53 57 35 55 55 35 56 54 35 57 55 35 55 57 35 52 51 59 35 57 53 35 55 55 35 56 53 35 55 59 35 52 51 58 35 52 52 60 35 52 51 57 35 52 52 54 35 52 51 55 35 52 52 52 35 55 60 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 55 54 35 57 54 35 52 51 59 35 57 53 35 56 52 35 57 55 35 52 51 59 35 55 54 35 52 52 58 35 52 52 55 35 52 51 56 35 57 53 35 60 56 35 55 53 35 60 56 35 55 53 35 57 55 35 52 53 54 35 57 53 35 60 56 35 54 58 35 57 53 35 60 56 35 55 53 35 60 56 35 60 56 35 55 55 35 57 52 35 60 56 35 55 53 35 60 56 35 60 56 35 56 53 35 55 55 35 52 51 58 35 55 59 35 52 51 57 35 52 52 60 35 52 51 55 35 52 52 54 35 55 60 35 52 52 52 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 52 52 60 35 55 54 35 52 52 58 35 57 59 35 52 51 58 35 52 51 51 35 55 60 35 52 51 53 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 52 51 58 35 57 57 35 52 51 57 35 52 52 60 35 52 51 55 35 52 52 54 35 55 60 35 52 52 52 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 52 51 59 35 57 54 35 55 57 35 55 54 35 57 55 35 52 53 54 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 55 55 35 52 53 59 35 55 54 35 52 51 59 35 57 59 35 52 52 60 35 52 51 51 35 52 52 58 35 52 51 53 35 52 51 58 35 52 51 55 35 55 60 35 52 52 55 35 52 51 54 35 55 57 35 52 52 51 35 56 53 35 55 55 35 52 51 59 35 55 57 35 52 52 60 35 55 54 35 52 52 58 35 57 59 35 52 51 58 35 52 51 51 35 55 60 35 52 51 53 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 55 57 35 57 55 35 52 53 57 35 52 53 54 35 56 54 35 55 55 35 55 57 35 57 55 35 57 53 35 52 51 59 35 56 53 35 55 55 35 52 51 58 35 55 59 35 52 51 57 35 52 52 60 35 52 51 55 35 52 52 54 35 55 60 35 52 52 52 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 57 54 35 55 54 35 57 53 35 52 51 59 35 57 55 35 56 52 35 55 54 35 52 51 59 35 52 52 55 35 52 52 58 35 57 53 35 52 51 56 35 60 56 35 55 53 35 60 56 35 60 56 35 60 56 35 55 53 35 60 56 35 60 56 35 52 53 54 35 57 55 35 60 56 35 54 58 35 60 56 35 60 56 35 57 53 35 57 53 35 55 55 35 60 56 35 54 58 35 60 56 35 60 56 35 57 56 35 52 51 51 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 56 51 35 57 54 35 60 56 35 60 56 35 60 56 35 60 56 35 52 51 55 35 54 56 35 60 56 35 60 56 35 60 56 35 60 56 35 52 51 59 35 52 52 53 35 52 52 53 35 52 52 52 35 57 56 35 52 51 51 35 60 56 35 54 58 35 60 56 35 60 56 35 52 51 55 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 52 52 53 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 52 52 55 35 52 51 53 35 55 60 35 52 51 58 35 52 51 53 35 52 51 55 35 52 52 60 35 52 52 58 35 52 53 51 35 52 51 51 35 52 52 59 35 52 52 55 35 52 52 54 35 52 51 59 35 52 51 54 35 57 58 35 52 52 52 35 52 52 58 35 52 51 51 35 52 52 51 35 57 52 35 52 52 55 35 52 52 60 35 52 52 52 35 52 51 59 35 52 51 51 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 54 58 35 60 56 35 60 56 35 57 55 35 52 52 53 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 52 51 56 35 52 51 55 35 52 52 58 35 52 51 58 35 54 56 35 52 51 51 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 55 54 35 57 54 35 60 56 35 60 56 35 60 56 35 60 56 35 60 56 35 54 58 35 60 56 35 60 56 35 52 51 55 35 52 52 60 35 52 51 59 35 52 52 58 35 52 53 53 35 55 60 35 52 52 60 35 52 52 54 35 52 51 55 35 52 52 53 35 52 53 51 35 52 51 53 35 52 52 55 35 52 51 54 35 57 55 35 60 56 35 54 58 35 60 56 35 60 56 35 52 51 54 35 52 51 55 35 52 52 51 35 52 52 55 35 60 56 35 54 58 35 57 55 35 52 51 55 35 52 51 54 35 52 52 55 35 52 52 51 35 54 58 35 57 53 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 59 35 52 52 56 35 52 52 52 35 52 51 59 35 52 52 60 35 55 54 35 55 53 35 55 53 35 55 55 35 55 60 35 52 52 58 35 52 51 55 35 52 53 52 35 52 51 55 35 52 52 58 35 52 52 59 35 52 51 55 35 55 54 35 55 55 35 55 60 35 52 51 60 35 52 52 55 35 52 51 59 35 52 52 54 35 55 54 35 55 53 35 55 53 35 55 55 35 57 53 37 62 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 43 42 35 42 44 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 110 114 103 104 49 111 104 113 106 119 107 62 108 46 46 44 126 123 46 64 86 119 117 108 113 106 49 105 117 114 112 70 107 100 117 70 114 103 104 43 115 100 117 118 104 76 113 119 43 110 114 103 104 94 108 96 44 48 54 44 128 110 114 103 104 64 123 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_9_1033751065();
var span = document.getElementById('enkoder_9_1033751065');
span.parentNode.removeChild(span);
/* --> */
</script> with any questions.</p>
<p>Please precede to download from the <a href="http://www.dinosaurtech.com/utilities/">utilities page</a>, or <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9406.zip">directly here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/9406-ib-api-release/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Average Directional Movement Index ADX Formula in C#</title>
		<link>http://www.dinosaurtech.com/2007/average-directional-movement-index-adx-formula-in-c-2/</link>
		<comments>http://www.dinosaurtech.com/2007/average-directional-movement-index-adx-formula-in-c-2/#comments</comments>
		<pubDate>Fri, 14 Sep 2007 13:15:31 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/average-directional-movement-index-adx-formula-in-c-2/</guid>
		<description><![CDATA[So in my continuing series of C# implementations of common indicators, I spent all of yesterday working out the ADX. The ADX was originally developed by J. Welles Wilder and published in his book New Concepts in Technical Trading Systems, June 1978. Various sites report implementations, but always define it in terms of indicators which [...]]]></description>
			<content:encoded><![CDATA[<p>So in my continuing series of C# implementations of common indicators, I spent all of yesterday working out the ADX. The ADX was originally developed by J. Welles Wilder and published in his book <a href="http://www.amazon.com/gp/product/0894590278/103-1276242-7873433?ie=UTF8&amp;tag=dinostechnand-20&amp;linkCode=xm2&amp;camp=1789&amp;creativeASIN=0894590278">New Concepts in Technical Trading Systems</a>, June 1978.
</p>
<p>Various sites report implementations, but always define it in terms of indicators which have varying definitions. Namely FxStreet defines the general concept <a href="http://transcripts.fxstreet.com/2005/10/date_october_4_.html">here</a>, but only in terms of DI+/-, TR and DM+/-, each of which has varying definitions. ForexReal defines ADX <a href="http://www.forexrealm.com/technical-analysis/technical-indicators/average-directional-index.html">here</a>, but uses a completely different concept of TR. Stockwiz has a good overview of all of the variables used (at least they define all of their variables) <a href="http://www.stockwiz.com/formula33.html">here</a>. I will be defining the ADX all the way down to price action (what you need when you are coding this…) as best I can to the original definition by J Welles Wilder.
</p>
<p>Lets start by defining the Directional Move indicators
</p>
<h2>Directional Move Indicator<br />
</h2>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire1.gif" alt=""/></span>= the Positive Direction Movement Indicator
</p>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire2.gif" alt=""/></span> = the Negative Direction Movement Indicator
</p>
<p>We use two helper variables to track the delta extreme price changes from yesterday
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire3.gif" alt=""/>
	</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire4.gif" alt=""/>
	</p>
<p>If today&#8217;s range is entirely within yesterday&#8217;s range, or the range is the same, then there has been no directional movement.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire5.gif" alt=""/>
	</p>
<p>If the range moved up, then there has been a positive directional move.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire6.gif" alt=""/>
	</p>
<p>If the range moved down, then there has been a negative directional move.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire7.gif" alt=""/>
	</p>
<h2>Average Directional Move Indicator<br />
</h2>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire8.gif" alt=""/></span> = the Average Positive Direction Movement Indicator for N periods
</p>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire9.gif" alt=""/></span> = the Average Negative Direction Movement Indicator for N periods
</p>
<p>The Welles Wilder Average is used here to stay true to form, but this average introduces a lot of latency, so I will also implement an exponential moving average.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire10.gif" alt=""/>
	</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire11.gif" alt=""/>
	</p>
<p>Alternatively, the formula for the ADM with an exponential moving average is shown below.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire12.gif" alt=""/>
	</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire13.gif" alt=""/>
	</p>
<h2>True Range<br />
</h2>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire14.gif" alt=""/></span> is the true range for a given period. It is a measure of volatility and takes into account any overnight gap in the period&#8217;s price.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire15.gif" alt=""/>
	</p>
<h2>Average True Range<br />
</h2>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire16.gif" alt=""/></span> is the average true range for N periods.
</p>
<p>The Welles Wilder Average is used here again to stay true to form, but for my C# implementation I will be using the exponential moving average.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire17.gif" alt=""/>
	</p>
<p>Alternatively the ATR can be calculated with the exponential moving average as shown below.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire18.gif" alt=""/>
	</p>
<h2>Directional Index<br />
</h2>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire19.gif" alt=""/></span> is the average positive directional movement indicator normalized by the average true range.
</p>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire20.gif" alt=""/></span> is the average negative directional movement indicator normalized by the average true range.
</p>
<p>The directional index calculation is very straight forward and shown below.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire21.gif" alt=""/>
	</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire22.gif" alt=""/>
	</p>
<h2>Directional Movement Index<br />
</h2>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire23.gif" alt=""/></span> - the directional movement index is the difference of the directional indices over the sum directional indices.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire24.gif" alt=""/>
	</p>
<h2>Average Directional Movement Index<br />
</h2>
<p style="margin-left: 36pt"><span style="font-family:Symbol"></span><span style="font-family:Times New Roman; font-size:7pt">         <img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire25.gif" alt=""/></span> is the average directional movement calculated over N periods.
</p>
<p>Staying true to form again, the Welles Wilder Average is used below.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire26.gif" alt=""/>
	</p>
<p>Again, you can alternatively use the exponential moving average as shown below.
</p>
<p><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire27.gif" alt=""/>
	</p>
<h2>C# implementation<br />
</h2>
<p>So after the laborious research to determine exactly what the ADX is and should be (exponential vs Welles Wilder Average), here is the C# implementation of this indicator.
</p>
<p><span style="font-family:Courier New; font-size:10pt">    <span style="color:green">//The Average Directional Indicator</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">    <span style="color:blue">if</span>(barHistory[timePeriod].Count &gt; 1)</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">    {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:green">//Directional Movement Indicator</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">double</span> deltaHigh = cBar.High &#8211; barHistory[timePeriod][barHistory[timePeriod].Count &#8211; 2].High;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">double</span> deltaLow = barHistory[timePeriod][barHistory[timePeriod].Count &#8211; 2].Low &#8211; cBar.Low;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">if</span>((deltaHigh &lt; 0 &amp;&amp; deltaLow &lt; 0) || (deltaHigh == deltaLow))</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DmPlus = 0;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DmMinus = 0;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">else</span><br />
			<span style="color:blue">if</span>(deltaHigh &gt; deltaLow)</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DmPlus = deltaHigh;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DmMinus = 0;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">else</span><br />
			<span style="color:blue">if</span> (deltaHigh &lt; deltaLow)</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DmPlus = 0;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DmMinus = deltaLow;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p> <br />
 </p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:green">//Average Directional Movement Indicator</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">if</span>(barHistory[timePeriod].Count &lt;= 2)</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.AdmPlus = sig.DmPlus;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.AdmMinus = sig.DmMinus;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">else</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            <span style="color:blue">double</span> a = (<span style="color:blue">double</span>) 2/(<span style="color:blue">double</span>) (calc.DMIPeriod + 1);</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.AdmPlus = sig.DmPlus * a +</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">                symbolHistory[timePeriod][symbolHistory[timePeriod].Count-2].AdmPlus * (1-a);</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.AdmMinus = sig.DmMinus * a +</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">                symbolHistory[timePeriod][symbolHistory[timePeriod].Count &#8211; 2].AdmMinus * (1 &#8211; a);</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p> <br />
 </p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:green">//True Range Indicator</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        sig.TrueRange = <span style="color:#2b91af">Math</span>.Max(<span style="color:#2b91af">Math</span>.Abs(cBar.High &#8211; cBar.Low),</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">                                 <span style="color:#2b91af">Math</span>.Max(</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">                                     <span style="color:#2b91af">Math</span>.Abs(cBar.High &#8211; barHistory[timePeriod][barHistory[timePeriod].Count &#8211; 2].Close),</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">                                     <span style="color:#2b91af">Math</span>.Abs(barHistory[timePeriod][barHistory[timePeriod].Count &#8211; 2].Close &#8211; cBar.Low)));</span>
	</p>
<p> <br />
 </p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:green">//Average True Range Indicator</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">if</span>(barHistory[timePeriod].Count &lt;= 2)</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.AverageTrueRange = sig.TrueRange;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">else</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            <span style="color:blue">double</span> a = (<span style="color:blue">double</span>)2 / (<span style="color:blue">double</span>)(calc.ADXPeriod + 1);</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.AverageTrueRange = sig.TrueRange * a +</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">                symbolHistory[timePeriod][symbolHistory[timePeriod].Count &#8211; 2].AverageTrueRange * (1 &#8211; a);</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p> <br />
 </p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:green">//Directional index Indicator</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">if</span> (sig.TrueRange != 0)</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DiPlus = 100 * sig.AdmPlus/sig.TrueRange;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DiMinus = 100 * sig.AdmMinus/sig.TrueRange;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">else</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DiPlus = symbolHistory[timePeriod][symbolHistory[timePeriod].Count &#8211; 2].DiPlus;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.DiMinus = symbolHistory[timePeriod][symbolHistory[timePeriod].Count &#8211; 2].DiMinus;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p> <br />
 </p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:green">//Directional Movement Index Indicator</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">if</span> ((sig.DiPlus + sig.DiMinus) != 0)</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.Dx = <span style="color:#2b91af">Math</span>.Abs((sig.DiPlus &#8211; sig.DiMinus)) / (sig.DiPlus + sig.DiMinus) * 100;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">else</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.Dx = symbolHistory[timePeriod][symbolHistory[timePeriod].Count &#8211; 2].Dx;</span>
	</p>
<p> <br />
 </p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:green">//Average Directional Movement Indicator</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">if</span> (barHistory[timePeriod].Count &lt;= 2)</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.Adx = sig.Dx;</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        <span style="color:blue">else</span></span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        {</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            <span style="color:blue">double</span> a = (<span style="color:blue">double</span>)2 / (<span style="color:blue">double</span>)(calc.DMIPeriod + 1);</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">            sig.Adx = sig.Dx * a +</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">                symbolHistory[timePeriod][symbolHistory[timePeriod].Count &#8211; 2].Adx * (1 &#8211; a);</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">        }</span>
	</p>
<p><span style="font-family:Courier New; font-size:10pt">    }</span>
	</p>
<h2>Sample Data<br />
</h2>
<p>This is a sample data set consisting of the NYSE A/D 1-min bar data (&#8220;Close&#8221;) from August 28, 2007 and the 14 period ADX in red.
</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/09/091407-1315-averagedire28.gif" alt=""/>
	</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/average-directional-movement-index-adx-formula-in-c-2/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>AMA &#8211; Kaufman&#8217;s Adaptive Moving Average Formula in C#</title>
		<link>http://www.dinosaurtech.com/2007/ama-kaufmans-adaptive-moving-average-formula-in-c/</link>
		<comments>http://www.dinosaurtech.com/2007/ama-kaufmans-adaptive-moving-average-formula-in-c/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 15:10:56 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/ama-kaufmans-adaptive-moving-average-formula-in-c/</guid>
		<description><![CDATA[So I have not been posting as much lately, as I have been working on an Auto Trading System, and after spending far too much time researching signal formulas, I thought I would being to post the implementations of various signals I am using in my ATS. The Kaufman Adaptive Moving Average is a great [...]]]></description>
			<content:encoded><![CDATA[<p>So I have not been posting as much lately, as I have been working on an Auto Trading System, and after spending far too much time researching signal formulas, I thought I would being to post the implementations of various signals I am using in my ATS.</p>
<p>The Kaufman Adaptive Moving Average is a great low latency moving average filter. It technically has an infinite tail, but cleverly weights the amount of signal for each new bar based on the historical trendiness. If the past data has been choppy, then each new bar is weighed very low in the average, however if the past data has offered a strong direction (regardless of magnitude) then the average weighs new signal very heavily.</p>
<p>There aren&#8217;t too many sites discussing the actual formula &#8211; I based my implementation on the MetaStock code found <a href="http://trader.online.pl/MSZ/e-w-Kaufmans_Adaptive_Moving_Average_I.html">here</a>.</p>
<p>I started writing this post in windows Live Writer, and found that it does not keep Visual Studio&#8217;s source formatting, so I will try to post this from Word 2007. Word is much better at formatting, but terrible with images, while Live is great with images and managing the site, but terrible with formatting.</p>
<pre class="brush: csharp; title: ; notranslate">
//Direction is just present over previous price
double direction = cBar.Close - BarHistory[timePeriod][BarHistory[timePeriod].Count - cnt].Close;
double vol = 0;
//Vol is the sum of all differences in the past period
for (int ix = 1; ix &lt; cnt; ix++)
{
	vol += Math.Abs(BarHistory[timePeriod][BarHistory[timePeriod].Count - ix - 0].Close - BarHistory[timePeriod][BarHistory[timePeriod].Count - ix - 1].Close);
}

//if not enough data, or there has been no price change, then AMA is price.
if ((direction == 0 &amp;&amp; vol == 0) || cnt == 1)
{
	sig.Ama = cBar.Close;
}
else
{
	//Elastic ratio
	double ER = Math.Abs(direction/vol);
	double FastSC = 2/(calc.AMAFastEMA + 1);
	double SlowSC = 2/(calc.AMASlowEMA + 1);
	double SSC = ER*(FastSC - SlowSC) + SlowSC;

	//This is the magic scaling/smoothing constant.
	double conC = SSC*SSC;
	if (cnt == 2)
	{
		sig.Ama = BarHistory[timePeriod][0].Close + conC*(cBar.Close - BarHistory[timePeriod][1].Close);
	}
		else if (cnt &gt; 2)
	{
		sig.Ama = BarHistory[timePeriod][barHistory[timePeriod].Count - 2].Close +
		conC*(cBar.Close - BarHistory[timePeriod][barHistory[timePeriod].Count - 2].Close);
	}
}
</pre>
<p>This is easily my favorite indicator, and with a lot of tweaking can actually be made to have a lot lower latency. The key thing about noise removal, is that signals are noisiest when their trending derivative is lowest. This fact allows a lot of clever hacks to lower the latency of filters like the ATX. That being said, it is often important to use an indicator unscathed, as so much of the market uses it, its performance is a self fulfilling prophesy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/ama-kaufmans-adaptive-moving-average-formula-in-c/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Documentation Update</title>
		<link>http://www.dinosaurtech.com/2007/documentation-update/</link>
		<comments>http://www.dinosaurtech.com/2007/documentation-update/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 17:17:15 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/documentation-update/</guid>
		<description><![CDATA[So I have updated the documentation site to the latest 9.1.0.3 comments, and have added a new beta site. This site is updated with the documentation for the latest IB Beta, currently corresponding to version 9.3.0.1. I will try to keep these sites up to date as I release new versions of the API, and [...]]]></description>
			<content:encoded><![CDATA[<p>So I have updated the documentation site to the latest 9.1.0.3 comments, and have added a new <a href="http://ibhelpbeta.dinosaurtech.com/">beta site</a>. This site is updated with the documentation for the latest IB Beta, currently corresponding to version 9.3.0.1. I will try to keep these sites up to date as I release new versions of the API, and as always if you see any problems, please shoot me a message at <span id="enkoder_11_1706219695">email hidden; JavaScript is required</span><script type="text/javascript">
/* <!-- */
function hivelogic_enkoder_11_1706219695() {
var kode="kode=\"110 114 103 104 64 37 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 54 58 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 60 56 35 54 58 35 57 55 35 56 52 35 56 53 35 54 56 35 56 55 35 56 53 35 56 53 35 54 56 35 56 56 35 56 52 35 56 53 35 54 56 35 56 54 35 56 54 35 56 53 35 54 56 35 56 52 35 56 53 35 56 53 35 54 56 35 56 54 35 56 52 35 56 53 35 54 56 35 56 56 35 56 53 35 56 53 35 54 56 35 56 55 35 56 53 35 56 53 35 54 56 35 57 51 35 57 51 35 56 56 35 56 53 35 54 56 35 56 54 35 56 54 35 56 53 35 54 56 35 56 59 35 56 53 35 56 53 35 54 56 35 56 60 35 56 52 35 56 53 35 54 56 35 57 51 35 56 53 35 56 53 35 54 56 35 56 56 35 56 52 35 56 56 35 54 56 35 54 56 35 56 55 35 56 59 35 56 55 35 57 51 35 54 56 35 54 56 35 56 57 35 56 55 35 56 58 35 56 53 35 54 56 35 56 52 35 56 52 35 56 55 35 54 56 35 54 56 35 56 57 35 56 52 35 56 53 35 54 56 35 56 59 35 56 53 35 56 53 35 54 56 35 56 59 35 56 52 35 56 53 35 54 56 35 56 56 35 56 52 35 56 53 35 54 56 35 56 57 35 56 56 35 56 58 35 57 51 35 54 56 35 54 56 35 56 57 35 56 59 35 56 55 35 56 53 35 54 56 35 56 54 35 56 53 35 56 53 35 54 56 35 56 52 35 56 52 35 56 53 35 54 56 35 56 60 35 56 52 35 56 53 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 57 51 35 56 53 35 56 53 35 54 56 35 56 56 35 56 53 35 56 58 35 54 56 35 54 56 35 56 53 35 56 53 35 56 53 35 54 56 35 56 52 35 56 52 35 56 53 35 54 56 35 56 52 35 56 53 35 56 53 35 54 56 35 56 59 35 56 53 35 56 53 35 54 56 35 56 53 35 56 59 35 56 58 35 56 53 35 54 56 35 56 55 35 56 52 35 56 53 35 54 56 35 56 60 35 56 52 35 56 53 35 54 56 35 56 55 35 56 53 35 56 53 35 54 56 35 56 56 35 56 53 35 56 53 35 54 56 35 56 60 35 56 53 35 56 53 35 54 56 35 56 52 35 56 52 35 56 53 35 54 56 35 56 52 35 56 54 35 56 53 35 54 56 35 56 59 35 56 53 35 56 53 35 54 56 35 57 51 35 56 53 35 56 53 35 54 56 35 56 56 35 56 52 35 56 53 35 54 56 35 56 54 35 56 52 35 56 53 35 54 56 35 56 59 35 56 52 35 56 56 35 54 56 35 54 56 35 57 51 35 56 52 35 56 53 35 54 56 35 56 54 35 56 53 35 56 53 35 54 56 35 56 56 35 56 53 35 56 53 35 54 56 35 56 54 35 56 57 35 57 51 35 56 55 35 54 56 35 54 56 35 56 59 35 56 57 35 57 51 35 56 58 35 54 56 35 54 56 35 56 57 35 56 53 35 56 53 35 54 56 35 56 52 35 56 52 35 56 53 35 54 56 35 56 52 35 56 53 35 56 53 35 54 56 35 56 59 35 56 53 35 56 53 35 54 56 35 56 53 35 56 59 35 56 58 35 56 53 35 54 56 35 56 55 35 56 52 35 56 53 35 54 56 35 56 60 35 56 52 35 56 53 35 54 56 35 56 55 35 56 53 35 56 53 35 54 56 35 56 56 35 56 53 35 56 53 35 54 56 35 56 60 35 56 53 35 56 53 35 54 56 35 56 52 35 56 52 35 56 53 35 54 56 35 56 52 35 56 54 35 56 53 35 54 56 35 56 59 35 56 53 35 56 53 35 54 56 35 57 51 35 56 53 35 56 53 35 54 56 35 56 56 35 56 52 35 56 53 35 54 56 35 56 54 35 56 52 35 56 53 35 54 56 35 56 59 35 56 52 35 56 56 35 54 56 35 54 56 35 57 51 35 56 52 35 56 53 35 54 56 35 56 54 35 56 53 35 56 53 35 54 56 35 56 56 35 56 53 35 56 53 35 54 56 35 56 54 35 56 57 35 57 51 35 56 58 35 54 56 35 54 56 35 56 55 35 56 52 35 56 57 35 56 53 35 54 56 35 56 52 35 56 52 35 57 51 35 54 56 35 54 56 35 56 57 35 56 57 35 56 58 35 56 55 35 54 56 35 54 56 35 56 59 35 56 56 35 56 56 35 56 58 35 54 56 35 60 56 35 54 58 35 56 54 35 52 52 51 35 57 53 35 52 51 54 35 52 52 55 35 57 55 35 52 51 55 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 52 59 35 55 60 35 52 52 52 35 52 52 56 35 52 52 60 35 52 51 59 35 60 56 35 55 53 35 55 54 35 60 56 35 55 53 35 54 56 35 57 53 35 55 55 35 57 55 35 52 53 54 35 60 56 35 55 53 35 60 56 35 55 53 35 52 51 56 35 57 53 35 52 52 58 35 52 52 55 35 52 51 59 35 55 54 35 56 52 35 57 55 35 52 51 59 35 57 53 35 52 52 51 35 57 54 35 52 51 54 35 52 52 55 35 55 60 35 52 51 55 35 52 51 55 35 52 52 52 35 52 51 57 35 52 52 54 35 52 51 58 35 52 52 60 35 52 51 59 35 57 53 35 55 57 35 55 57 35 52 53 57 35 55 55 35 55 57 35 52 53 54 35 59 57 35 57 55 35 52 52 58 35 52 52 60 35 52 52 54 35 52 51 59 35 55 60 35 52 51 57 35 52 52 58 35 52 51 56 35 52 52 53 35 52 52 55 35 52 51 58 35 58 51 35 52 52 58 35 52 51 51 35 52 52 55 35 58 51 35 52 51 55 35 52 51 54 35 52 52 56 35 55 54 35 52 52 58 35 52 51 51 35 52 51 55 35 52 52 59 35 52 52 54 35 58 57 35 55 54 35 52 52 60 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 51 59 35 60 55 35 55 55 35 60 57 35 56 55 35 55 59 35 52 53 59 35 55 55 35 52 52 55 35 52 52 51 35 52 51 55 35 52 51 54 35 52 53 54 35 57 55 35 57 53 35 54 58 35 57 53 35 52 53 54 35 57 55 35 55 53 35 55 53 35 57 53 35 52 51 56 35 52 52 55 35 52 52 58 35 55 54 35 52 51 59 35 57 55 35 56 52 35 57 53 35 52 51 59 35 57 54 35 55 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 55 59 35 56 53 35 55 55 35 57 53 35 52 51 59 35 55 57 35 57 55 35 56 54 35 55 55 35 52 53 57 35 52 53 54 35 55 57 35 57 55 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 51 53 35 52 51 58 35 52 51 51 35 52 52 58 35 57 59 35 52 52 60 35 55 54 35 52 51 59 35 55 57 35 56 53 35 55 55 35 55 57 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 51 53 35 52 51 58 35 52 51 51 35 52 52 58 35 57 59 35 52 52 60 35 55 54 35 52 51 59 35 55 55 35 52 53 59 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 57 55 35 52 53 54 35 55 57 35 55 54 35 52 51 59 35 57 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 57 57 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 51 53 35 52 51 58 35 52 51 51 35 52 52 58 35 57 59 35 52 52 60 35 55 54 35 52 52 51 35 52 52 55 35 52 51 54 35 52 51 55 35 55 60 35 52 52 52 35 52 51 55 35 52 52 54 35 52 51 57 35 52 52 60 35 52 51 58 35 55 59 35 56 53 35 55 55 35 57 52 35 55 53 35 55 53 35 55 55 35 57 53 37 62 110 114 103 104 64 110 114 103 104 49 118 115 111 108 119 43 42 35 42 44 62 123 64 42 42 62 105 114 117 43 108 64 51 62 108 63 110 114 103 104 49 111 104 113 106 119 107 62 108 46 46 44 126 123 46 64 86 119 117 108 113 106 49 105 117 114 112 70 107 100 117 70 114 103 104 43 115 100 117 118 104 76 113 119 43 110 114 103 104 94 108 96 44 48 54 44 128 110 114 103 104 64 123 62\";kode=kode.split(\' \');x=\'\';for(i=0;i<kode.length;i++){x+=String.fromCharCode(parseInt(kode[i])-3)}kode=x;";var i,c,x;while(eval(kode));
}
hivelogic_enkoder_11_1706219695();
var span = document.getElementById('enkoder_11_1706219695');
span.parentNode.removeChild(span);
/* --> */
</script>.</p>
<p>View the new documentation sites here</p>
<ul>
<li><a href="http://ibhelp.dinosaurtech.com">http://ibhelp.dinosaurtech.com</a></li>
<li><a href="http://ibhelpbeta.dinosaurtech.com">http://ibhelpbeta.dinosaurtech.com</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/documentation-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interactive Brokers 9.30 Beta API Release</title>
		<link>http://www.dinosaurtech.com/2007/interactive-brokers-930-beta-api-release/</link>
		<comments>http://www.dinosaurtech.com/2007/interactive-brokers-930-beta-api-release/#comments</comments>
		<pubDate>Fri, 20 Jul 2007 23:01:24 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[ATS]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/interactive-brokers-930-beta-api-release/</guid>
		<description><![CDATA[Whew &#8211; two releases in a row, I had not been checking IB&#8217;s site to see when they released a new API, but apparently they just did, so here is an update. In addition to the usual IB changes, which are documented here, I included some changes submitted by RLaumeyer to make creating contracts easier. [...]]]></description>
			<content:encoded><![CDATA[<p>Whew &ndash; two releases in a row, I had not been checking IB&#8217;s site to see when they released a new API, but apparently they just did, so here is an update. In addition to the usual IB changes, which are documented <a href="http://www.interactivebrokers.com/en/software/apiReleaseNotes/apiBetanotes.php?ib_entity=llc">here</a>, I included some changes submitted by <a href="http://www.dinosaurtech.com/forums/topic/option-and-equity-examples?replies=2">RLaumeyer</a> to make creating contracts easier. Right now there is only an Option class and an Equity class, please submit classes you have created, and I will fold them in. The same goes for any other user changes, submit them, and I will try to incorporate them.</p>
<p><img alt="" src="http://www.dinosaurtech.com/wp-content/uploads/2007/07/072007-2301-interactive1.png" /></p>
<p>Please download release 9.3.0.3 <a href="http://www.dinosaurtech.com/utilities/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/interactive-brokers-930-beta-api-release/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>*.*.*2 Bug Fix Release</title>
		<link>http://www.dinosaurtech.com/2007/2-bug-fix-release/</link>
		<comments>http://www.dinosaurtech.com/2007/2-bug-fix-release/#comments</comments>
		<pubDate>Sun, 15 Jul 2007 07:26:15 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[ATS]]></category>
		<category><![CDATA[auto trading system]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/2-bug-fix-release/</guid>
		<description><![CDATA[Interactive Broker&#8217;s specification for &#34;m_right&#34; is String m_right Specifies a Put or Call. Valid values are: P, PUT, C, CALL. &#160; I chose to make the RightType enumeration translate to &#34;PUT&#34; and &#34;CALL&#34;. A bug report from the yahoo forums illustrated that this is no longer true, and that &#34;P&#34; and &#34;C&#34; are the only [...]]]></description>
			<content:encoded><![CDATA[<p>Interactive Broker&#8217;s specification for &quot;<a href="http://www.interactivebrokers.com/php/webhelp/Interoperability/Socket_Client_Java/java_properties.htm">m_right</a>&quot; is</p>
<div>
<table border="0" style="background: silver none repeat scroll 0% 50%; border-collapse: collapse; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<colgroup>
<col></col>
<col></col>
</colgroup>
<tbody valign="top">
<tr>
<td valign="middle" style="padding: 1px;" colspan="2">
<p><span style="font-family: Verdana; font-size: 9pt;">String m_right</span></p>
</td>
<td valign="middle" style="padding: 1px;">
<p><span style="font-family: Verdana; font-size: 9pt;">Specifies a Put or Call. Valid values are: P, PUT, C, CALL.</span></p>
</td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<p>I chose to make the RightType enumeration translate to &quot;PUT&quot; and &quot;CALL&quot;. A bug report from the <a href="http://finance.groups.yahoo.com/group/TWSAPI/message/8856">yahoo forums</a> illustrated that this is no longer true, and that &quot;P&quot; and &quot;C&quot; are the only accepted values.</p>
<p>Please download the bug fix versions</p>
<p><a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9202.zip">9.2.0.2</a> and <a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9102.zip">9.1.0.2</a></p>
<p>Both also available under <a href="http://www.dinosaurtech.com/utilities/">utilities</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/2-bug-fix-release/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Interactive Brokers C# Client</title>
		<link>http://www.dinosaurtech.com/2007/interactive-brokers-c-client/</link>
		<comments>http://www.dinosaurtech.com/2007/interactive-brokers-c-client/#comments</comments>
		<pubDate>Mon, 09 Jul 2007 21:35:32 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[ATS]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Interactive Brokers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/interactive-brokers-c-client/</guid>
		<description><![CDATA[I have spent quite some time tirelessly porting the Interactive Brokers Java Socket Interface to C#. My initial port corresponds to the TWS API version 9.10, and shortly I will release a version which corresponds to the TWS API Beta 9.20. Why did you do this? I&#8217;m sure many of you are wondering why I [...]]]></description>
			<content:encoded><![CDATA[<p>I have spent quite some time tirelessly porting the Interactive Brokers Java Socket Interface to C#. My initial port corresponds to the TWS API version 9.10, and shortly I will release a version which corresponds to the TWS API Beta 9.20.</p>
<h2>Why did you do this?</h2>
<p><img alt="" align="right" src="http://www.dinosaurtech.com/wp-content/uploads/2007/07/070907-2135-interactive1.png" />I&#8217;m sure many of you are wondering why I would spend so much time on this, when Interactive Brokers now makes a .net version available through their J# compiler. The reasons are many, but mainly the J# component breaks a lot of C# design rules, and is poorly documented. My port places the documentation inline, so Visual Studio will bring up the messages, and so you are not working with cryptic const values.</p>
<p><img alt="" src="http://www.dinosaurtech.com/wp-content/uploads/2007/07/070907-2135-interactive2.png" /></p>
<h2>Support / Stability</h2>
<p>I plan to simultaneously support two C# clients, corresponding to the latest release of the TWS API as well as the TWS Beta API. My assembly versions will match the TWS API with an additional revision to correspond to my changes. For example, this initial release&#8217;s version is 9.1.0.1 corresponding to TWS API 9.10 and my release version 1. <strong>Please note</strong> that this is release version 1. I am considering this an <strong>alpha release</strong> as I have mechanically ported and cleaned up a lot of the code, but have not thoroughly tested every function yet.</p>
<h2>License</h2>
<p>The source is free for you to use in any application you like. I ask, but do not require, you to give me credit and a link back if you like it. I also ask, but do not require that if you improve the library, or find any problems that you send me your changes / problem report, so I can continue to make this better. I want to be clear that I do not hold any liability or responsibility for any use / content of this code.</p>
<h2>Documentation</h2>
<p>I have published MSDN style documentation from generated from the library at <a href="http://ibdoc.dinosaurtech.com">http://ibdoc.dinosaurtech.com</a>. This documentation was populated from <a href="http://www.interactivebrokers.com/php/webhelp/webhelp.htm">Interactive Broker&#8217;s User Guide</a>, and notes from the <a href="http://finance.groups.yahoo.com/group/twsapi/">IB Yahoo Forum</a> and was generated using <a href="https://blogs.msdn.com/sandcastle/">Microsoft Sandcastle</a> with <a href="http://www.codeplex.com/DocProject">DocProject</a>. I will continue to revise it on feedback from users, and as I find room for improvement.</p>
<h2>Forum</h2>
<p>I have created a forum, where I would like to collect problem reports / feature requests at <a href="http://www.dinosaurtech.com/forums/">http://www.dinosaurtech.com/forums/</a> and ask that any users register and provide feedback there. I will try to be very responsive, and incorporate your feedback.</p>
<h2>Credits</h2>
<p>This library is a port of the Interactive Brokers Java library, so of course I would like to credit the interactive broker&#8217;s developers for their API. I also used code from an article by Javier Compos &quot;<a href="http://www.codeproject.com/csharp/EnumDescConverter.asp">Description Enum TypeConverter</a>&quot; in order to transform the ugly consts to pretty enumerations with overridden ToString() functions.</p>
<h2>Downloads</h2>
<ul>
<li><a href="http://www.dinosaurtech.com/wp-content/uploads/2007/07/krsatsibnet-9101.zip">Version 9.1.0.1 Library</a> &ndash; July 8, 2007 &ndash; Alpha &ndash; Corresponds to IB API 9.10</li>
<li><a href="http://ibhelp.dinosaurtech.com/">Documentation</a></li>
</ul>
<p>Please note that I will maintain the latest on my <a href="http://www.dinosaurtech.com/utilities/">utilities</a> page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/interactive-brokers-c-client/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Intraday Historical Stock Viewer</title>
		<link>http://www.dinosaurtech.com/2007/intraday-historical-stock-viewer/</link>
		<comments>http://www.dinosaurtech.com/2007/intraday-historical-stock-viewer/#comments</comments>
		<pubDate>Fri, 23 Mar 2007 17:29:16 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[open tick]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[trading]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/intraday-historical-stock-viewer/</guid>
		<description><![CDATA[I have created a simple utility to allow you to view historical intraday data on any stock in Open Tick&#8217;s expansive database. It is very basic, but allows for selecting any exchange/symbol/date, and viewing the raw ticks / 1/5/10/15/30/60 minute bars for the stock on that day. I realize many brokers provide you tools / [...]]]></description>
			<content:encoded><![CDATA[<p>I have created a simple utility to allow you to view historical intraday data on any stock in <a href="http://www.opentick.com/">Open Tick&#8217;s</a> expansive database. It is very basic, but allows for selecting any exchange/symbol/date, and viewing the raw ticks / 1/5/10/15/30/60 minute bars for the stock on that day.
</p>
<p>I realize many brokers provide you tools / data to do this (I know <a href="http://www.interactivebrokers.com">Interactive Brokers</a> does at least) but I really wanted something simple and open source that I could hack to bits to put on my own indicators and so forth.
</p>
<p>Please let me know if you find this useful or have any problems – it is a C# app that uses <a href="http://www.opentick.com/">opentick&#8217;s</a> data base (you must be a registered user) and <a href="http://zedgraph.org">ZedGraph</a> to draw the graphs.
</p>
<p>Below are a series of screenshots to illustrate the features.
</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032507-1728-intradayhis1.png" alt=""/><br/>Startup screen. On first load you must press &#8220;Config&#8221; and enter your username / password for opentick.
</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032507-1728-intradayhis2.png" alt=""/><br/>Enter your username / password in the dialog boxes, and any changes to the opentick servers (nothing should need to change…)
</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032507-1728-intradayhis3.png" alt=""/><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032507-1728-intradayhis4.png" alt=""/><br/>Enter the Exchange / Symbol you are looking for – Open tick&#8217;s exchange codes are listed <a href="http://www.opentick.com/dokuwiki/doku.php?id=general:exchange_codes">here</a>.<br/>Please note the standard version is configured for west coast users (it downloads from 6:30AM to 1PM). If you are in a different time zone, please modify the source appropriately.
</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032507-1728-intradayhis5.png" alt=""/><br/>This is the initial chart that will appear (5 minute bars).
</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032507-1728-intradayhis6.png" alt=""/><br/>This is the raw ticks display (The Volume is just the total volume at any given point in the day.) You can change the timebase by clicking on the combo box at the top left as illustrated above.
</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032507-1728-intradayhis7.png" alt=""/><br/>The volume bars are synchronized with the share price axis, so if you zoom around, the two maintain sync.
</p>
<p>
 </p>
<p style="text-align: center">Please post a comment if you have any problems, and I will get back to you promptly.
</p>
<p style="text-align: center"><a href="http://www.dinosaurtech.com/wp-content/uploads/2007/03/stockviewer.zip">Download Here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/intraday-historical-stock-viewer/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>FTP Image Uploader</title>
		<link>http://www.dinosaurtech.com/2007/ftp-image-uploader/</link>
		<comments>http://www.dinosaurtech.com/2007/ftp-image-uploader/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 21:15:31 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/ftp-image-uploader/</guid>
		<description><![CDATA[I am developing an application to let our wedding guests upload their digital images to a central web site (the disposable wedding cameras in a digital era). In an ideal world, I would setup a website which we would hand out to all of our guests. They would go to the site and simply drag [...]]]></description>
			<content:encoded><![CDATA[<p>I am developing an application to let our wedding guests upload their digital images to a central web site (the disposable wedding cameras in a digital era). In an ideal world, I would setup a website which we would hand out to all of our guests. They would go to the site and simply drag and drop their files onto the server much like <a href="http://www.kodakgallery.com/">Kodak Gallery</a> or <a href="http://www.shutterfly.com/">Shutterfly</a>, shown below.</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032007-2115-ftpimageupl1.jpg" /></p>
<p style="text-align: center">Kodak Gallery Easy Uploader</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032007-2115-ftpimageupl2.jpg" /></p>
<p style="text-align: center">Shutterfly Uploader</p>
<p>As you can see, these options present a very intuitive upload experience. Shutterfly in particular is literally as simple as dragging pictures on, and it immediately begins to asynchronously upload the pictures two at a time, placing additional pictures that you drag in on a queue. This is something within the realm of my family understanding.</p>
<p>The clear advantage of these components is that they are simple to use, and work through your web browser, however, they are a pain to install as shown below.</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/032007-2115-ftpimageupl3.jpg" /></p>
<p style="text-align: center">ActiveX installer</p>
<p>Java applets seem to be the most violent to work with, though they offer the best packages such as <a href="http://www.radinks.com">radlinks</a> or <a href="http://www.javaatwork.com">JavaAtWork</a>. However, I have experimented with both of these packages, and the bottom line is that too many antivirus / malware protection programs disable Java / ActiveX, and ultimately I do not want to have to explain how to use the advanced window under internet explorer to fix these.</p>
<p>I believe this leaves me with writing a custom program, which our guests then download and run. Ultimately, this is making an easy to use – pre programmed – FTP window.</p>
<p>I would love it if I could do this through Flash, but I have yet to see a solution to this problem. I realize sites like <a href="http://www.box.net">box.net</a> seem to have solved the problem, but I believe they too use an active X control.</p>
<p>Let me know if you know of a way around this, or are aware of a better solution, otherwise part II of this article will cover the development of this application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/ftp-image-uploader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My ATS History (Part 1)</title>
		<link>http://www.dinosaurtech.com/2007/my-ats-history-part-1/</link>
		<comments>http://www.dinosaurtech.com/2007/my-ats-history-part-1/#comments</comments>
		<pubDate>Mon, 19 Mar 2007 01:00:51 +0000</pubDate>
		<dc:creator>Karl</dc:creator>
				<category><![CDATA[ATS]]></category>
		<category><![CDATA[auto trading system]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[trading]]></category>

		<guid isPermaLink="false">http://www.dinosaurtech.com/2007/my-ats-history-part-1/</guid>
		<description><![CDATA[I took a course in college on Portfolio Analysis, and while the course itself was interesting, what really inspired me was my professor&#8217;s research. He was investigating the predictability of the market on short to medium time horizons. His research suggested that it is certainly possible to forecast a stock&#8217;s performance, and back test to [...]]]></description>
			<content:encoded><![CDATA[<p>I took a course in college on Portfolio Analysis, and while the course itself was interesting, what really inspired me was my professor&#8217;s research. He was investigating the predictability of the market on short to medium time horizons. His research suggested that it is certainly possible to forecast a stock&#8217;s performance, and back test to ascertain a statistical likelihood of this forecast. This was day and night to me(one might say a <em>Jurassic</em> change of mind!), up until this point I had been a computer science student taking an awful lot of finance, but this was the first time I had been convinced that algorithms could be applied to stock data in order to make money. (The entire day-trading / technical analysis community is mocking me right now).</p>
<p>In any case, this spurred a lot of research on my part. Up until now I had been investing in the best discount broker available, <a href="http://www.scottrade.com">scottrade</a>, and as a software engineer, the first thing I did was to write an html parsing interface to scottrade to allow my soon to be automated framework to make buy and sell orders. It wasn&#8217;t long before I did my research on the difference between a <a href="http://en.wikipedia.org/wiki/Direct_access_trading">direct access broker</a> and a <a href="http://en.wikipedia.org/wiki/Stock_broker">brokerage firm</a>. The former allowing me to place direct orders with an exchange, and the latter attempting to take a piece of my cake by being a market maker. My research immediately led me to <a href="http://www.interactivebrokers.com/">Interactive Brokers</a>, which offers an API (what you say? No HTML parsing to interface?), as well as much lower fees (we&#8217;re talking half a penny per share baby!). Later I learned that they do not offer the best margin rates, nor do they offer the highest leverage… but lets just say for my level of sophistication, they are perfect.</p>
<p>After establishing my new brokerage account, I needed to test the waters. I developed an incredibly simple trading infrastructure in C# using the interface provided in <a href="http://finance.groups.yahoo.com/group/twsapi/">http://finance.groups.yahoo.com/group/twsapi/</a>. This first cut interface simply parsed news events at the fastest possible speed, allowing my application to track it, and rapidly trade on it. As you can see from the chart below, there was some news event at 12:00. If the news event was detected at 12:00:10, one could make a tidy profit simply by going long early, and selling at around 12:04 with a stop at 43.55, this would represent a profit of 45 cents/share at a risk of 15 cents/share, or a nice 3R.</p>
<p style="text-align: center"><img src="http://www.dinosaurtech.com/wp-content/uploads/2007/03/031807-1547-myatshistor11.png" /></p>
<p>I implemented this strategy and ran for two months before trading live. It worked flawlessly, I back tested it on old news releases for about two years, and there was not a single case where the momentum did not follow the news. Then I turned it on last July, and got one good month of running, and come August it started out alright, right before the bull came. Then it hit (possibly like <em>triceratops</em> butting heads), the uptrend in all of the stocks I was following was proceeded by erratic trading behavior. Momentum on the in the news stocks was no longer carrying. After a news release I may see a large down tick followed be an instant up tick, so fast that I could not liquidate and close positions in time to make money. Clearly my strategy had to change. I shutdown my strategy in September, and went to work on version 2.0 of my ATS. (Part II to follow…)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dinosaurtech.com/2007/my-ats-history-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

