<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: TDAmeritrade StrategyDesk Formula Reference</title>
	<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/</link>
	<description>Stocks, Options, Currencies and One Big Dummy</description>
	<pubDate>Tue, 06 Jan 2009 20:37:57 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Will</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1813</link>
		<author>Will</author>
		<pubDate>Tue, 20 Mar 2007 23:24:47 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1813</guid>
		<description>Ok jaybird, here's the formula that should return the &lt;strong&gt;high of the first 60-minute bar of the day&lt;/strong&gt;, aka the 0930-1030 high:

&lt;span style="color: green;"&gt;(Bar[Hour,60] = 9) * Bar[High,60] + 
(Bar[Hour,60] = 10) * Bar[High,60,1] + 
(Bar[Hour,60] = 11) * Bar[High,60,2] +
(Bar[Hour,60] = 12) * Bar[High,60,3] + 
(Bar[Hour,60] = 13) * Bar[High,60,4] + 
(Bar[Hour,60] = 14) * Bar[High,60,5] + 
(Bar[Hour,60] = 15) * Bar[High,60,6]&lt;/span&gt;

To find stocks which are &lt;em&gt;above&lt;/em&gt; that high, you'd simply put a statment in the screener which said &lt;strong&gt;Last &#62; (&lt;/strong&gt;&lt;em&gt;insert above formula here&lt;/em&gt;&lt;strong&gt;)&lt;/strong&gt;.  Be sure your &lt;strong&gt;symbol list&lt;/strong&gt; includes all the stocks you're watching, and I'd also suggest that you not make that list more than a few hundred stocks long so you don't bog SD down too much.

If you only want stocks that are currently &lt;em&gt;crossing&lt;/em&gt; that first-hour high, you'll need a more complicated formula which says the "Low" of the current bar is &lt;em&gt;below&lt;/em&gt; the first-hour high &lt;strong&gt;AND&lt;/strong&gt; that the "Last" price is &lt;em&gt;above&lt;/em&gt; the first-hour high.  If you used a 60-minute bar as the "break bar," the formula would look like this:

&lt;span style="color: green;"&gt;Bar[Low,60] &#60; ((Bar[Hour,60] = 9) * Bar[High,60] + 
(Bar[Hour,60] = 10) * Bar[High,60,1] + 
(Bar[Hour,60] = 11) * Bar[High,60,2] +
(Bar[Hour,60] = 12) * Bar[High,60,3] + 
(Bar[Hour,60] = 13) * Bar[High,60,4] + 
(Bar[Hour,60] = 14) * Bar[High,60,5] + 
(Bar[Hour,60] = 15) * Bar[High,60,6]) AND Last &#62; ((Bar[Hour,60] = 9) * Bar[High,60] + 
(Bar[Hour,60] = 10) * Bar[High,60,1] + 
(Bar[Hour,60] = 11) * Bar[High,60,2] +
(Bar[Hour,60] = 12) * Bar[High,60,3] + 
(Bar[Hour,60] = 13) * Bar[High,60,4] + 
(Bar[Hour,60] = 14) * Bar[High,60,5] + 
(Bar[Hour,60] = 15) * Bar[High,60,6])&lt;/span&gt;

Caution:  I haven't tested this yet, just came up with it as I was typing; be sure and try it out during market hours and make sure it works before you depend on it for real trading.

Hope this helps!!  Cheers!</description>
		<content:encoded><![CDATA[<p>Ok jaybird, here&#8217;s the formula that should return the <strong>high of the first 60-minute bar of the day</strong>, aka the 0930-1030 high:</p>
<p><span style="color: green;">(Bar[Hour,60] = 9) * Bar[High,60] +<br />
(Bar[Hour,60] = 10) * Bar[High,60,1] +<br />
(Bar[Hour,60] = 11) * Bar[High,60,2] +<br />
(Bar[Hour,60] = 12) * Bar[High,60,3] +<br />
(Bar[Hour,60] = 13) * Bar[High,60,4] +<br />
(Bar[Hour,60] = 14) * Bar[High,60,5] +<br />
(Bar[Hour,60] = 15) * Bar[High,60,6]</span></p>
<p>To find stocks which are <em>above</em> that high, you&#8217;d simply put a statment in the screener which said <strong>Last &gt; (</strong><em>insert above formula here</em><strong>)</strong>.  Be sure your <strong>symbol list</strong> includes all the stocks you&#8217;re watching, and I&#8217;d also suggest that you not make that list more than a few hundred stocks long so you don&#8217;t bog SD down too much.</p>
<p>If you only want stocks that are currently <em>crossing</em> that first-hour high, you&#8217;ll need a more complicated formula which says the &#8220;Low&#8221; of the current bar is <em>below</em> the first-hour high <strong>AND</strong> that the &#8220;Last&#8221; price is <em>above</em> the first-hour high.  If you used a 60-minute bar as the &#8220;break bar,&#8221; the formula would look like this:</p>
<p><span style="color: green;">Bar[Low,60] &lt; ((Bar[Hour,60] = 9) * Bar[High,60] +<br />
(Bar[Hour,60] = 10) * Bar[High,60,1] +<br />
(Bar[Hour,60] = 11) * Bar[High,60,2] +<br />
(Bar[Hour,60] = 12) * Bar[High,60,3] +<br />
(Bar[Hour,60] = 13) * Bar[High,60,4] +<br />
(Bar[Hour,60] = 14) * Bar[High,60,5] +<br />
(Bar[Hour,60] = 15) * Bar[High,60,6]) AND Last &gt; ((Bar[Hour,60] = 9) * Bar[High,60] +<br />
(Bar[Hour,60] = 10) * Bar[High,60,1] +<br />
(Bar[Hour,60] = 11) * Bar[High,60,2] +<br />
(Bar[Hour,60] = 12) * Bar[High,60,3] +<br />
(Bar[Hour,60] = 13) * Bar[High,60,4] +<br />
(Bar[Hour,60] = 14) * Bar[High,60,5] +<br />
(Bar[Hour,60] = 15) * Bar[High,60,6])</span></p>
<p>Caution:  I haven&#8217;t tested this yet, just came up with it as I was typing; be sure and try it out during market hours and make sure it works before you depend on it for real trading.</p>
<p>Hope this helps!!  Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1788</link>
		<author>Will</author>
		<pubDate>Tue, 20 Mar 2007 04:28:02 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1788</guid>
		<description>Wyn- in their limited example, it pops up in one line as equal to zero and in another as equal to one, so that must be exactly what's going on.  Thanks so much for the lesson!  (Nymph has been dispatched)</description>
		<content:encoded><![CDATA[<p>Wyn- in their limited example, it pops up in one line as equal to zero and in another as equal to one, so that must be exactly what&#8217;s going on.  Thanks so much for the lesson!  (Nymph has been dispatched)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wyn</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1787</link>
		<author>Wyn</author>
		<pubDate>Tue, 20 Mar 2007 04:18:11 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1787</guid>
		<description>Will -

If they are adhering to typical (as in the norm for the past 30 years) programming language convention, the " % " sign here is the modulo operator. What this does, is returnthe remainder of a division operation. 

So if we do 5 / 2 , the remainder is 1. Hence  5 % 2 = 1. 
Make sense?

So in this case, NumTriggered % 2=0 , it is testing if NumTriggered is evenly divisible by 2, aka an even or odd number.

Cheers.</description>
		<content:encoded><![CDATA[<p>Will -</p>
<p>If they are adhering to typical (as in the norm for the past 30 years) programming language convention, the &#8221; % &#8221; sign here is the modulo operator. What this does, is returnthe remainder of a division operation. </p>
<p>So if we do 5 / 2 , the remainder is 1. Hence  5 % 2 = 1.<br />
Make sense?</p>
<p>So in this case, NumTriggered % 2=0 , it is testing if NumTriggered is evenly divisible by 2, aka an even or odd number.</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1766</link>
		<author>Will</author>
		<pubDate>Mon, 19 Mar 2007 14:39:07 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1766</guid>
		<description>jay bird-  I'm working on exactly such a formula this morning, but I've gotta call it off to go to work.  With no documentation to fall back on, I'm forced to try this and that while the market is open and "deduce" what the formula is doing by the results it returns.  Will try and update you tonight on what I've gleaned so far; we're not too far from having a working formula which will give us the Opening Range at any time during the day.  That formula has to be unnecessarily complex, because it looks like we'll have to say something like "&lt;em&gt;if the hour in which this 5-minute bar begins is &lt;strong&gt;1300&lt;/strong&gt;, show me the high for the 30-minute bar seven bars before the last &lt;strong&gt;complete&lt;/strong&gt; 30-minute period&lt;/em&gt;", then repeat that a million times to account for any time of day.  More later- oh, and thanks for visiting!</description>
		<content:encoded><![CDATA[<p>jay bird-  I&#8217;m working on exactly such a formula this morning, but I&#8217;ve gotta call it off to go to work.  With no documentation to fall back on, I&#8217;m forced to try this and that while the market is open and &#8220;deduce&#8221; what the formula is doing by the results it returns.  Will try and update you tonight on what I&#8217;ve gleaned so far; we&#8217;re not too far from having a working formula which will give us the Opening Range at any time during the day.  That formula has to be unnecessarily complex, because it looks like we&#8217;ll have to say something like &#8220;<em>if the hour in which this 5-minute bar begins is <strong>1300</strong>, show me the high for the 30-minute bar seven bars before the last <strong>complete</strong> 30-minute period</em>&#8220;, then repeat that a million times to account for any time of day.  More later- oh, and thanks for visiting!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jay bird</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1761</link>
		<author>jay bird</author>
		<pubDate>Mon, 19 Mar 2007 08:54:52 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1761</guid>
		<description>Can you make me a formula that will find me stocks that break the high it made in the first hour of trading.  I'm not good with formulas and can't figure it out.

thank you</description>
		<content:encoded><![CDATA[<p>Can you make me a formula that will find me stocks that break the high it made in the first hour of trading.  I&#8217;m not good with formulas and can&#8217;t figure it out.</p>
<p>thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1754</link>
		<author>Will</author>
		<pubDate>Mon, 19 Mar 2007 01:42:59 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1754</guid>
		<description>Wyn- You are absolutely correct that versions of many of the formulas in my chart are in either AMTD's &lt;a href="http://www.tdameritrade.com/forms/TDA9242.pdf" rel="nofollow" rel="nofollow"&gt;Formula and Syntax Guide&lt;/a&gt; or their &lt;a href="http://www.tdameritrade.com/forms/TDA9241.pdf" rel="nofollow" rel="nofollow"&gt;User Manual&lt;/a&gt;, which I linked in the &lt;a href="http://dummyspots.com/2007/01/ameritrade-strategydesk-10/" rel="nofollow" rel="nofollow"&gt;first article I wrote about the software&lt;/a&gt;.  However, if you go through them line by line, you'll note some errors that I've corrected in my version, and you'll notice some that I've added that aren't in their reference, and vicey-versey.  My main intent is to construct one &lt;em&gt;centralized, concise and clear&lt;/em&gt; formula reference which isn't all scattered and random like theirs.

As I point out in the introduction to the table, it's a "work in progress" which indeed started with already-available ideas like moving averages, etc (although mine are in a more usable format, in my completely unbiased opinion).  I'll be adding more and more to it as I get time and as other people donate theirs.  If you've got any good formulas you'd like to share, I'll be glad to add 'em.  And if you can decode &lt;span style="color: green;"&gt;NumTriggered % 2=0&lt;/span&gt; for us I'll have a amorous nymph drop by and kiss your toes!  It sounds like you have some programming experience, asking about the API documentation and all.  So far, the most infuriating thing I've found about this software (including how damned slow it is) is the fact that those three stupid PDFs are all the documentation AMTD has ANYWHERE so far.  Darn them to heck.  I still think our best bet is to track down where they got this software (they hardly ever do anything on their own), and ask &lt;em&gt;that&lt;/em&gt; person/company for some back-door help.

As for how many arguments the functions can take, I'm still playing "hit and miss" as you are... and sometimes the ANDs and ORs don't work quite right with multiple arguments, no matter how clearly you "parenthesize" them.  I'm planning on adding some tips and precautions on creating formulas to that chart as well, if I can only find that day with 26 hours and week with 8 days.  Thanks for dropping by and I appreciate your input!</description>
		<content:encoded><![CDATA[<p>Wyn- You are absolutely correct that versions of many of the formulas in my chart are in either AMTD&#8217;s <a href="http://www.tdameritrade.com/forms/TDA9242.pdf" rel="nofollow" rel="nofollow">Formula and Syntax Guide</a> or their <a href="http://www.tdameritrade.com/forms/TDA9241.pdf" rel="nofollow" rel="nofollow">User Manual</a>, which I linked in the <a href="http://dummyspots.com/2007/01/ameritrade-strategydesk-10/" rel="nofollow" rel="nofollow">first article I wrote about the software</a>.  However, if you go through them line by line, you&#8217;ll note some errors that I&#8217;ve corrected in my version, and you&#8217;ll notice some that I&#8217;ve added that aren&#8217;t in their reference, and vicey-versey.  My main intent is to construct one <em>centralized, concise and clear</em> formula reference which isn&#8217;t all scattered and random like theirs.</p>
<p>As I point out in the introduction to the table, it&#8217;s a &#8220;work in progress&#8221; which indeed started with already-available ideas like moving averages, etc (although mine are in a more usable format, in my completely unbiased opinion).  I&#8217;ll be adding more and more to it as I get time and as other people donate theirs.  If you&#8217;ve got any good formulas you&#8217;d like to share, I&#8217;ll be glad to add &#8216;em.  And if you can decode <span style="color: green;">NumTriggered % 2=0</span> for us I&#8217;ll have a amorous nymph drop by and kiss your toes!  It sounds like you have some programming experience, asking about the API documentation and all.  So far, the most infuriating thing I&#8217;ve found about this software (including how damned slow it is) is the fact that those three stupid PDFs are all the documentation AMTD has ANYWHERE so far.  Darn them to heck.  I still think our best bet is to track down where they got this software (they hardly ever do anything on their own), and ask <em>that</em> person/company for some back-door help.</p>
<p>As for how many arguments the functions can take, I&#8217;m still playing &#8220;hit and miss&#8221; as you are&#8230; and sometimes the ANDs and ORs don&#8217;t work quite right with multiple arguments, no matter how clearly you &#8220;parenthesize&#8221; them.  I&#8217;m planning on adding some tips and precautions on creating formulas to that chart as well, if I can only find that day with 26 hours and week with 8 days.  Thanks for dropping by and I appreciate your input!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wyn</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1725</link>
		<author>Wyn</author>
		<pubDate>Sun, 18 Mar 2007 00:31:07 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1725</guid>
		<description>Thanks for putting the information together! I see I'm not the only one scratching his head at StratDesk's functionality and lack of documentation. 
Not to be rude, but TDA does have all that information in your reference page available as a downloadable PDF. Perhaps they took the info from this site for the PDF? 

At any rate, I still havent found any documentation online for their strategy functions. For example, how many arguments can the MovingAverage function take? And what do they do? Sure, a decent programmer can guess at the function and play around with them until they figure it out... but who has that kind of time?! 

If anybody has a list of the function defintions or API documentation, please let me know.</description>
		<content:encoded><![CDATA[<p>Thanks for putting the information together! I see I&#8217;m not the only one scratching his head at StratDesk&#8217;s functionality and lack of documentation.<br />
Not to be rude, but TDA does have all that information in your reference page available as a downloadable PDF. Perhaps they took the info from this site for the PDF? </p>
<p>At any rate, I still havent found any documentation online for their strategy functions. For example, how many arguments can the MovingAverage function take? And what do they do? Sure, a decent programmer can guess at the function and play around with them until they figure it out&#8230; but who has that kind of time?! </p>
<p>If anybody has a list of the function defintions or API documentation, please let me know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1623</link>
		<author>Will</author>
		<pubDate>Wed, 14 Mar 2007 11:31:33 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1623</guid>
		<description>BNJ- thanks very much!  We're gonna &lt;em&gt;make&lt;/em&gt; this thing work!  Hey, if TDA wants to fly my up to (wherever) and give me ($$) to be their Devil's Advocate, I'd love it.  But in the meantime, we'll continue to try to make their tool functional despite its shortcomings, so we can spank Mr. Dow and Mr. Jones... the most fun of all.</description>
		<content:encoded><![CDATA[<p>BNJ- thanks very much!  We&#8217;re gonna <em>make</em> this thing work!  Hey, if TDA wants to fly my up to (wherever) and give me ($$) to be their Devil&#8217;s Advocate, I&#8217;d love it.  But in the meantime, we&#8217;ll continue to try to make their tool functional despite its shortcomings, so we can spank Mr. Dow and Mr. Jones&#8230; the most fun of all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BNJ</title>
		<link>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1619</link>
		<author>BNJ</author>
		<pubDate>Tue, 13 Mar 2007 22:44:27 +0000</pubDate>
		<guid>http://dummyspots.com/2007/03/tdameritrade-strategydesk-formula-reference/#comment-1619</guid>
		<description>Wow, you are, like, my hero.

Listen, I think what you're doing is important. I discovered your site because I, like you, had been beating my head against the poorly documented StrategyDesk. Figuring out how it works has been a bit of a forensic exercise, to say the least.

But, here's the deal. I've been very busy lately with my day job, but as time allows, I'm hereby volunteering myself to assist with future documentation/formula projects.

Oh and also, one more thing. Don't assume that TDA &lt;i&gt;won't&lt;/i&gt; compensate you for your documentation efforts, should you be willing to continue work on it. Granted, this was several mergers ago, when my broker was still "Datek," I wrote a Palm app to get quotes and do trades. I got it mostly working, but got stuck on some minor detail. I finally got the guts to call them on the phone, expecting to be berated as a dirty hacker. Instead, they offered to pay me money. At the end of the day, it didn't work out, but that was a function of my own lameness moreso than Datek's. Anyway, just thought it worth mentioning.</description>
		<content:encoded><![CDATA[<p>Wow, you are, like, my hero.</p>
<p>Listen, I think what you&#8217;re doing is important. I discovered your site because I, like you, had been beating my head against the poorly documented StrategyDesk. Figuring out how it works has been a bit of a forensic exercise, to say the least.</p>
<p>But, here&#8217;s the deal. I&#8217;ve been very busy lately with my day job, but as time allows, I&#8217;m hereby volunteering myself to assist with future documentation/formula projects.</p>
<p>Oh and also, one more thing. Don&#8217;t assume that TDA <i>won&#8217;t</i> compensate you for your documentation efforts, should you be willing to continue work on it. Granted, this was several mergers ago, when my broker was still &#8220;Datek,&#8221; I wrote a Palm app to get quotes and do trades. I got it mostly working, but got stuck on some minor detail. I finally got the guts to call them on the phone, expecting to be berated as a dirty hacker. Instead, they offered to pay me money. At the end of the day, it didn&#8217;t work out, but that was a function of my own lameness moreso than Datek&#8217;s. Anyway, just thought it worth mentioning.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
