The List Wizard and Automated Operations
Computers are great at doing repetitive annoying tasks over and over without fatigue. Lists are designed specifically to aid command sets in performing such operations automatically. A list is just any ASCII dataset that has one item on each line. Some lists contain the names of saved FDC datasets, one to a line. Others contain the names of trade functions, macros, or possibly just numbers. Lists can be created with any editor, such as Notepad, and saved in the Lists subdirectory of the FDC directory. The list wizard makes it easy to create, change or manipulate lists in various ways. The list wizard icon is shown below.

Click on this icon to produce the list wizard.

Then click “Create New List”. If your list is to be one of Datasets, you can press the Datasets button. This will present you with the names of all saved datasets, from which you can select those you want in your list. Then simply click "Open". Lists containing Trades (that is, Trading functions), Macros or Commands can be created in a similar way. Also you can simply add lines to your list freehand, thus editing commands or inserting numbers. When done, press the Save List button, then choose a name and save the list.
Once made, a list can be sorted alphabetically, or by the value of any quantity that can be produced from its entries. Thus entering the expression “LENGTH #R” in the Sort Command Window will sort any list of saved datasets according to length or number of dates. As you can imagine, there is tremendous value in sorting trade results according to criteria such as percent of profitable trades.
For the moment, just choose datasets, and select a few, then save your new list as “list1”. Let’s assume you have selected Euro, SNP, and IBM.
Now that you have set up a list, let’s put it to use. Command sets have an automatic, or Play mode, whose icon is shown below.

If the Play icon is pressed, the sequence of commands in the set will be executed automatically. This provides the user with automatic, or “Batch” capability. To make this process more useful, a command set can be made to “loop” repeatedly through a given set of command lines. It is in these loops that lists are used.
Only three new words; :for, :in, :endfor, and variables numbered #1, #2, through #9 can play a role in making these loops. The variables are just place holding, or 'dummy' names similar to #R and #L that you have used before, and you may choose any of them that you wish to use.
For example, suppose that a command set contains the following lines:

When the play button is clicked, the variable #1 will assume the first name in list1, that is it will be replaced by “euro”. Then the middle line will be executed. In this case it will compute the 10 day moving average of the euro and display the result as its own dataset. The third line will then direct attention back to line 1, and the process will begin all over again with #1 having the next value in the list, namely snp.
This command set will loop through these lines automatically until it has produced the 10 day moving average of every dataset in the list, then it will stop. The variable #1 is called a “dummy” since it takes on various other values.
The variations of this process are endless. For example we can enter command lines that form the following “double loop”.

When we press the play button, this command set will produce 5, 10 15 and 20 day moving averages for every dataset named in list1, here a total of 12 outputs datasets.
Just as we have done above, you can set up routines to perform function after function on dataset after dataset. You can even set up a command to download today’s prices and update every dataset in a list, if you wish.
This capability is particular useful in conjunction with trade simulation functions. For example, if you have the names of several trade simulation functions in the list “tradelist” and dataset names in the list “list3”, the simple loop
:for #1 :in list3
:for #2 :in tradelist
#2 #1
:endfor
:endfor
will apply every trading strategy independently to every dataset and produce all the summary outcomes. If this set of output windows is too large for convenience (or exceeds the windows memory capability), you can instead save the outputs and not display them. If the middle line above is replaced by the line
autosave #2 #1
then FDC will automatically make up names for the outputs by combining the names of the trading functions with the datasets, and then save but not display the results.
After any use of the play button, the command window will have an “execution list” containing the names of all datasets, permanent and temporary, produced during execution. This list can be manipulated, then saved if desired, by using the list wizard. Thus, after applying several trading strategies to various datasets, the list of summary outputs can be sorted and thus ranked according to any summary variable.
Command sets like those shown above are, of course, just simple computer programs. They can be saved and recalled or modified at any later time. As you get more familiar with FDC, you can form more complex command sets to perform more complicated actions. FDC also has a branch capability in the form of the words :IF, :ELSE, and :ENDIF. With these and loops, it is possible to apply a large number of trade simulations to a large number of datasets, then select and save only the ones that meet your standards of performance.