If you are better off using as few bars as possible in your system, it should follow that you should make as good use of those bars as possible. For instance, a moving average usually only looks at one particular price within a time series, not tak-

Performance summary for Gold Digger II, ¡January 1995-October 1999.

Performance summary for Gold Digger II, ¡January 1995-October 1999.

Total trades |
107 |
Winners |
6 |
62.62% |
Losers |
4 |
37.38% | |

Profit factor |
1.98 |
Lrg winner |
7.31 |
24,671 |
Lrg loser |
-4.06 |
-13,703 | |

Avg profit |
0.31% |
1,045 |
Avg winner |
1.00 |
3,364 |
Avg loser |
-0.84 |
-2,840 |

St Dev |
1.38% |
4,666 |
Cum profit |
37.84 |
127,710 |
Drawdown |
-7.26 |
-24,503 |

ing into account that each bar actually holds three other important price levels. That is, when calculating a moving average of closing prices, all open, high, and low prices usually are ignored. Using regular moving averages and Bollinger-band-type indicators to identify trading opportunities also present a problem in that the readings are not always comparable over time. For example, a value of 1,350 for the S&P 500 index may very well be below its moving average and standard deviation bands today, but may not be so a couple of years from now, if and when the market trades at the same level again. It all depends on where the market is coming from at that point in time.

Wouldn't it be great to come up with an indicator that can make use of all four of these price extremes, shorten the lookback period by 75%, and at the same time make it possible to make all of the indicator observations comparable with each other, regardless of when they happened or at what level the market was trading at the time?

Contrast the above with a statistical examination, where you are measuring the height of a random sample of men that you meet throughout the day. At the end of the day you write down the height of the first man, the tallest man, the shortest man, and the last man you have measured that day. It does not matter in what order you write them down. After five days you have 20 observations, which is the minimum amount required to make any statistical conclusions. (This number varies; some say 20, others say 30, while still others say 100 or more. In the medical field, it is close to 1,000. Aside from the fact that you will not always have that much data to experiment with, there is no reason why you shouldn't treat your money any less seriously.)

Let us say that the average for all 20 men was 6 feet and the standard deviation was 3 inches. The one standard deviation boundaries and the two standard deviation boundaries hold approximately 68% and 95%, respectively, of the men measured and the expected height of all men to be measured in the future. With this information at hand you now can classify all men that you met as, for instance, average height (between 5 feet 9 inches to 6 feet 3 inches), short (between 5 feet 6 inches to 5 feet 9 inches), very short (below 5 feet 6 inches), tall (between 6 feet 3 inches to 6 feet 6 inches), and very tall (above 6 feet 6 inches). For each and every investigation done this way, and depending on where they are done, these levels will vary slightly. But for each investigation, at least some of the previous information will be useful in estimating the future outcome or what can be expected for the next day. For instance, because the chances of meeting a tall or very tall man are approximately 16% ((1 — 0.68) X 100 / 2), you also know that the chance of meeting two such men in a row is a mere 2.5% (0.16 X 0.16 X 100).

To develop and use the same type of research in the markets, it is important to note not at what level the markets are trading, but the amplitude of the moves. To make each move comparable to all others, both in time and between different markets, we must use the RAD contract, which keeps the percentage changes constant instead of using the actual point or dollar values. To calculate the move rather than the level, it also is necessary to relate each move to a base or ground level. Continuing the comparison with measuring men on the street, it makes little or no sense to measure each man's height from sea level instead of from the ground where he is standing. That is, for a comparison to be meaningful, it is necessary to normalize the data; the obvious level from which to normalize a person's height is the ground on which he stands.

In market research, there are a few levels to which each move can be normalized, like the previous bar's close or the average price of the previous bar. Here cach move has been normalized to the previous bar's closing price. Another difference between measuring men and market action is the use of absolute and percentage values. If you are 6 feet tall, you will be 6 feet tall whether you are standing on a pair of skis in Vail or lying down on a beach towel in Hawaii. It would make little or no sense to compare your height in percentage terms to how high you are from the ocean. But in the market there is a huge difference between a move worth $20,000 if the market is trading at the 1,350 level, compared to the same dollar move if the market is trading at 250. In the first case, a $20,000 move equals only a 6% move, while in the latter the same dollar move amounts to over 30%. Thus, it is of paramount importance to measure market moves in percentages rather than point or dollar values so that you can compare different types of moves, no matter where and when they happened.

In our measuring-men example, four observations were kept each day. This can be done for the markets as well with what I call the Meander indicator. The following TradeStation code sets up an array containing all the opening moves, moves to the highs, moves to the lows, and moves to the close, for a total of 20 data points for the last five bars:

Vars: SumVS(O), AvgVS(O), DiffVS(O), StdVS(O), SetArr(O), SumArr(O),

DiffArr(O), VSLow(O), VSMid(O), VSHigh(O), FName(""), TradeStrl("");

For SetArr = 0 To 4 Begin

VS [SetArr * |
4 + 0] |
= (0[SetArr] |
- C[SetArr |
+ |
1]) |
/ C[SetArr |
+ |
i]; | ||||||||||||||||||||||||||||||||||||||||

VS [SetArr * |
4+1] |
= (H[SetArr] |
- C[SetArr |
+ |
1]) |
/ C[SetArr |
+ |
ij; | ||||||||||||||||||||||||||||||||||||||||

VS[SetArr * |
4 + 2] |
= (LfSetArr] |
- C[SetArr |
+ |
1]) |
/ C[SetArr |
+ |
i]; | ||||||||||||||||||||||||||||||||||||||||

VS[SetArr * |
4 + 3] |
= (CfSetArr] |
- C[SetArr |
+ |
1]) |
/ C[SetArr |
+ |
For SumArr = 0 To 19 Begin If SumArr = 0 Then SumVS = 0; SumVS = SumVS + VS [SumArr]; If SumArr = 19 Then AvgVS = SumVS / 20; For DiffArr = 0 To 19 Begin If DiffArr = OThen DiffVS = 0; DiifVS = DiffVS + Square(VS[DiffArr] - AvgVS); If DiffArr = 19 Then StdVS = SquareRoot(DiffVS / 20); End; End; Plot3(VSHigh, "VS High"); If CurrentBar = 1 Then Begin FName = "C:\Temp\" + LeftStr(GetSymbolName, 2) + ".csv"; FileDelete(FName); TradeStrl = "Date" + "," + "Open" + "," + "High" + "," + "Low" + "," + "Close" + V + "VS Low" + "," + "VS Mid" + "," + "VS High" + NewLine; FileAppend(FName, TradeStrl); End; If CurrentBar > 5 then Begin TradeStrl = NumToStr(Date, 0) + "," + NumToStr(Open, 2) + "," + NumToStr(High, 2) + "," + NumToStr(Low, 2) + "," + NumToStr(Close, 2) + "," + NumToStr(VSLow[l], 2) + "," + NumToStr(VSMid[ 1 ], 2) + "," + NumToStr(VSHigh[l], 2) + NewLine; FileAppend(FName, TradeStrl); End; All moves are measured with the previous bar's close as a base. Once the data are collected, the code calculates the average move and the standard deviation before the data are denormalized to fit with the latest price action. When the calculation is completed, you have an indicator that makes the most out of each bar's price action and allows you to trade intraday using only end-of-day data or intraweek, using a mix of weekly and daily data. The last part of the code holds the necessary instructions for exporting all the data into a text file for further analysis in a spreadsheet program, such as Excel. Figure 5.1 shows what this pivot-point-type indicator looks like when charted together with the latest price action for the S&P 500 futures contract. As you can see, the Meander indicator consists of three lines, among which the upper (VS High) and lower (VS Low) lines can be chartered one or two standard deviations away from the middle (VS Mid) line. The Meander indicator works exactly the same for all markets. With the necessary data imported into Excel, you can type in the following formula in adjacent columns to calculate the long entry level, the long risk level (stop loss), the long exit level, and the result of the trade. (Reverse the calculations in the next four columns for the short side.) Column B denotes the opening price, column F denotes the VS Low level, and column D the Low. =IF(I2<>"";I2*(1 —H$ 1212/100);"") Column I denotes the long entry level and cell H1212 refers to the cell where you have typed in your percentage risk. = IF(I2<>"";IF(D2<J2;J2;IF(AND(C2>H2;E2<H2);H2;E2));"") Column J denotes the long risk level, column C denotes the High, column H the VS High level, and column E the closing price. =IF(I2<>"";(K2 - I2)/I2;" -") ## Column K denotes the long exit level.At the bottom of the spreadsheet type in the following formulas to calculate the total number of trades, percent winning trades, average percentage profit per trade and average dollar profit per trade. (Again, reverse the calculations for the short side.) Column L denotes the percentage result for each trade. =COUNTIF(L2:L1208;">0")/L1210 =SUMIF(L2 :L 1207;" < > - ")/L 1210 =L1212*1350*250 The percentage risk that you are willing to take is, in this case, typed into cell H1212. This simple system puts on a long (short) trade immediately at the open if the opening price is below (above) the VS Low (VS High) level, or at the VS Low Data provided by CSI, Unfair Advantage FIGURE 5.1 Data provided by CSI, Unfair Advantage FIGURE 5.1 The Meander indicator makes the most out of your data. (VS High) level if the market trades below (above) that level. It exits with a loss if the market moves against the position with a certain percentage, or with a profit if it trades above (below) the VS High (VS Low) level but then moves back down again, as suggested by the closing price. All trades are also closed out at the end of the day. Because this is an intraday system based on daily data, and sometimes we do not know what came first, the high or the low, we must play it safe and look for the losing trades first. Table 5.7 shows the results for this system broken down into long and short trades, tested on the S&P 500 futures contract, for the period January 1995 to October 1999. No money has been deducted for slippage and commission. The percentage risked at each trade was 0.75%. In this version, the Meander had over 50% profitable trades on the long side, for a total average profit in today's market value of $287. With an estimated $75 deducted for slippage and commission, the average profit for the long side will be $212. Not too bad for an intraday trading system on a one-contract basis. Remember also that because we played it safe by always considering a trade to be a loser if it reached the stop loss level, although we very well might have reached the profit target first, there is a high likelihood for the percentage profitable trades and the average profit to be even higher than shown. In this case, the standard deviation was set to 1, which means that the system triggers a trade fairly frequently. With the standard deviation set to 2, the system generates fewer trades, but with a higher probability for success. Also, the highest probability trades are those that enter immediately at the open. This is because if the open is below (above) the trigger level, the low (high) will be, too. That is, there will be two low probability occurrences in a row, analogous to the chance of meeting two tall men in a row, which increases the probability for a move in the opposite direction. Or rather, if we continue on the tall men analogy, it increases the likelihood that we have run out of tall men. Now, let us take a look at the very same system, with the very same settings, but this time traded on corn. As you can see in Table 5.8, the system continues to work fairly well if we only look at the percentage average profit and the number of profitable trades. TABLE 5.7 Basic results for Meander I trading system on the S&P 500. TABLE 5.7 Basic results for Meander I trading system on the S&P 500.
Was this article helpful? |

## Post a comment