Welcome to my page of Formulas for TDAmeritrade StrategyDesk! The following table contains formulas gleaned from reviewing Ameritrade's wimpy documentation (with corrections in some of their errors) and from personal experience. This list is a "work in progress," and will continue to evolve until/unless Ameritrade finally publishes a decent formula reference themselves.
I've discovered (as I'm sure you have) that not everything always works as "it seems it should" in this quirky program, so I can't make any guarantees as to how well these formulas perform. My disclaimer on my home page applies to anything I write: if I were so smart, I'd be rich.
At this point I've included only some of the core formulas, which of course you can "mix and match" by concatenating a bunch of them with "AND" and "OR" to suit your purpose. (Careful with those parentheses, Hoss). Also, to improve clarity, I've only written the following formulas using a single period and DAILY bars. They can be easily modified for different time frames, though. For example, you can screen for a 7ema on 30-minute bars by simply taking the "5ema on daily bars" formula and changing the "5" in the formula to a "7" and the "D" in the formula to a "30".
Please feel free to try out the formulas, and email me any suggestions, corrections, or new formulas you'd like added to the list.
Cheers and best of luck!
| NAME OF STUDY and basic formula which can be used in StrategyDesk COLUMNS | Examples of use in StrategyDesk ALERTS and SCREENER | Examples of use in StrategyDesk BACKTESTER |
Description: Formula (last price): Formula (today's close): Formula (today's high): Formula (yesterday's close): Formula (high 3 days ago): |
Alert/Screener example: Formula: |
Backtesting examples: Formula: *** Last price is above yesterday's High Formula: |
Description: Formula: ***** Description: Formula: |
Alert/Screener/Backtesting example: Formula: |
|
| Description: Formula: ***** Description: Formula: |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
| NAME OF STUDY and basic formula which can be used in StrategyDesk COLUMNS | Examples of use in StrategyDesk ALERTS and SCREENER | Examples of use in StrategyDesk BACKTESTER |
Description: Formula: |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
Description: Formula: |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
Description: Formula: |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
Description: Formula: |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
Description: Formula: BollingerBands[Upper,Close,20,2,D] |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
| Description: Formula: ***** Description: Formula: |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
| Description: Formula: |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
| NAME OF STUDY and basic formula which can be used in StrategyDesk COLUMNS | Examples of use in StrategyDesk ALERTS and SCREENER | Examples of use in StrategyDesk BACKTESTER |
Description: Formula: |
Alert/Screener example: Formula: |
Backtesting examples: Formula: |
Description: Formula: |
Alert/Screener example: Formula: |
Backtesting examples: Formula: |
Description: Thanks to BNJ for this formula! Formula: |
Alert/Screener example: See above examples of how to use this type of formula in screeners and backtesting |
|
Description: Note: I arbitrarily chose the 0.1% parameter; StrategyDesk uses a simple "equals" statement, but very few dojis actually have an open and close "equal" to the thousandth of a penny! Formula: |
||
Description: This is a great example of how mathematically expressing something as simple as a Hammer can get really complicated really quickly... not quite as easy as eyeballing one on a chart! Formula: |
| NAME OF STUDY and basic formula which can be used in StrategyDesk COLUMNS | Examples of use in StrategyDesk ALERTS and SCREENER | Examples of use in StrategyDesk BACKTESTER |
| Description: Note: There is no documentation of exactly how StrategyDesk determines "Entry Price," so this formula may only be useful as an EXIT formula in the BACKTESTER. Formula: |
Alert/Screener example: Formula: |
Backtesting example: Formula: |
| Description: Note: There is no documentation of exactly how StrategyDesk determines "Entry Price," so this formula may only be useful as an EXIT formula in the BACKTESTER. Formula: |
Alert/Screener/Backtesting example: Formula: |
|