Trading Systems and Money Management : A Guide to Trading and Profiting in Any Market

(やまだぃちぅ) #1
every trade (this is not always the case and depends on a few assumptions,
but will do as a good approximation), multiply the dollars lost in the average
losing trade by the total number of trades to arrive at the total value the sys-
tem risked throughout all trades over the entire test period. Third, divide the
net profit by this value to arrive at the RiskFactor.


  1. The file export takes place in the command FileAppend. The name of the file
    is specified by the variable FileString, created in step three.


The Exported Data


Once you’ve exported all the necessary data for all markets to be analyzed togeth-
er, you can open the newly created file in Excel for further analysis. Figure 7.1
shows what this may look like after the data have been sorted on the ticker sym-
bol for each market.
If you compare all column headers in Figure 7.1 with the lowest part of the
TradeStation exportfunction, you will see that each variable is exported to its own
column in the same way for all markets tested. For example, the value in cell G3
tells us that the average profit per trade for Altera (ALTR) is $1,847.63, whereas
cell L9 tells us that the worst drawdown, measured in percentage terms, for
Citicorp is 9.91 percent. Arranging the statistics in this way makes it is easy to
rank and compare all the markets with each other by simply using the sort buttons
on the Excel toolbar. Note that the percent drawdown is allowed to surpass 100
percent in this table.
However, to find out how reliable and robust a system is when traded on sever-
al markets and during various market conditions, we also need to summarize the
results from all markets in one easy to understand table. Figure 7.2 shows what such
a table may look like when placed directly under the exported data for all the markets.
Because we will work extensively with this table over the next several pages,
let’s take the time to step through it, to make sure we understand how to calculate
all the values and how to interpret their meanings.
Cell H68 shows how many markets were profitable. The value 81.54 is cal-
culated using the formula =COUNTIF(E$2:E66,">0")*100/COUNT(E$2:E66),

CHAPTER 7 TradeStation Coding 91


FIGURE 7.1
Excel file showing sorted data.
Free download pdf