|
||
|
From Advertisers |
August TRADERS' TIPSHere is this month's selection of Traders' Tips, contributed by various developers of technical analysis software to help readers more easily implement some of the strategies presented.You can copy these formulas and programs for easy use in your spreadsheet or analysis software. Simply select the desired text by highlighting as you would in any word processing program, then use your standard key command for copy or choose "copy" from the browser menu. The copied text can then be pasted into any open spreadsheet or other software by selecting an insertion point and executing a paste command. By toggling back and forth between an application window and the open Web page, data can be transferred with ease.This month's tips include formulas and programs for:or return to Contents TRADESTATIONThe June 1997 issue of STOCKS & COMMODITIES discussed a tried-and-true technique known as TRIX in the article "Playing TRIX: The triple exponential smoothing oscillator." The TRIX indicator and system code below for TradeStation includes alerts and signals based on both the crossing of the zero line and the crossing of the linear regression average. The inputs, aside from the basic parameter adjustments, will also allow you to specify whether you want to generate alerts and signals on the crossing of the zero line, the linear regression average or both.Before creating the indicator and system, a new TRIX function must be developed. The function, which we'll call NewTRIX, is thus: Type: Function Inputs: Price(NumericSeries), Length(NumericSimple); LogP = Log(Price); IF CurrentBar = 1 Then Begin The TRIX indicator will plot a total of three lines: the TRIX value, the linear regression average of TRIX, and a zero line. The ZeroCrss (zero cross) and AvgCrss (linear regression cross) inputs determine the basis of the alerts (if alerts are enabled). If both are set to Y, then either occurrence will trigger an alert. If N is used as the input value for either, then an alert won't be triggered for that event. The indicator should be scaled to "screen." Type: Indicator Inputs: Price(Close), TrixLen(3), TSLen(8), ZeroCrss("Y"), AvgCrss("Y"); Condition1 = False; Plot1(TRXval, "TRIX"); IF UpperStr(ZeroCrss) = "Y" Then Begin IF CheckAlert AND (Condition1 OR Condition2) Then Continuing on, the entries for the TRIX system code are based on the same premise as the alerts for the indicator code given above. The ZeroCrss and AvgCross inputs are used to determine the basis for the entry signals. If both inputs are set to Y, a zero cross or a linear regression average cross will trigger a long/ Type: System Inputs: Price(Close), TrixLen(3), TSLen(8), ZeroCrss("Y"), AvgCrss("Y"); TRXval = NewTRIX(Price, TRIXLen); IF UpperStr(ZeroCrss) = "Y" Then Begin IF UpperStr(AvgCrss) = "Y" Then Begin This code is available at Omega Research's Web site. The file name is "NewTrix.ela." Gaston Sanchez with Francis A. Rivera, Omega Research 800 422-8587, 305 270-1095 Internet: http://www.omegaresearch.com
METASTOCKLast month, the MetaStock Traders' Tip covered creating a template and formulas to reproduce rainbow charts, which were introduced by Mel Widner in the same issue. This month I'll show how to create a system test, which will allow you to test the exit strategy Widner gave toward the end of the article (under the subheading, "Beating buy-and-hold"). For this test, I've chosen to enter a long position when all rainbow averages are in an uptrend sequence. The exit rule used here adheres to Widner's instructions in the article.To perform this test, first enter the following three custom indicators by choosing "indicator builder" from the Tools menu. (Note: The first two formulas are repeated from last month's Traders' Tips, so if you've already entered them, you'll only have to enter the third formula.) Rainbow Oscillator 100 * Upper Rainbow Band 100 * Rainbow Uptrend Binary Wave Mov(C,2,S) > Next, enter the following system by choosing System Tester from the Tools menu. I've created an optimization variable for the Ubro constant so you can find the results that work best for you, but you can also replace the opt1 with 38 as mentioned in Widner's article. SIGNAL FORMULAS Enter Long: OPTIMIZATION VARIABLES
SMARTRADERAt Stratagem Software, we are often asked by users how various studies work. Two common topics of interest to users are the stochastic and slow stochastic and the moving average convergence/divergence (MACD). Here, we'll explain how they work by building them piece by piece in SmarTrader.First, we'll look at stochastics. In recent years, hybrid calculations for the stochastic oscillator have been developed, but here we'll stick to the formula originally given by George Lane. The stochastic that's preprogrammed in SmarTrader consists of a K line and a D% line. Rows 9 and 10 in Figure 1 are the standard K and D% calculations. Note that they both use the high, low and close price fields, since they may be calculated independently of each other. The number of periods is five. Slow D% is based on the regular D% over three periods. Row 12 uses the preprogrammed function "highest" to determine the highest high over last five periods. Row 13 uses the function "lowest" to determine the lowest low in a similar manner. Row 14, which is W1, is a user row that calculates the current close minus the five-period lowest low. Row 15, which is W2, is a user row to calculate the five-period highest minus lowest. Row 16, which is myK, normalizes the division of W1 by W2 to a scale of zero to 100. Rows 17 and 18 sum W1 and W2 over three periods, and the results are normalized in row 19 as myD%. The easy part is mySlowD%; it's a simple moving average of the regular myD% over three periods. The MACD indicator that's preprogrammed in SmarTrader, which is based on George Appel's original calculation, consists of an MACD line and a signal line. MACD in row 21 is based on the close and has two periods, 12 and 26. Row 22 is the signal calculation and it uses the MACD over nine periods. Creating the MACD line is simple. Rows 23 and 24 use the preprogrammed exponential moving average (EMA) of the close over 12 and 26 periods. Note that this is not a simple moving average, which would give different results. Next, row 25 subtracts the 26-period EMA from the 12-period EMA. That
Although some technical analysis studies are quite complex, most are fairly simple. Many are "canned" in software to insulate the technician from having to remember how they work and from the tedium of construction. The SmarTrader specsheet file for building the stochastic and MACD oscillators is available from Stratagem's Web site. Jim Ritter, Stratagem Software International 504 885-7353, E-mail: Stratagem1@aol.com Internet: http://www.stratagem1.com.
WAVEWI$E Market SpreadsheetThis month, we'll present how to calculate some useful figures for tracking new highs using WAVEWI$E. The following WAVEWI$E formulas count the number of new closing highs for the Dow Jones Industrial Average (DJIA) and compute the percentage gain for each new closing high:WAVE WI$E spreadsheet formulas A: DATE @TC2000(c:\tc2000\data,DJ-30,DOW JONES INDUSTRIALS,DB) |
||||
|
|||||