Formula Language Course · Lesson 9 of 9
Time to find out what stuck. Fill in the shortcut tables from memory, then write eight formulas that pull together everything from the previous lessons.
Work through these with the Indicator Builder open. Writing the formulas, and watching MetaStock accept or reject them, teaches more than re-reading any lesson.
From memory, write the coding shortcut for each item below.
| Price array identifier | Shortcut |
|---|---|
| Open | |
| High | |
| Low | |
| Close | |
| Volume |
| Arithmetic operator | Shortcut |
|---|---|
| Division | |
| Multiplication | |
| Addition | |
| Subtraction |
| Comparison operator | Shortcut |
|---|---|
| Less than | |
| Less than or equal to | |
| Greater than | |
| Greater than or equal to | |
| Equal to | |
| Not equal to |
Some of these questions use the moving average function. If you are not yet comfortable with it, review Lesson 4 first. Complete the following:
C>MOV(C,21,S) from the
following formula:
V>Mov(V,20,S) AND C>O AND C>Mov(C,21,S) AND Ref(V,-1)That wraps up the formula language course. Head back to the course home for the full lesson list, then put your new vocabulary to work in the applied tutorials: building an Average True Range indicator and the On Balance Volume indicator.
Everything in these lessons works in the free 30-day MetaStock trial: full software, live data, your own watchlist.
Start Your Free 30-Day Trial →30-DAY TRIAL · FULL VERSION · CANCEL ANYTIME · AFFILIATE LINK, SAME PRICE FOR YOU
The Formula Language Course: Course home · 1. First formulas · 2. Operators · 3. Precedence & periodicity · 4. Built-in functions · 5. Nesting · 6. Variables · 7. Comments · 8. Pasting functions · 9. Exercises