TDAmeritrade StrategyDesk for Intraday Scanning, Ch. 2

Note: If you’re looking for my StrategyDesk Formula Reference, it’s HERE.

One of the greatest things about blogging is how much we learn from each other. I think our trading evolves much faster that way than working in a vacuum. For instance, in the comments of my previous post Gabriel enlightened me to the fact that StrategyDesk (hereafter SD) does indeed have a formula for monthly average volume. So my life suddenly became much easier due to some simple generosity.

Let’s get into the meat of this thing a little. Here’s a better-annotated shot of my intraday SD monitor screen with the three windows I keep open. Click for a larger version:

SD Screenshot

In particular please notice the “Sym” (symbol) and “Inv” (intervals) buttons on the charts. If the Inv buttons are the same color, every time you click a ticker in your screener list, both charts will switch to the SAME time interval. So, make sure the Sym buttons are the same color (so all windows will change to the same ticker when you click it), but that the Inv buttons are different colors, else you’ll get frustrated pretty quickly as your “minute charts” keep changing to “daily” or vice-versa.

To enter a screening formula, highlight the Screener window, then click “Screener” in the toolbar of the MAIN Window. Yes, poor programming. The screener toolbar should be in the screener window. Instead, the MAIN toolbar changes based on which window you last highlighted. Perhaps in a later version…

Under “Screener” in the toolbar, click Add Screener or Edit Screener. This will bring up the Screener Settings window, which is where we do all the “under-the-hood” work. Here’s a screenshot with an important warning:

SD Screenshot

As of v1.0, SD doesn’t support different directories (”folders”) for groups of formulas- they’re all under the Formula Library list, which can get unwieldy really quickly as you save all your tweaks. For now, I’d suggest you begin each of your custom formulas with a particular letter or symbol so they’ll all stay grouped together within that long list. For example, I start all of mine with a number sign “#“, so the title looks like “# 15-minute Dummy Spot Test“. That way, when I drop down the Select a Formula list, all of my custom ones are grouped together.

 

Time for that formula! As I’ve said before, your rules have to be extremely specific to be useful. What we’re going to do here is write a formula which will give us, in real-time:

All stocks (from our symbol list) with a price greater than $20 and an average monthly volume of over 200,000 shares which opened this morning with a gap of at least 1% above their prior close, whose previous 30min bar has a lower high than its preceding bar and also printed a low which was less than 1% above the 5ema, and finally, a current price which is in the top half of the range of the previous 30min bar.

Pretty specific! But that’s what we need if this is going to be really useful. We’re wanting to use this tool to narrow the field the way we previously had to with our eyes, and free our eyes up to pay more attention to the prime suspects as they appear.

Let’s walk through the construction of this formula:

  • First, price and volume. The formula for stocks with a prior closing price above 20 is Bar[Close,D,1]>20. The “D” is for “daily bars” and the “1″ tells SD to look at the bar “1″ day before the current day.

    The formula for volume (thanks, Gabriel!) is (Bar[Volume,M,1]/20)>200000. This takes the previous month’s volume and divides it by 20 (trading days in a month), and we’re wanting stocks for which the result is higher than 200k.

    2/25/07 Warning: I’ve been toying with this formula more tonight, and there’s some problem with this volume statement. The lack of documentation by Ameritrade makes this a trial-and-error arrangement, so I haven’t isolated the problem yet. I will post the update/solution once I work it out or someone emails it to me; until then, consider eliminating this statement from your formula and pre-screening your stock list for volume.

    2/26 - formula has been edited and should work reasonably well; please see next post for more details.

  • Next, our gap. The formula for a gap simply divides today’s open by yesterday’s close, and, for a 1% gap, looks for a result greater than 1.01. It goes like this: Bar[Open,D] /Bar[Close,D,1]>=1.01

  • Now for our 30-minute bar formulas. The high of the current 30min bar would be written Bar[High,30] and the low of the previous bar would be written Bar[Low,30,1] (remember, the “1″ tells SD that we’re talking about “1″ bar prior).

    For our formula, we want the previous 30min bar (bar “1″) to have a lower HIGH than its previous bar (bar “2″), so we would write the formula as follows: Bar[High,30,1] < Bar[High,30,2].

  • The formula for a 5-period exponential moving average of 30min bars based on the closing price of each bar is this: ExpMovingAverage[EMA,Close,5,0,30]. I know having to write “ExpMovingAverage” and then having to write “EMA” is redundant. Poor programming again. They should hire someone who actually uses the program as a consultant. Or maybe my 7th grader- she’d catch that one easily.

    Since we want our previous 30-minute bar to have a low which is within 1% of the 5ema, we’d write that part of the formula like this: Bar[Low,30,1] < (ExpMovingAverage[EMA,Close,5,0,30] * 1.01)

  • Finally, now that we have a pullback and a price which has come within spitting distance of the 5ema, we want SD to only notify us once the current price reaches more than halfway up the previous bar.. in other words, when it may be approaching a breakout. No need to waste our cerebral processor cycles otherwise– we’ve got better things to do.

    Our formula to say “Last price higher than 50% in the previous bar’s range” requires us to take the high of the previous bar minus its low, divide by 2 (thereby giving us “half” of the hi-lo range), then adding that number back to the low for our cutoff price.

    The way we write that part of the formula is: Last > Bar[Low,30,1]+((Bar[High,30,1]-Bar[Low,30,1])/2).

 

Ok, bored yet? Let’s put it all together so we can move along to more entertaining subjects. Here’s the completed formula, with each part (hopefully) explained above:

Bar[Close,D,1]>20 AND (Bar[Volume,M,1]/20)>200000 AND Bar[Open,D] / Bar[Close,D,1]>=1.01 AND Bar[High,30,1] < Bar[High,30,2] AND Bar[Low,30,1] < (ExpMovingAverage[EMA,Close,5,0,30] * 1.01) AND Last > Bar[Low,30,1]+((Bar[High,30,1]-Bar[Low,30,1])/2)

Well, all the formula yakking is great, but what does this accomplish? For your viewing pleasure, here’s a chart from Wednesday which shows the kind of setup we’re trying to catch with this scan:

SNP

Well, that’s that. It’s just a basic start, but maybe it’ll give you some ideas. Feel free to copy the above and edit it as you see fit to make yourself a scanner. I’d also encourage anyone who comes up with a useful scan to share the formula in the comments so we can collectively speed up our learning curve.

Cheers, and best of luck!

 

1 Comment

  1. TDAmeritrade StrategyDesk 1.2 - Looks Like Someone Is Listening • dummyspots.com said,

    April 13, 2007 @ 11:15 pm

    […] DummySpots: …As of v1.0, SD doesn’t support different directories (”folders”) for groups of formulas- they’re all under the Formula Library list, which can get unwieldy really quickly as you save all your tweaks. […]

RSS feed for comments on this post