Document Sample

MetaStock Custom Formula Collection Absolute Breadth Index {$%*} rev. 01/06/97 Advance / Decline Line with Negative Volume {%*} rev. 01/06/97 Adaptive Moving Average, by Perry Kauffman {#} rev. 01/14/98 ADX/ADXR Custom (without rounding) {#} rev. 01/20/99 Arms Index (TRIN) {$%*} rev. 01/06/97 Aroon Indicators, by Tushar Chande {$%*} rev. 01/06/97 "Average Modified Method", by Perry Kauffman {#} rev. 10/27/97 Bollinger Bands {$%*} rev. 01/06/97 Breadth Thrust {$%*} rev. 01/06/97 CCI Moving Average Crossover System Test {$%*} rev. 01/06/97 Chande's Momentum Oscillator {$%*} rev. 01/06/97 Combining Trend and Oscillator Signals" System Test {*} rev. 01/06/97 Commodity Channel Index Buy & Sell Signals {$%*} rev. 01/06/97 Comparative Relative Strength in MetaStock for Windows {%*} rev. 01/06/97 Comparative Relative Strength in MetaStock for DOS 4.x {$} rev. 01/06/97 Comparative Relative Strength Exploration {%*} rev. 01/06/97 Coppock Curve {$%*} rev. 01/06/97 Derivative Moving Average {$%*} rev. 01/21/97 Detrended Price Oscillator {$%*} rev. 01/06/97 Disparity Index {$%*} rev. 01/06/97 Displaying the Price of a Security in 32nds and 64ths {$%*} rev. 01/06/97 Divergence between the Close and an Indicator {%*} rev. 03/18/97 Dynamic Momentum Oscillator {$%*} rev. 01/06/97 Elder Ray and The Force Index in MetaStock for Windows {%*} rev. 01/06/97 Elder Ray and Force Index in MetaStock for DOS {$} rev. 01/06/97 End Point Moving Average {$%*} rev. 01/06/97 End Points of a Linear Regression Line with Standard Deviations {%*} rev. 01/06/97 Genesis of a Simple Futures Trading system {%*} rev. 04/04/97 Historical Volatility System, Connors and Raschke's {$%*} rev. 02/24/97 Historical Volatility Daily {%*} rev. 01/21/97 Historical Volatility Weekly {%*} rev. 01/21/97 Investors Preference Indicator {#} rev. 01/13/98 Insync Index {$%*} rev. 01/06/97 Keltner Channels {$%*} rev. 01/06/97 Ken Roberts' Formulas {%*} rev. 06/18/97 KST Formulas, Martin Pring's {$%*} rev. 01/06/97 Kurtosis Indicator {$%*} rev. 01/06/97 MACD Histogram {$%*} rev. 01/09/98 Market Facilitation Index {$%*} rev. 01/06/97 Market Facilitation Index Expert Advisor {*} rev. 02/24/97 Market Thrust Oscillator {$%*} rev. 01/06/97 Mass Index {$%*} rev. 01/06/97 McClellan Oscillator {$%*} rev. 01/06/97 McClellan Summation Index {$%*} rev. 01/06/97 Modified VIX Indicator {$%*} rev. 01/06/97 Money Flow Index {$%*} rev. 01/06/97 Moving Average of Only One Day of a the Week {%*} rev. 01/06/97 Natenberg's Volatility {$%*} rev. 01/21/97 Pathfinder Trading System {%*} rev. 02/21/97 Plotting Alpha and Beta {$%*} rev. 01/06/97 Polarized Fractal Efficiency {%*} rev. 03/20/97 Price Action Indicator (PAIN) {%*} rev. 07/31/97 Price Volume Rank {$%*} rev. 01/06/97 Random Walk Index {$%*} rev. 01/06/97 Rate of Change Since a Specific Date {%*} rev. 01/06/97 Rate of Change Since a Specific Date for version 6.5 or higher{#&} rev. 05/25/99 Regression Oscillator and the Slope/Close Indicator {%*} rev. 02/25/97 Relative Strength Index (RSI) Custom {#} rev. 12/11/98 Relative Volatility Index (RVI) {*} rev. 01/06/97 1 R squared , Chande & Kroll's {$%*} rev. 01/06/97 Slope of a Line {$%*} rev. 01/06/97 Slope of a Linear Regression Line {#} rev. 10/05/98 Standard Error Bands for MetaStock for DOS {$} rev. 01/06/97 Standard Error Bands for MetaStock for Windows {%*} rev. 01/06/97 STIX Oscillator {%*} rev. 01/06/97 Stochastic %D {$%*} rev. 01/06/97 Stochastic Relative Strength Index {$%*} rev. 01/06/97 The New Advance Decline Line {$%*} rev. 01/06/97 Tick Line Momentum Oscillator {$%*} rev. 01/06/97 Trading Channel Index {$%*} rev. 01/06/97 Ultimate Oscillator {$%*} rev. 04/29/97 Wilder's Volatility {*} rev. 01/06/97 WillSpread by Larry Williams {#} rev.01/13/98 What are the explorations Equis uses to determine the listed Hot Picks on the Equis Web site each week? 1996 August TASC Trader's Tips - Connors and Raschke's Historical Volatility System {$%*#} 1996 October TASC Trader's Tip - Freeburg Precious Metal Switch Fund system {$%*#} 1996 December TASC Trader's Tip - 2/20-Day EMA Breakout System {%*#} 1997 May TASC Trader's Tip -"Genesis of a Simple Futures Trading" {%*#} 1997 July TASC Trader's Tip - "Rainbow Charts" {%*} 1997 October TASC Trader's Tip - "Volatility Bands As A Long Term Strategy" {$%*#} 1997 November TASC Trader's Tip - Using Fibonacci Ratios and Momentum {%*#} 1997 December TASC Trader's Tip - Volatility % Indicator {%*#} 1998 January TASC - Breaking out of Price Channels - VIDYA Article {#} 1998 January TASC - Smoothing Techniques for more Accurate Signals {#} 1998 February TASC - Anchored Momentum {$%*#} 1998 February TASC - Double Tops and Double Bottoms{#} 1998 March TASC Trader's Tip - Adaptive Moving Average {#} 1998 May TASC Trader's Tip - Automatic Support and Resistance {%*#} 1998 June TASC Traders' Tip - Mutated Variables, Volatility and a New Market Paradigm {*#} 1998 July TASC Traders' Tip - Channel Analysis {#} 1998 July TASC Traders' Tip - A Volatility Trade in Gold {#} 1998 August TASC Traders' Tip - From Terms to Technical Tools {#} 1998 September TASC Trader's Tip - Simple Moving Average with Resistance and Support {#} 1998 October TASC Trader's Tip - "Combining Statistical and Pattern Analysis", Shark – 32 {#} 1998 October Futures Magazine - "Better Bollinger Bands" {#} 1999 Bonus TASC - Dynamic Multiple Time Frames {#} 1999 February TASC Trader's Tip - Stock Rhythm System {#} 1999 June TASC Trader's Tip - Sine-Wave Weighted Moving Average {#&} 2000 March TASC Trader's Tip - Hilbert Indicators Tell You When To Trade{&} 2000 May TASC Trader's Tip - Instantaneous Trendline and Sinewave Indicator as described by John Ehlers 2000 July TASC Trader's Tip - Bollinger Band Target Indicators{&} 2000 August TASC Trader's Tip - Breakout Range 2{#&} 2000 September TASC Trader's Tip - John Ehlers Squelch Control Indicator {#&} 2000 October TASC Trader's Tip - Ken Muranaka's Ichimoku Charts {#&} 2000 October TASC Trader's Tip - TC2000 Scans {#&} 2000 October TASC Trader's Tip - Brian Bell's Normalizing Indicators {#&} 2000 December TASC Trader's Tip - Hilbert Indicators {#&} 2001 February TASC Trader's Tip - Buff Dormeier's "Buff Averages"{#&} 2001 April - 1 TASC Trader's Tip - George Reyna's VWAP for Support & Resistance{#&} 2001 April - 2 TASC Trader's Tip - John Ehler's "Ehler's Filters{#&} 2001 May TASC Trader's Tip - Relative Performance Charting{#&} 2001 June - 1 TASC Trader's Tip - Gordon Gustafson's "Average True Range or Standard Deviation" {#&} 2001 June - 2 TASC Trader's Tip - Christian P. Fries "Elastic Volume Weighted Moving Average" {#&} 2001 July TASC Trader's Tip - Igor Livshin's "Balance of Power Indicator" {#&} 2001 August - 1 TASC Trader's Tip - John L. Momsen's "Crude Oil Seasonal Trade #2" {#&} 2001 August - 2 TASC Trader's Tip - John Ehler's "High Tech Mesa Adaptive Moving Averages" {#&} 2 Absolute Breadth Index The Absolute Breadth Index (ABI) is a market momentum indicator that was developed by Norman G. Fosback. The ABI shows how much activity, volatility, and change is taking place on the New York Stock Exchange while ignoring the direction prices are headed. You can think of the ABI as an "activity index". High readings indicate market activity and change, while low readings indicate lack of change. In Mr. Fosback's book, Stock Market Logic, he indicates that historically, high values typically lead to higher prices three to twelve months later. The MetaStock™ formula for the Absolute Breadth Index is: ABS ( Advancing Issues - Declining Issues ) To plot it: Create a composite security of the Advancing Issues - Declining Issues. In Windows versions use The DownLoader™ to create the composite or in the DOS versions use MetaStock's File Maintenance to create the composite. In MetaStock open the composite and plot the custom formula ABS( C ) on it. **For interpretation refer to the book Stock Market Logic by Norman G. Fosback Advance / Decline Line with Negative Volume The requirement is: Each security must have both the number of issues and the volume in the file. Advancing issues with advancing volume in one security and declining issues with declining volume in one security file. These files may be obtained from Reuters Trend Data by way of The DownLoader for Windows. You will also need to create a composite security of the Advance-Decline line, which is the advances - declines. The following steps will get you an advance-decline line with negative volume where applicable. Follow these steps once and save as a CHART. When you want to use it simply load the chart and the program will calculate the new volume plot using the new data. Create a NEW chart of the advancing issues. Create a NEW chart of the declining issues. Create a NEW chart of the advance-decline composite. Create a NEW INNER WINDOW on the declining issues chart. Delete the volume plot on the advance-decline composite chart. Copy the volume from the advancing issues chart and paste it into the new inner window on the declining issues chart. Drop the custom formula, P-V on the advancing volume plot in the declining issues chart, creating a new scale. Copy that plot to the empty inner window (where the volume was) of the advance-decline composite. Save that chart as the adv-decl chart (perhaps advdecl.mwc). This will be the chart you load to do your study of the advance-decline line with negative volume. 3 Adaptive Moving Average by Perry Kauffman Periods := Input("Time Periods",1,1000, 10); Direction := CLOSE - Ref(Close,-periods); Volatility := Sum(Abs(ROC(CLOSE,1,$)),periods); ER := Abs(Direction/Volatility); FastSC := 2/(2 + 1); SlowSC := 2/(30 + 1); SSC := ER * (FastSC - SlowSC) + SlowSC; Constant := Pwr(SSC,2); AMA := If(Cum(1) = periods +1, ref(Close,-1) + constant * (CLOSE - ref(Close,-1)),Prev + constant * (CLOSE - PREV)); AMA ADX/ADXR Custom (without rounding) Here are custom ADX and ADXR formulas that will plot the decimals after the calculation. The built-in indicators plot exactly as Welles Wilder plots them in his book, New Concepts in Technical Trading Systems. These custom indicators calculate the same way except they do not round as Wilder does. ADX Custom Periods:=Input("Time Periods",1,100,14); PlusDM:=If(H>Ref(H,-1) AND L>=Ref(L,-1), H-Ref(H,-1),If(H >Ref(H,-1) AND L<Ref(L,-1) AND H-Ref(H,-1)> Ref(L,-1)-L, H-Ref(H,-1),0)); PlusDI:=100*Wilders(PlusDM,Periods)/ATR(Periods); MinusDM:=If(L<Ref(L,-1) AND H<=Ref(H,-1), Ref(L,-1)-L,If(H>Ref(H,-1) AND L<Ref(L,-1) AND H-Ref(H,-1)<Ref(L,-1)-L, Ref(L,-1)-L,0)); MinusDI:=100*Wilders(MinusDM,Periods)/ATR(Periods) ; DIDif:=Abs(PlusDI-MinusDI); DISum:=PlusDI+MinusDI; ADXFinal:=100*Wilders(DIDif/DISum,Periods); ADXFinal ADXR Custom Periods:=Input("Time Periods",1,100,14); PlusDM:=If(H>Ref(H,-1) AND L<=Ref(L,-1), H-Ref(H,-1),If(H>Ref(H,-1) AND L<Ref(L,-1) AND H-Ref(H,-1)>Ref(L,-1)-L, H-Ref(H,-1),0)); PlusDI:=100*Wilders(PlusDM,Periods)/ATR(Periods); MinusDM:=If(L<Ref(L,-1) AND H<=Ref(H,-1), Ref(L,-1)-L,If(H>Ref(H,-1) AND L<Ref(L,-1) AND H-Ref(H,-1)<Ref(L,-1)-L, Ref(L,-1)-L,0)); MinusDI:=100*Wilders(MinusDM,Periods)/ATR(Periods) ; DIDif:=Abs(PlusDI-MinusDI); DISum:=PlusDI+MinusDI; ADXFinal:=100*Wilders(DIDif/DISum,Periods); ADXRCustom:= (ADXFinal+Ref(ADXFinal,LastValue(1-periods)))/2; ADXRCustom 4 Arms Index (TRIN ) The Arms Index, also known as TRIN, is a market indicator that shows the relationship between the number of stocks that increase or decrease in price (advancing/declining issues) and the volume associated with stocks that increase or decrease in price (advancing/declining volume). The Arms Index was developed by Richard W. Arms, Jr. in 1967. The Arms Index is primarily a short term trading tool. The Index shows whether volume is flowing into advancing or declining stocks. If more volume is associated with advancing stocks than declining stocks, the Arms Index will be less than 1.0; if more volume is associated with declining stocks, the Index will be greater than 1.0. The formula for the Arms Index is: (Advancing Issues / Declining Issues) / (Advancing Volume / Declining Volume) To calculate the Arms Index in MetaStock™ for Windows you will need to first collect the four pieces of data. Reuters Trend Data (RTD) supplies this data in two files. The tickers are X.NYSE-A (Advances, number and volume) and X.NYSE-D (Declines, number and volume). Dial/Data also supplies this data in two files. Advances, number and volume and Declines, number and volume. The tickers are @*NAZ_K and @*NDZ_K. CompuServe supplies this data in 4 files. The tickers are NYSEI (Advances)use the cusip 00000157 rather than the symbol; NYSEJ (declines); NYUP (Advance volume) and NYDN (decline volume). After the data has been collected follow these steps: For data from RTD or Dial Data In the DownLoader™ create a composite security of the Advances / Declines. In MetaStock open the composite. Create and plot the custom formula: C/V This gives you the Arms Index (TRIN). For data from CompuServe In the DownLoader create the two composites. o Advancing Issues / Declining Issues o Advancing Volume / Declining Volume In MetaStock open both composites. Tile the charts so they can both be viewed. Drag the plot of the Adv. Volume/Dec. Volume composite into an inner window in the Adv. Issues/Dec. Issues chart. Create the custom formula: C/P Plot this formula on top of the Adv. Volume/Dec. Volume plot (the Adv. Volume/Dec. Volume plot will turn a purplish color to signify the formula will be plotted on it). You will know have the Arms Index (TRIN) plotted. You can drag it to its own inner window if you prefer. 5 Aroon Indicators, by Tushar Chande For interpretation of the Aroon indicators refer to Tushar Chande's article "Time Price Oscillator" in the September, 95 Technical Analysis of Stocks & Commodities magazine. The Aroon down: 100* (14 - (( If (Ref (L,-1) = LLV( L ,14 ) ,1 , If ( Ref (L ,-2 ) = LLV ( L,14 ) ,2 , If ( Ref (L ,- 3 ) = LLV( L,14 ) ,3 ,If ( Ref (L ,-4 ) = LLV ( L ,14 ) ,4 ,If (Ref ( L ,-5 ) = LLV ( L ,14 ) ,5 ,If (Ref (L ,-6 ) = LLV( L,14 ) ,6 ,If ( Ref (L ,-7 ) = LLV ( L,14 ) ,7 ,If (Ref ( L ,-8 ) = LLV ( L ,14 ) ,8 ,If (Ref( L ,-9 ) = LLV( L,14 ) ,9 ,If ( Ref (L,-10) = LLV (L,14 ) ,10 ,If (Ref (L ,-11) = LLV( L,14 ) ,11 ,If (Ref(L,-12 ) = LLV(L ,14) ,12,If ( Ref (L,-13) = LLV (L ,14 ) ,13 ,If ( Ref ( L,-14) = LLV( L,14 ) ,14 ,0) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) / 14 The Aroon up: 100 * ( 14 - ( ( If (Ref (H ,-1) = HHV(H ,14 ) ,1 ,If (Ref (H ,-2 ) = HHV (H ,14 ) ,2 ,If (Ref (H ,- 3 ) = HHV(H ,14 ) ,3, If (Ref (H ,-4 ) = HHV(H ,14 ) ,4 ,If (Ref (H ,-5 ) = HHV(H ,14 ) ,5 ,If (Ref (H ,-6 ) = HHV(H ,14 ) ,6 ,If (Ref (H,-7 ) = HHV(H ,14 ) ,7 ,If (Ref (H ,-8 ) = HHV(H ,14) ,8 , If (Ref (H ,-9 ) = HHV(H ,14) ,9 ,If (Ref (H ,-10 ) = HHV(H ,14 ) ,10 ,If (Ref (H ,-11 ) = HHV(H ,14) ,11 ,If (Ref (H ,-12 ) = HHV(H ,14) ,12 ,If (Ref(H ,-13) = HHV(H ,14 ) ,13 ,If (Ref (H ,-14 ) = HHV(H ,14 ) ,14 ,0 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) / 14 The Aroon Oscillator = Aroon up - Aroon down. ** The UP and DOWN Aroon indicators are to be plotted in the same inner-window. ** These are constructed using 14 time periods, you can alter this by replacing every entry of 14 with the desired time period. "Average-Modified Method" From The New Commodity Trading Systems and Methods, by Perry J. Kaufman Chapter 4 - Moving Averages, pg. 60. This formula is for version 6.5 of MetaStock for Windows 95 & NT only and cannot be written in previous version. This is a modified simple moving average. The formula will prompt you for input for the number of time periods to use in the moving average. Day:=Cum(1)+1; Z:=Input("Periods",2,1000,5); MV:=(1/Z); If(Day<(Z+2),C,If(day=(Z+2),Mov(C,LastValue(Z),S),PREV+(MV*(C-PREV)))) 6 Bollinger Bands "Trading bands are one of the most powerful concepts available to the technically based investor, but they do not, as is commonly believed, give absolute buy and sell signals based on price touching the bands. What they do is answer the perennial question of whether prices are high or low on a relative basis. Armed with this information, an intelligent investor can make buy and sell decisions by using indicators to confirm price action. But before we begin, we need a definition of what we are dealing with. Trading bands are lines plotted in and around the price structure to form an ''envelope". It is the action of prices near the edges of the envelope that we are particularly interested in…." Taken from Stocks & Commodities, V. 10:2 (47-51): Using Bollinger Bands by John Bollinger For further interpretation refer to the above article found in the February 1992 issue of Technical Analysis of Stocks and Commodities. Bollinger Bands are built into MetaStock™, however you may prefer to use the individual custom formulas. The custom formulas for the components of the Bollinger Bands are as follows: Upper Band: mov( C,20,S ) + ( 2 * ( std( C,20 ) ) ) Lower Band: mov( C,20,S ) - ( 2 * ( std( C,20 ) ) ) Middle Band: mov( C,20,S ) %B : ( ( C+2 * std( C,20 ) - mov( C,20,S ) ) / ( 4 * std( C,20 ) ) ) * 100 Band width : ( ( mov( C,20,S) + ( 2 * ( std( C,20 ) ) ) )- ( mov( C,20,S) - ( 2 * ( std( C,20 ) ) ) ) ) / mov( C,20,S) Breadth Thrust The Breadth Thrust indicator is a market momentum indicator developed by Dr. Martin Zweig. The Breadth Thrust is calculated by taking a 10-day exponential moving average of the advancing issues divided by the advancing plus declining issues. According to Dr. Zweig a Breadth Thrust occurs when, during a 10-day period, the Breadth Thrust indicator rises from below 40 percent to above 61.5 percent. A "Thrust" indicates that the stock market has rapidly changed from an oversold condition to one of strength, but has not yet become overbought. Dr. Zweig also points out that there have only been 14 Breadth Thrusts since 1945. The average gain following these 14 Thrusts was 24.6 percent in an average time frame of 11 months. Dr. Zweig also points out that most bull markets begin with a Breadth Thrust. To plot the Market Breadth in MetaStock™ for Windows you will need to: Create a composite security of the Advancing Issues + Declining Issues in The DownLoader™. 7 In MetaStock open a chart of the composite and a chart of the Advancing Issues. Tile the charts so you can see both of them on the screen. Drag the plot of the composite into the chart of the Advancing Issues. Create the custom indicator: mov( C / P, 10, E ), then plot it on top of the plot of the composite (the composite's plot will turn a purplish color ). If you get a flat line then it was not plotted directly on top of the composite's plot. You can then right-click on the Breadth Thrust, select Breadth Thrust Properties, go to the Horizontal Lines page and add horizontal lines at 40 and 60. To plot it in MetaStock for DOS: Create a composite security of the Advancing Issues + Declining Issues. Open a chart of the composite and plot the custom indicator "C" on the composite. Press Ctrl B and select Save to Indicator Buffer Open the chart of the Advancing Issues Press Ctrl B and select Restore from Indicator Buffer Create the custom indicator: mov( C / P, 10, E ) and plot it CCI Moving Average Crossover System Test System Explanation: Buy when the Moving Average crosses up through the CCI and sell on the reverse condition System Formula: Enter Long: When( CCI( opt1 ) ,< ,Mov( CCI( opt1 ) ,opt2 ,E ) ) AND When( Ref( CCI(opt1) ,-1) ,>= ,Ref( Mov( CCI( opt1 ) ,opt2 ,E ) ,-1 ) ) Enter Short: When( CCI( opt1 ) ,> ,Mov( CCI( opt1 ) ,opt2 ,E ) ) AND When( Ref( CCI(opt1) ,-1) ,<= ,Ref( Mov( CCI( opt1 ) ,opt2 ,E ) ,-1 ) ) Optimization Variables: Opt1: Min = 5 Max = 40 Step = 1 Opt2: Min = 5 Max = 40 Step = 1 8 Chande's Momentum Oscillator The following are MetaStock formulas for Tuschar Chande's Momentum Oscillator. For interpretation refer to the book The New Technical Trader, by Tuschar Chande and Stanley Kroll. CMO_1 Sum( If( C ,> ,Ref( C, -1 ) , ( C - Ref( C ,-1 ) ) ,0 ) ,14 ) CMO_2 Sum( If( C ,< ,Ref( C ,-1 ) , ( Ref( C ,-1 ) - C ) ) ,0 ) ,14 ) CMO_Final 100 * ( ( Fml( "CMO_1" ) - Fml( "CMO_2" ) ) / ( Fml( "CMO_1" ) + Fml( "CMO_2" ) ) ) You could also combine the above three formulas into one formula. The syntax would be: 100*((Sum(If(C,>,Ref(C,-1),(C-Ref(C,-1)),0),14))-(Sum(If(C,<,REF(C,-1),(REF(C,-1)-C),0),14))) /((Sum(If(C,>,Ref(C,-1),(C-Ref(C,-1)),0),14)+(Sum(If(C,<,REF(C,-1),(REF(C,-1)-C),0),14)))) "Combining Trend and Oscillator Signals" System Test The information for this test was published in the December 1996 issue of Technical Analysis of Stocks and Commodities. The test appears in the article "Combining Trend and Oscillator Signals" by Jeremy G. Konstenius. Mr. Konstenius describes a trading system that combines Linear Regression and Moving averages to generate trades. To create this test in MetaStock do the following: Run MetaStock version 6.0. Click Tools|System Tester|New. Type a name for the test in the Name column. Enter the following System Test rules and options. ENTER LONG: C>Mov(C,OPT1,S) AND LinRegSlope(C,OPT2)>LinearReg(LinRegSlope(C ,OPT3),50) CLOSE LONG: C<Mov(C,OPT1,S) OR LinRegSlope(C,OPT2)<LinearReg(LinRegSlope(C ,OPT3),50) ENTER SHORT: C<Mov(C,OPT1,S) AND LinRegSlope(C,OPT2)<LinearReg(LinRegSlope(C ,OPT3),50) CLOSE SHORT: C>Mov(C,OPT1,S) OR LinRegSlope(C,OPT2)>LinearReg(LinRegSlope(C ,OPT3),50) OPTIMIZE: OPT1: Minimum 5 Maximum 50 Step 5 OPT2: Minimum 5 Maximum 50 Step 5 OPT3: Minimum 5 Maximum 50 Step 5 Initial Equity: Any amount. Positions: Long and Short Trade Price: Close Trade delay: 0 The author uses weekly data and a $50 round turn commission. You can modify this test by changing the distance from Minimum to Maximum or the Step used in each OPT variable. 9 Commodity Channel Index Buy & Sell Signals This system generates buy and sell signals based on the criteria using the Commodity Channel Index indicator. It enters a long position when yesterday's 14 period CCI is greater than -250 and today's 14 period CCI is less than -250. It will close long according to the criteria you specify in close long. It enters a short position when yesterday's 14 period CCI is less than 250 and today's 14 period CCI is greater than 250 and closes short according to the criteria you specify in close short. Enter Long: When( Ref(CCI( 14 ) ,-1 ) ,> ,-250 ) AND When(CCI( 14 ) ,< ,-250 ) Close Long: When( enter your criteria here ) Enter Short: When( Ref(CCI( 14 ) ,-1 ) ,< ,250 ) AND When(CCI( 14 ) ,> ,250 ) Close Short: When( enter your criteria here ) Comparative Relative Strength in MetaStock™ for Windows Comparative Relative Strength charts can be useful in deciding which security to buy, by helping to pinpoint the best performer. They can also be useful in developing spreads, i.e., purchase of the best performer "long", and selling the weaker issues "short." Comparative Relative Strength can be applied in MetaStock for Windows as follows: Creation of a Template for Comparative Relative Strength (For this illustration, we assume an equity/stock is compared to the S&P 500, both of which must first have been collected from your vendor. Both data files should be in the same periodicity.) 1. Load the S&P 500. 2. Load the equity, or whatever you wish to find the relative strength for. 3. Drag the S&P 500 plot into a new inner window of the equity. (You may need to click Stack first.) 4. Close the S&P 500 chart. 5. Create a custom indicator: Div(close, p) 6. Drag the custom indicator into the inner window containing the S&P 500 plot, moving it over the plot until the plot changes to a pink or lavender color, then release your mouse button. (This is called dragging and dropping an indicator on an indicator. The new indicator will plot in the same window as the S&P 500 plot.) You have two options here: o You can change the color of the S&P 500 plot to be the same as the chart background color, so that it is effectively invisible. (Double-click the S&P 500 plot to get to its "properties", then choose the color you need from the Colors list.) o You can give both plots different colors so you can tell which is which. 7. Save this chart as a Template. (File|Save As, set "Save File As Type" to Template, and give it a name, such as CMPRELST.MWT.) Any time you want to see Comparative Relative Strength of an equity against the S&P 500, apply this template to the equity's chart. Note: if you should move the data file against which you are comparing, such as the S&P 500, this template will no longer work, and would have to be recreated. 10 To Run an Exploration Using Comparative Relative Strength 1. Load the S&P 500 (or whatever you want to compare against). 2. Create a custom indicator of the Close. 3. Drag and drop this indicator on the S&P 500 (or whatever...). (Note: the S&P 500 plot must change to pink/lavender color before you drop it.) The indicator will plot. 4. Select the indicator plot (by single-clicking with the left mouse button on the line). 5. Do an Exploration with DIV(Close,p) in column A, and specify which directory to explore. 6. The results are displayed in the Exploration report. (P is a special variable that points at the last indicator plotted or selected.) Comparative Relative Strength Exploration To construct a Comparative Relative Strength Exploration in MetaStock for Windows perform the following steps: Load the S & P 500. Create a custom indicator of the Close. Plot the indicator on the S & P 500. Select this plot by clicking on it. Create an exploration with div(C,P) in column A and also specify which directory to explore. Note: ( the P variable references the selected indicator in the active chart which would be the close) Coppock Curve The Coppock Curve was developed by Edwin Sedgwick Coppock in 1962. It was featured in the November 94 issue of Technical Analysis of Stocks & Commodities, in the article "The Coppock Curve", written by Elliot Middleton.: Taken from Stocks & Commodities, V. 12:11 (459-462): The Coppock Curve by Elliott Middleton "We are creatures of habit. We judge the world relative to what we have experienced. If we're shopping for a mortgage and rates have been in the teens (as they were in the early 1980s) and then drop to 10%, we are elated. If, however, they've been at 8% and then rise to 10%, we are disappointed. It all depends on your perspective. The principle of adaptation-level applies to how we judge our income levels, stock prices and virtually every other variable in our lives. Psychologically, relativity prevails.. SIMPLEST FORMS The moving average is the simplest form of adaptation-level. Moving average crossover rules accurately signal the onset of periods of returns outside the norm, whether positive or negative. This makes moving average crossovers useful to traders who want to get a boost on entering or exiting stocks or funds. The oscillator is also based on adaptation-level, although in a slightly different way. Oscillators generally begin by calculating a percentage change of current price from some previous price, where the previous price is the adaptation-level or reference point. The mind is attuned to percentage changes because they represent returns. If you bought Microsoft Corp. stock (MSFT) at $50 and it goes to $80, you make 60% before dividends. If you bought Berkshire Hathaway (BRK) at $4,000 and it rises to $4,030, the same dollar gain, you make 0.75% before dividends. It's the percentage change that counts. Relativity again. 11 Coppock reasoned that the market's emotional state could be determined by adding up the percentage changes over the recent past to get a sense of the market's momentum (and oscillators are generally momentum indicators ). So if we compare prices relative to a year ago - which happens to be the most common interval - and we see that this month the market is up 15% over a year ago, last month it was up 12.5% over a year ago, and 10%, 7.5% and 5%, respectively, the months before that, then we may judge that the market is gaining momentum and, like a trader watching for the upward crossover of the moving average, we may jump into the market." The MetaStock™ formula for the Coppock Curve is: (MOV(ROC(MOV(C,22,S),250,%),150,E))/100 The Derivative Moving Average The information for this test was published in the June 1996 issue of "Technical Analysis of Stocks and Commodities". The test appears in the article "The Derivative Moving Average" by Adam White, page 18. Mr. White describes this test as using a variation of the "tried-and-true simple moving average for entry signals and the "trend analysis index" for exit signals. System syntax: Enter Long: When(Ref(Mov(C,28,S),-1),=,LLV(Mov(C,28,S),4)) Close Long: When(Fml("TAI"),<,0.4) AND When(Ref(Fml("TAI").-1),>=,0.4) TAI formula ((HHV(Mov(C,28,S),5)-LLV(Mov(C,28,S),5))/C)*100 Detrended Price Oscillator The Detrended Price Oscillator (DPO) is an indicator that attempts to eliminate the trend in prices. Detrended prices allow you to more easily identify cycles and overbought/oversold levels. Here is the MetaStock custom formula for the DPO: Close-Ref( Mov(Close, X, Simple ), T) ***where X is the number of Time Periods for the Oscillator and T = X / 2 + 1. For example, a 20 period DPO would be: X = 20 T = (20/2 + 1) = 11 Close-Ref( Mov(Close, 20, Simple),11) 12 Disparity Index Steve Nison refers to the his Disparity Index "as a percentage display of the latest close to a chosen moving average". This can be defined in MetaStock using the formula: ( ( C - Mov( C ,X ,? ) ) / Mov( C ,X ,? ) ) * 100 ** where X is the number of time periods and ? is the calculation type of the moving average. For example: ( ( C - Mov( C ,13,E ) ) / Mov( C ,13 ,E ) ) * 100 ** where X = 13 time periods and ? = Exponential moving average. For interpretation on the Disparity Index refer to Steve Nison's book Beyond Candlesticks which is available from the Equis Direct catalogue Divergence between the Close and an Indicator The following formula will calculate the correlation of the Close and the MACD. It is written using a "long form" MACD so that the time periods used by the MACD may be changed. This indicator shows "divergence" between the close and the indicator: In the Windows versions of MetaStock the formula is: Correl(((Sum(Cum(1)*(Mov(C,12,E)-Mov(C,26,E)),100))-(Sum(Cum(1),100)* Sum((Mov(C,12,E)-Mov(C,26,E)),100)/100))/((Sum(Power(Cum(1),2),100))- (Power(Sum(Cum(1),100),2)/100)),((Sum(Cum(1)*C,100))-(Sum(Cum(1),100)* Sum(C,100)/100))/((Sum(Power(Cum(1),2),100))-(Power(Sum(Cum(1),100),2)/100)),12,0) The interpretation of the indicator output is as follows: - .08 (80%) and lower is divergence between the Close and the MACD. - 1 is very strong divergence. + 1 is very strong correlation. The formula was constructed this way so that most other indicators may be used in place of the MACD. For example here is the same indicator using the RSI(14): Correl(((Sum(Cum(1)*(RSI(14)),100))-(Sum(Cum(1),100)* Sum((RSI(14)),100)/100))/((Sum(Power(Cum(1),2),100))-(Power(Sum(Cum(1),100),2)/100)), ((Sum(Cum(1)*C,100))-(Sum(Cum(1),100)*Sum(C,100)/100))/((Sum(Power(Cum(1),2),100))- (Power(Sum(Cum(1),100),2)/100)),12,0) 13 Dynamic Momentum Oscillator In July 1996 Futures magazine, E. Marshall Wall introduces the Dynamic Momentum Oscillator (Dynamo). Please refer to this article for interpretation. He describes the Dynamo Oscillator to be: Dynamo = Mc - ( MAo - O ) where Mc = the midpoint of the oscillator MAo = a moving average of the oscillator O = the oscillator This concept can be applied to most any oscillator to improve its results. For example: Applying the Dynamo Oscillator to a 5-period %K slowed 3 periods Stochastic Oscillator would give: 50-(Mov(Stoch(5,3),21,S)-Stoch(5,3)) where: Mc = Stochastic Oscillator's midpoint = 50 MAo = Moving average of the Stochastic = Mov(Stoch(5,3),21,S O = Stochastic Oscillator = Stoch(5,3) This example applies it to an RSI oscillator: 50-(Mov(RSI(14),21,S)-RSI(14)) where: Mc = RSI's midpoint = 50 MAo = Moving average of the RSI = Mov(RSI(14),21,S O= RSI Oscillator = RSI(14) Elder Ray and The Force Index in MetaStock for Windows Please refer to Dr. Elder for interpretation. Here are the formulas for calculating the Elder Ray, and the Force Index. Bull Power: H - Mov(C,13,E) (High minus the moving average) Bear Power: L - Mov(C,13,E) (Low minus the moving average) To plot the Elder Ray: Create the two custom formulas from above. Open the base security. Plot a 13-Period Exponential Moving Average of the closing price in a new inner window. Drag the Bear Power formula and drop it in a new inner window. 14 Drag the Bull Power formula and drop it in a new inner window. Or, you may drop all three indicators in the same inner window if you wish. The formula for the force index is: This formula requires the presence of volume data to work V*(C-ref(C,-1)) To plot this formula as a histogram, after dropping the formula in an inner window, right click on the indicator and select properties. Select styles and choose the histogram. End Point Moving Average The End Point Moving Average was introduced in the October 95 issue of Technical Analysis of Stocks & Commodities in the article "The End Point Moving Average", by Patrick E. Lafferty. The exact formula for the End Point Moving average is as follows: ( 14 * Sum( Cum( 1 ) * C,14 ) - Sum( Cum( 1 ),14) * Sum( C,14) ) / (14 * Sum( Pwr( Cum( 1 ),2),14 ) - Pwr( Sum( Cum( 1 ),14 ),2 ) ) * Cum( 1 ) + (Mov(C,14,S) - Mov( Cum( 1 ),14,S) * (14 * Sum( Cum( 1 ) * C,14) - Sum( Cum( 1 ),14 ) * Sum( C,14) ) / (14 * Sum( Pwr( Cum( 1 ),2 ),14) - Pwr( Sum( Cum( 1 ),14 ),2 ) ) ) The above formula plots the last value of a linear regression line of the previous 14 periods. The Time Series Forecast takes this value and the slope of the regression line to forecast the next day and then plots this forecasted price as today's value. ***Please note the above formula is using 14 regression periods. If you desire to use different time periods you must change all instances of the number 14 to the desired number of time periods. Genesis of a Simple Futures Trading system It‟s quite easy to use MetaStock for Windows to duplicate the Genesis of a Simple Futures Trading system which is presented in the TASC May 97 issue's interview of Jay Kaeppel. In MetaStock for Windows, choose System Tester from the Tools menu. Click on the New button and enter in the following rules: SIGNAL FORMULAS Enter Long: Cross( Mov( Close,9,S), Mov( Close,50,S)) And Close > Mov( Close,80,S) Close Long: Cross( Mov( Close,50,S), Mov( Close,9,S)) And Close > Mov( Close,80,S) Enter Short: Cross( Mov( Close,50,S), Mov( Close,9,S)) And Close < Mov( Close,80,S) Close Short: Cross( Mov( Close,9,S), Mov( Close,50,S)) And Close < Mov( Close,80,S) When testing futures in MetaStock it‟s best to use a "points only" test. To do this, choose Options from the System Tester dialog and then Points Only Test from the Testing page. 15 To use The Explorer to screen for futures generating a recent signal with this system, choose The Explorer from the Tools dialog and enter in the following rules: COLUMN FORMULAS ColumnA: Buy Sign Cross( Mov( Close,9,S), Mov( Close,50,S)) And Close > Mov( Close,80,S) ColumnB: Shrt Sig Cross( Mov( Close,50,S), Mov( Close,9,S)) And Close < Mov( Close,80,S) FILTER SOURCE Filter Enabled: Yes Formula: colA = 1 OR colB = 1 Next choose Explore and The Explorer will search for and then display any futures, which have generated new signals. Historical Volatility System, Connors and Raschke's In the August 96 issue of Stocks & Commodities, Traders Tips, Allan McNichol explains how to use the MetaStock Explorer to search for securities based on Connors and Raschke's historical volatility system. The following is from his article. To do this go to The Explorer and choose the New button. Enter in the following column and filter formulas. Col A: Vol ratio Std(Log(C/Ref(C,-1)),5) / Std(Log(C/Ref(C,- 1)),99) Col B: NR4 day High - Low < Ref(LLV(H-L,3),-1) Col C: Inside High < Ref(High,-1) AND Low > Ref(Low,-1) Col D: High High Col E: Low Low Filter ColA < 0.5 AND (ColB = 1 OR ColC = 1) Run the exploration on the desired securities and display the report. Column A shows the ratio between the six-day and 100-day volatility. Column B displays a 1 if today is a NR4 day and a zero on all other days. Similarly, column C displays a 1 if today is an inside day. The high and low are displayed in columns D and E to determine the entry points. 16 Historical Volatility Daily With MetaStock™ for Windows, you can easily plot the 10 and 100 day Historical Volatility. First use the Indicator Builder to enter the following Custom indicators: Historical Volatility 10 day Std(Log(C/Ref(C,-1)),10)*Sqrt(365)*100 Historical Volatility 100 day Std(Log(C/Ref(C,-1)),100)*Sqrt(365)*100 Next plot both indicators in the same inner window. If the Scaling Options dialog appears, choose the Merge with Scale on Right (or left) option. I find it easier to see the Historical Volatility signals by combining the 10 and 100 day indicators into the following indicator. Historical Volatility Indicator Std(Log(C/Ref(C,-1)),10)/Std(Log(C/Ref(C,-1)),100) Plot this indicator in MetaStock for Windows, then click your mouse button on the indicator. Choose Historical Volatility Indicator Properties and then choose the Horizontal Lines page. Add a horizontal line at .5 and then choose the OK button. You now know the 10 period volatility is less than half the 100 period volatility anytime this indicator crosses below its horizontal line. To test trading systems using this indicator it would he helpful to use the alert function along with a trend following indicator, such as the following example: Enter Long: Cross(CLOSE,Mov(C,20,E)) AND Alert(Fml("Historical Volatility Indicator")<=5,10) Enter Short: Cross(Mov(C,20,E),CLOSE) AND Alert(Fml("Historical Volatility Indicator")<=5,10) This system will enter a long trade when the close has crossed above its 20 day moving average, and when Historical Volatility Indicator was .5 or lower within the last 10 days. The system will sell when the close crosses below its 20 day moving average, and when Historical Volatility Indicator was .5 or lower within the last 10 days. Use any indicator you would like, this just provides a basic example of how to use this indicator in a system test Historical Volatility Weekly With MetaStock™ for Windows, you can easily plot the 10 and 100 week Historical Volatility. First use the Indicator Builder to enter the following Custom indicators: Historical Volatility 10 week Std(Log(C/Ref(C,-1)),10)*Sqrt(365/7)*100 Historical Volatility 100 week Std(Log(C/Ref(C,-l)),100)*Sqrt(365/7)*100 Next plot both indicators in the same inner window. If the Scaling Options dialog appears, choose the Merge with Scale on Right (or left) option. I find it easier to see the Historical Volatility signals by combining the 10 and 100 week indicators into the following indicator. 17 Historical Volatility Indicator Std(Log(C/Ref(C,-1)),10)/Std(Log(C/Ref(C,-1)),100) Plot this indicator in MetaStock for Windows, then click your mouse button on the indicator. Choose Historical Volatility Indicator Properties and then choose the Horizontal Lines page. Add a horizontal line at .5 and then choose the OK button. You now know the 10 period volatility is less than half the 100 period volatility anytime this indicator crosses below its horizontal line. To test trading systems using this indicator it would he helpful to use the alert function along with a trend following indicator, such as the following example: Enter Long: Cross(CLOSE,Mov(C,20,E)) AND Alert(FmI("Historical Volatility Indicator")<=5,10) Enter Short: Cross(Mov(C,20,E),CLOSE) AND Alert(Fml("Historical Volatility Indicator")<=5,10) This system will enter a long trade when the close has crossed above its 20 week moving average, and when Historical Volatility Indicator was .5 or lower within the last 10 weeks. The system will sell when the close crosses below its 20 week moving average, and when Historical Volatility Indicator was .5 or lower within the last 10 weeks. Use any indicator you would like, this just provides a basic example of how to use this indicator in a system test The Investor Preference Index This indicator was discussed in the December 1997 Technical Analysis of Stocks & Commodities magazine, page 19. The article was written by Cyril V. Smith Jr. "This indicator, a long - term stock market investment tool, compares the performance of the S&P 500 to the New York Stock Exchange index to measure sentiment. The theory is that investors have a preference for certain types of investments, blue chips versus mid-cap, during phases of a bull market." To plot this in MetaStock for Windows, follow these instructions. When complete, if you save this as a chart, you will simply need to load the chart and it will recalculate using the newest data. Open a chart of the S&P 500. Open a chart of the New York Stock Exchange index. Drag the S&P 500 price plot into the NYSE chart. Drop the indicator listed below on the plot of the S&P 500. The plot will turn a different color when you are pointing at it. The resultant plot is the Investor Preference Index. Formula: Investor Preference Index: (Sum(Mov(ROC(Log(C),24,%)-ROC(Log(P),24,%),15,S)-Mov(ROC(Log(C),24,%)- ROC(Log(P),24,%),38,S),54)+1)*100 System test: Enter Long C=HHV(C,26) Close Long Fml("Investor Preference Index")<97.6 AND ROC(Fml("Investor Preference Index"),2,$)<=(-.04) 18 Insync Index The interpretation for the following formulas came from the article "The Insync Index", by Norm North, in Technical Analysis of Stocks & Commodities Jan 1995. All of these formulas are necessary for the last one, Insync Index to run properly. They are listed in the order in which they should be copied and pasted into the MetaStock Formula Builder BOLInSLB Mov( C ,20 ,S ) - 2 * ( Std( C ,20 ) ) BOLInSUB Mov( C ,20 ,S ) + 2 * ( Std( C ,20 ) ) BOLInS2 ( C - Fml( "BOLInSLB" ) ) / ( Fml( "BOLInSUB" ) - Fml( "BOLInSLB" ) ) BOLInSLL If( Fml( "BOLInS2" ) ,< , .05 ,-5 ,If( Fml( "BOLInS2" ) ,> ,.95 ,5 ,0 ) ) CCIInS If( CCI(14 ) ,> ,100 ,5 ,If ( CCI(14 ) ,< ,-100 ,-5 ,0 ) ) EMVInS2 EMV(10 ,S ) - Mov( EMV(10 ,S) ,10 ,S ) EMVInSB If( Fml( "EMVInS2" ) ,< ,0 ,If( Mov( EMV(10 ,S ) ,10 ,S ) ,< ,0 ,-5 ,0 ) ,0 ) EMVInSS If( Fml( "EMVInS2" ) ,> ,0 ,If( Mov( EMV(10 ,S ) ,10 ,S ) ,> ,0 ,5 ,0 ) ,0 ) MACDInS2 MACD( ) - Mov( MACD( ) ,10 ,S ) MACDinSB If( Fml( "MACDInS2" ) ,< ,0 ,If( Mov( MACD( ) ,10 ,S ) ,< ,0 ,-5 ,0 ) ,0 ) MACDInSS If( Fml( "MACDInS2" ) ,> ,0 ,If( Mov( MACD( ) ,10 ,S) ,> ,0 ,5 ,0 ) ,0 ) MFIInS If( MFI( 20 ) ,> ,80 ,5 , If( MFI( 20 ) ,< ,20 ,-5 ,0 ) ) PDOInS2 DPO( 18 ) - Mov( DPO( 18 ) ,10 ,S ) PDOInSB If( Fml( "PDOInS2" ) ,< ,0 ,If( Mov( DPO( 18 ) ,10 , S) ,< ,0 ,-5 ,0 ) ,0 ) PDOInSS If( Fml( "PDOInS2" ) ,> ,0 ,If( Mov( DPO ( 18 ) ,10 ,S) ,> ,0 ,5 ,0 ) ,0 ) ROCInS2 ROC( C ,10 ,$ ) - Mov( ROC( C ,10 ,$ ) ,10 ,S ) ROCInSB If( Fml( "ROCInS2" ) ,< ,0 ,If( Mov( ROC( C ,10 ,$ ) ,10 ,S ) ,< ,0 ,-5 ,0 ) ,0 ) ROCInSS Index 19 If( Fml( "ROCInS2" ) ,> ,0 ,If( Mov( ROC( C ,10 ,$ ) ,10 ,S ) ,> ,0 ,5 ,0 ) ,0 ) RSIInS If( RSI(14 ) ,> ,70 ,5 ,If( RSI(14 ), < ,30 ,-5 ,0 ) ) STO%dInS If( Stoch(14 ,3 ) ,> ,80 ,5 ,If( Stoch(14 ,3 ) ,< ,20 ,-5 ,0 ) ) STO%kInS If( Stoch(14 ,1) ,> ,80 ,5 ,If( Stoch(14 ,1 ) ,< ,20 ,-5 ,0 ) ) InSync Index 50 + Fml( "CCIInS" ) + Fml( "BOLInSLL" ) + Fml( "RSIInS" ) + Fml( "STO%kInS " ) + Fml( "STO%dInS" ) + Fml( "MFIInS" ) + Fml( "EMVInSB" ) + Fml( "EMVInSS" ) + Fml( "ROCInSS" ) + Fml( "ROCInSB" ) + Ref (Fml( "PDOInSS" ) ,-10 ) + Ref (Fml( "PDOInSB" ) ,-10 ) + Fml( "MACDInS S" ) + Fml( "MACDInSB" ) These formulas were provided by Barry Millman. All questions should be addressed to him at 73374.1364@Compuserve.com. Mr. Millman wrote these formulas using many Custom Formula slots for clarity and ease of understanding. Please note that the final formula `InSync Index' requires all of the previous formulas to be correct. Keltner Channels Keltner Channels are explained in the book The New Commodity Trading System and Methods by Perry Kaufman and were first introduced in the book How To Make Money in Commodities , by Chester W. Keltner. The syntax for the formulas in MetaStock™ are: Formula#1: NAME: The 10-Day Moving Average: FORMULA: MOV( (H+L+C)/3, 10, Simple ) Formula#2: NAME: Upper Keltner Band FORMULA: MOV((H+L+C)/3,10,S) + MOV((H-L),10,S) Formula#3: NAME: Lower Keltner Band FORMULA: MOV((H+L+C)/3,10,S) - MOV((H-L),10,S) ** All three formulas must be plotted. In the System Tester, a BUY or a COVER SHORT Signal would occur when C > Upper Keltner Band and a SELL or a SELL SHORT Signal would occur when C < Lower Keltner Band ** Thus, the system is always either long or short. For interpretation refer to either of the two books listed above. 20 Ken Roberts' Formulas 12 Month High/Low (Contract) This is a Trinary wave indicator that you put into its own inner window. This formula is used only on specific contracts that have less than 1 year of data. It will plot a +1 on days that have made a new contract high and a -1 on days that have made a new contract low. If(Highest(High)>Ref(Highest(High),-1),+ 1,If(Lowest(Low)<Ref(Lowest(Low),-1),-1,0)) 12 Month High/Low (Continuous) This is a Trinary wave indicator that you put into its own inner window. This formula is used only on continuous contracts that have more than 1 year of data. It will plot a +1 on days that have made a new contract high and a -1 on days that have made a new contract low. If(HHV(High,252)>Ref(HHV(High,252),-1),+1,If(LLV(Low,252)<Ref(LLV(Low,252),-1),-1,0)) 50% Retracement (Contract) This is an indicator that is applied directly onto your price data chart. This formula is used only on specific contracts that have less than 1 year of data. It will plot a line on your chart that will show at any point in time what the 50% retracement will be. Note: This line will change as the security makes new high‟s or new low‟s, showing what the 50% retracement would be at that time. ((Highest(High)-Lowest(Low))/2)+Lowest(Low) 50% Retracement (Continuous) This is an indicator that is applied directly onto your price data chart. This formula is used only on continuous contracts that have more than 1 year of data. It will plot a line on your chart that will show at any point in time what the 50% retracement will be. Note: This line will change as the security makes new high‟s or new low‟s, showing what the 50% retracement would be at that time. ((HHV(High,252)-LLV(Low,252))/2)+LLV(Low,252) Sideways Channels Exploration Periodicity: Daily Formulas ColumnA: Top Mov(Peak(1,H,1),45,S)-Ref(Mov(Peak(1,H,1),45,S),-45) ColumnB: Bottom Mov(Trough(1,L,1),45,S)-Ref(Mov(Trough(1,L,1),45,S),-45) Filter: ColA < 1 AND ColA > -1 AND ColB < 1 AND ColB > -1 21 Martin Pring's KST Formulas The KST indicator was developed by Martin J. Pring. The name KST comes from "Know Sure Thing". The KST is constructed by summing four smoothed rates of change. For more interpretation refer to Martin Pring's article "Summed Rate of Change (KST)" in the September 92 issue of TASC. The following formulas are MetaStock formulas for the KST. DAILY KST SIMPLE MOVING AVERAGE (Mov(Roc(C,10,%),10,S)*1) + (Mov(Roc(C,15,%),10,S)*2) + (Mov(Roc (C,20,%),10,S)*3) + (Mov(Roc(C,30,%),15,S)*4) LONG-TERM MONTHLY KST SIMPLE MOVING AVERAGE ( (Mov(Roc(C,9,%),6,S)*1) + (Mov(Roc(C,12,%),6,S)*2) + (Mov(Roc(C ,18,%),6,S)*3) + (Mov(Roc(C,24,%),9,S)*4) ) / 4 INTERMEDIATE KST SIMPLE MOVING AVERAGE (Mov(Roc(C,10,%),10,S)*1) + (Mov(Roc(C,13,%),13,S)*2) + (Mov(Roc (C,15,%),15,S)*3) + (Mov(Roc(C,20,%),20,S)*4) INTERMEDIATE KST EXPONENTIAL MOVING AVERAGE (Mov(Roc(C,10,%),10,E)*1) + (Mov(Roc(C,13,%),13,E)*2) + (Mov(Roc (C,15,%),15,E)*3) + (Mov(Roc(C,20,%),20,E)*4) LONG-TERM KST EXPONENTIAL MOVING AVERAGE (Mov(Roc(C,39,%),26,E)*1) + (Mov(Roc(C,52,%),26,E)*2) + (Mov(Roc (C,78,%),26,E)*3) + (Mov(Roc(C,109,%),39,E)*4) SHORT-TERM KST WEEKLY EXPONENTIAL MOVING AVERAGE (Mov(Roc(C,3,%),3, E)*1) + (Mov(Roc(C,4,%),4, E)*2) + (Mov(Roc(C,6,%),6, E)*3) + (Mov(Roc(C,10,%),8, E)*4) 22 Kurtosis Indicator The Kurtosis is a market sentiment indicator. The MetaStock formula for the Kurtosis is as follows: Mov(Mov(Mo(3)-Ref(Mo(3),-1),66,E),3,S) The Kurtosis is constructed from three different parts. The Kurtosis, the Fast Kurtosis(FK), and the Fast/Slow Kurtosis(FSK). The Kurtosis(K) portion of this calculation is mo(3)-ref(mo(3),-1). Which is today's Kurtosis - yesterday's Kurtosis. The Fast Kurtosis(FK) is mov(K,66,E) mov(mo(3)-ref(mo(3),-1,66,E). Which is the Kurtosis smoothed with a 66 period exponential moving average. The Fast/Slow Kurtosis(FSK) is the complete formula mov(mov(mo(3)-ref(mo(3),-1),66,E),3,S). Which is the FK smoothed with 3 period simple moving average. **You may want to experiment with different time periods to optimize the results. For example, to calculate a 4 period Kurtosis, a 50 period FK and a 10 period FSK, use the following formula: mov(mov(mo(4)-ref(mo(4),-1),50,E),10,S) MACD Histogram These two formulas are for the Dr. Alexander Elder indicators. The custom formula for the MACD Histogram is: ( Mov( C,12,E ) - Mov( C,26,E ) ) - Mov( ( Mov( C,12,E ) - Mov( C,26,E ) ),9,E ) The custom formula for the Weekly MACD Histogram utilizing daily data is: Mov(If(DayOfWeek()=5,C,Peak(1,If(DayOfWeek()=5,C,0),1)),60,E)- Mov(If(DayOfWeek()=5,C,Peak(1,If(DayOfWeek()=5,C,0),1)),130,E)- Mov(Mov(If(DayOfWeek()=5,C,Peak(1,If(DayOfWeek()=5,C,0),1)),60,E)- Mov(If(DayOfWeek()=5,C,Peak(1,If(DayOfWeek()=5,C,0),1)),130,E),45,E) Market Facilitation Index The following formulas were constructed using interpretation from Technical Analysis of Stocks & Commodities Magazine June 1994, article "The Market Facilitation Index", by Gary Hoover. Taken from Stocks & Commodities, V. 12:6 (253-254): The Market Facilitation Index by Gary Hoover "Applying technical analysis to developing trading signals begins with the investigation of price movement and often incorporates volume studies to improve trading accuracy. The Market Facilitation Index (MFI) is one indicator that synthesizes both price and volume analysis. The MFI is the ratio of the current bar's range (high-low) to the bar's volume. 23 The MFI is designed to gauge the efficiency of price movement. The efficiency is measured by comparing the current bar's MFI value to the previous bar's MFI value. If the MFI increased, then the market is facilitating trade and is more efficient, implying that the market is trending. If the MFI decreased, then the market is becoming less efficient, which may indicate a trading range is developing that may be a trend reversal…." Range: High-Low MFI: Fml("Range") / Volume Efficiency: If(Fml("MFI"),>,Ref(Fml("MFI"),-1),1, If(Fml("MFI"),<,Ref(Fml("MFI"),-1),-1, If(Fml("MFI"),=,Ref(Fml("MFI"),- 1),0,0))) Where: +1 = increase -1 = decrease 0 = unchanged Market Facilitation Comparison: If(V,>,Ref(V,-1),If(Fml("MFI"),>,Ref(Fml("MFI"),-1) ,1,If(Fml("MFI"),<,Ref(Fml("MFI"),-1),2,0)),If(V,< ,Ref(V,- 1),If(Fml("MFI"),>,Ref(Fml("MFI"),-1),3,If( Fml("MFI"),<,Ref(Fml("MFI"),-1),4,0)),0)) Where: 1 = +,+ 2 = +,- 3 = -,+ 4 = -,- Market Facilitation Index Expert Advisor In the August 1996 Stocks & Commodities, an article by Thom Hartle titled "The Market Facilitation Index" showed how to color bars to identify chart patterns based on changes in the market facilitation index and volume. Here is how to do this in MetaStock 6.0's new Expert Advisor. The first step is to create a new expert by choosing Expert Advisor from MetaStock's Tool menu, and then choose New from the Expert Advisor. Name the expert "Market Facilitation Index", enter any notes you like and then click on the Highlights tab. Enter the following Highlights by choosing New, the color and then entering the following formulas: Green Bar (Green Bar) ROC((H-L)/V,1,$) > 0 AND ROC(V,1,$) > 0 Fade Bar (Blue Bar) ROC((H-L)/V,1,$) < 0 AND ROC(V,1,$) < 0 Fake Bar (Dk Gray Bar) ROC((H-L)/V,1,$) > 0 AND ROC(V,1,$) < 0 Squat Bar (Red Bar) ROC((H-L)/V,1,$) < 0 AND ROC(V,1,$) > 0 24 After you have entered the four highlights click OK to finish editing the expert's properties. You can now right-click on the heading or background of any chart. Next select Expert Advisor and then Attach from the Chart shortcut menu. Attach the market facilitation index expert, and it will highlight the four market facilitation patterns that were discussed in Hartle's article. Note: You can save a chart as a template with this expert attached, and then any time you apply the template to a chart the market facilitation index expert will automatically attach to the chart. Market Thrust Oscillator The following formulas were taken from the article, "The Cumulative Market Thrust Line", by Tushar Chande, in the December 1993 issue of Technical Analysis of Stocks & Commodities. Taken from Stocks & Commodities, V. 11:12 (506-511): The Cumulative Market Thrust Line by Tushar S. Chande, PhD. "STOCKS & COMMODITIES contributor Tushar Chande originally introduced the concept of market thrust in August 1992 as a method by which to overcome the limitations of the Arms index. Since then, variations have been suggested on the theme and here, Chande offers the variation of a cumulative market thrust line, in which market thrust is cumulated to calculate a volumetric advance-decline line by including the effect of up and down volume." Composite securities are created from 4 separate files. Advances, Declines, Upvolume, Downvolume. The article side bar presupposes the user has these four files. Reuters Trend Data (RTD) supplies this data in two files. The tickers are X.NYSE-A (Advances, number and volume) and X.NYSE-D (Declines, number and volume). To use these two files, you must utilize two different custom formulas and the indicator buffer in MetaStock™ for DOS. CompuServe supplies this data in 4 files. The tickers are NYSEI (Advances); NYSEJ (declines); NYUP (Advance volume) and NYDN (decline volume). Dial/Data supplies this data in two files. Advances, number and volume and Declines, number and volume. The tickers are @*NAZ_K and @*NDZ_K. For the Windows versions of MetaStock: For RTD and Dial Data: #1: C * V #2: 100 * ( ( P - ( C * V ) ) / ( ( P + ( C * V ) ) ) ) To plot it: Load advances, plot formula #1. Load declines. Drag the plotted formula #1 from the advances in to the declines chart. Plot the thrust indicator formula (#2) directly on top of the plotted formula #1 in the declines chart. For CompuServe data: #1: C #2: 100 * ( ( P - C ) / ( ( P + C ) ) ) Top plot it: Create a composite of the Advances * Up Volume Create a composite if the Declines * Down Volume Load advances composite , plot formula #1. 25 Load declines composite. Drag the plotted formula #1 from the advances in to the declines chart. Plot the thrust indicator formula (#2) directly on top of the plotted formula #1 in the declines chart. ** To create the cumulative thrust oscillator line perform the same steps as above except change formula #2 to: Cum(100*(P-C)/(P+C)) for CompuServe data Cum(100*(P-(C*V))/(P+(C*V))) for RTD and Dial Data ** To create the cumulative market thrust line, the formula is: Cum(P-C) for CompuServe data Cum(P-(C*V)) for RTD and Dial Data For the DOS versions of MetaStock: Formulas: For RTD and Dial Data: #1: C * V #2: 100 * ( ( P - ( C * V ) ) / ( ( P + ( C * V ) ) ) ) To plot it: Load advances, plot formula #1. Ctrl + B and Save to the buffer. Load declines. Ctrl + B and Restore from the buffer. Plot the thrust indicator formula (#2). For CompuServe data: #1: C #2: 100 * ( ( P - C ) / ( ( P + C ) ) ) Top plot it: Create a composite of the Advances * Up Volume Create a composite if the Declines * Down Volume Load the advances composite, plot formula #1. Ctrl + B and Save to the buffer. Load the declines composite. Ctrl + B and Restore from the buffer. Plot the thrust indicator formula (#2). You now have the thrust indicator plotted exactly as the article discusses. Mass Index The Mass Index was designed to identify trend reversals by measuring the narrowing and widening of the range between the high and low prices. As the range widens the Mass Index increases; as the range narrows the Mass Index decreases. The MASS Index appeared in the June 92 Technical Analysis of Stocks & Commodities article "The Mass Index", by Donald Dorsey. Taken from Stocks & Commodities, V. 10:6 (265-267): The Mass Index by Donald Dorsey "Range oscillation, not often covered by students of technical analysis, delves into repetitive market patterns during which the daily trading range narrows and widens. Examining this pattern, Donald Dorsey explains, allows the technician to forecast market reversals that other indicators may miss. Dorsey proposes the use of range oscillators in his mass index." The following is the MetaStock formula for Sum(Mov( ( H - L ) ,9 ,E) / Mov(Mov( ( H - L ) ,9 ,E) ,9 ,E ) ,25 ) 26 McClellan Oscillator The McClellan Oscillator, developed by Sherman and Marian McClellan, is a market breadth indicator that is based on the smoothed difference between the number of advancing and declining issues on the New York Stock Exchange. The McClellan Oscillator is one of the most popular breadth indicators. Buy signals are typically generated when the McClellan Oscillator falls into the oversold area of -70 to -100 and turns up. Sell signals are generated when the oscillator rises into the overbought area of +70 to +100 and then turns down. Extensive coverage of the McClellan Oscillator is provided in their book Patterns for Profit . To plot the McClellan Oscillator, create a composite security in The DownLoader™ of Advancing Issues minus Declining Issues. Open a chart of the composite in MetaStock™ and plot this custom indicator. Mov(CLOSE,19,EXPONENTIAL) - Mov(CLOSE,39,EXPONENTIAL) McClellan Summation Index The McClellan Summation Index is a market breadth indicator developed by Sherman and Marian McClellan. It is a long-term version of the McClellan Oscillator and its interpretation is similar to that of the McClellan Oscillator except that it is more suited to major trend reversals. For more extensive coverage of the index refer to the book Patterns for Profit, by Sherman and Marian McClellan. McClellan suggests the following rules for use with the summation Index: Look for major bottoms when the Summation Index falls below -1300. Look for major tops to occur when a divergence with the market occurs above a Summation Index level of +1600. The beginning of a significant bull market is indicated when the Summation Index crosses above +1900 after moving upward more than 3600 points from its prior low (e.g. the index moves from - 1600 to +2000). The summation index is plotted by adding the Cum function to the McCllellan Oscillator. The formula is Cum(Mov(C,19,E) - Mov(C,39,E)). Modified VIX Indicator The interpretation for the Modified Volatility Index was taken from the article Modifying The Volatility Index, by S. Jack Karczewski, in the April 1995 issue of TASC. The Volatility Index (VIX) is the implied volatility of a group of Standard & Poors 100 index options. It is updated by the CBOE. This formula assumes you can get the VIX information downloaded from some data vendor, such as Dial Data, Telescan, or DBC Signal. The custom formula you should create is the Modified VIX: ( ( ( P - Mov( P ,15 ,E ) ) / Mov( P ,15 ,E ) ) * ( 100 * 33 * 2 ) ) * ( Sqrt( 252 ) / Sqrt( 15 ) / C ) The steps to get the actual charts are: 27 For the DOS version of MetaStock: 1 - Open the chart of the OEX 2 - Plot the Custom Formula: CLOSE (You may have to add this formula also) 3 - Press Ctrl + B and Save to Buffer. 4 - Open the chart of the VIX. 5 - Press Ctrl + B and Restore Buffer. 6 - Plot the formula for the Modified VIX. For the Windows versions of MetaStock: 1 - Open the chart of the OEX 2 - Open the chart of the VIX. 3 - Drag the plot of the OEX into the chart of the VIX. 4 - Plot the formula for the Modified VIX directly on top of the OEX plot. You now have a plot of the Modified VIX. **For interpretation of the Modified VIX refer to Mr. Karczewski's article. Money Flow Index Taken from Stocks & Commodities, V. 12:8 (321-324): SIDEBAR: The Money Flow Index "The money flow index (MFI) is a volume-weighted form of the relative strength index (RSI). Instead of using up closes versus down closes, the MFI compares today's average price to yesterday's average price and then weighs the average price by volume to calculate money flow (MF). The ratio of the summed positive and negative money flows are then normalized to be on a scale of zero to 100." Here are the MetaStock™ formulas for the Money Flow Index: Positive Money Flow: sum ( if ( typ( ) ,> ,ref ( typ ( ) ,-1 ) ,V * typ ( ) ,0 ) , PERIODS) Negative Money Flow: sum ( if ( typ( ) ,< ,ref ( typ( ) ,-1) ,V * typ ( ) * -1 ,0 ) , PERIODS) Money Flow Ratio: fml ( "Positive Money Flow" ) / fml ( "Negative Money Flow" ) Money Flow Index: 100 - ( 100 / ( 1 + fml ( "Money Flow Ratio" ) ) ) ***The time periods are controlled by PERIODS in the Positive and Negative Money Flow formulas. 28 Moving Average of Only One Day of a the Week Frequently we get requests for a formula that would take only one day of the week and average them for several weeks. For example construct a moving average of only the Fridays. This can be done in MetaStock™ for Windows by using the following formula. The following MetaStock formula is for a moving average of the Friday of every week, if you want it calculated on any other day you would substitute a 1 for Monday, 2 for Tuesday, 3 for Wednesday, and 4 for Thursday. The number of day you wanted would replace the two 5's already in the formula. This moving average is currently a 6 week or 6 Friday moving average. If you wanted to change it to another periodicity you would change the 30 to the number of weeks or specific days multiplied by 5. In other words if you wanted a 4 day moving average of Friday you would change the 30 to 4*5 or 20. Mov(If(DayOfWeek( )=5,C,Peak(1,If(DayOfWeek( )=5,C,0),1)),30,S) Natenberg's Volatility Historical volatility is defined by Sheldon Natenberg, as the standard deviation of the logarithmic price changes measured at regular intervals of time. In Mr. Natenberg's book, Option Volatility & Pricing, he covers volatility in detail and gives the formula for computing historical volatility. In MetaStock™ the equivalent formula would be: Std( Log( C / Ref( C ,-1 ) ) ,10 ) * Sqrt( 365 / 7 ) This assumes Weekly Data. To utilize this with Daily Data, the formula would be: Std( Log( C / Ref( C,-1) ),10 ) * Sqrt( 365 ) 29 Pathfinder Trading System To recreate the Pathfinder currency trading system (described in the October 1996 interview with Nelson Freeburg) in MetaStock for Windows, open two charts, one of the desired currency and the other of Treasury bonds. For this example, I used the Swiss Franc. Choose Tile from the Window menu so both charts are visible. Drag the T-bonds price bar and drop it on the heading of the currency chart. Your currency chart should now have T-bonds plotted in the top inner window of the chart. Click on the T-bonds plot in the currency chart so it's selected (that is, little squares appear on the price bars). You will need to select the T- bonds plot each time before running a system test. The selected plot tells the MetaStock System Tester what to use for "P". Next, choose System Tester from the Tools menu, and then New to create a new system. Enter the following system rules, stops, and options and then run the test. System name: The Pathfinder Trading System Enter Long: Mov(C,6,S) > Ref(Mov(C,6,S),-1) AND Mov(P,3,S) > Mov(P,25,S) AND Alert(Cross(Mov(C,9,S),Mov(C,18,S)),10) Close Long: Cross(Mov(C,18,S),Mov(C,9,S)) Enter Short: Mov(C,6,S) < Ref(Mov(C,6,S),-1) AND Mov(P,3,S) < Mov(P,25,S) AND Alert(Cross(Mov(C,18,S),Mov(C,9,S)),10) Close Short: Cross(Mov(C,9,S),Mov(C,18,S)) Maximum Loss Stop: Long and short positions Maximum loss of 0.016 points. Initial Points only equity: Positions: Long and short Trade Open Price: Trade 1 delay: Note that the maximum stop loss amount should be changed to 0.032 for the British Pound and 0.02 for the Australian and Canadian dollars when testing these contracts. Plotting Alpha and Beta 30 To plot Alpha and Beta in MetaStock follow the steps below. **The custom indicator named Beta is required to plot Alpha. In the Windows versions of MetaStock, To plot Alpha: Create the custom formulas Alpha and Beta (see below for formula syntax). Open a chart of the desired security. Drag the price plot of the index you are comparing, into the chart of the security and close the chart of the index. **Maximize the security chart if needed. Drag the custom indicator Alpha from the Quick List and drop it onto the price plot of the index. **The index plot will turn a purplish color when you are plotting on top of it. **Note, this formula is set to calculate Alpha over 21 periods. To change the time periods replace each instance of 21 in the formula with the desired number of periods and also change the time periods in the Beta custom indicator. Alpha: ( Sum( ROC( CLOSE ,1 ,% ) ,21 ) - ( Fml( "Beta" ) * Sum( ROC( INDICATOR,1,%) ,21 ) ) ) / 21 To plot Beta: Open a chart of the desired security. Drag the price plot of the index your comparing, into the chart of the security. Drag this custom indicator from the Quick List and drop it onto the price plot of the index. Note, this formula is set to calculate beta over 21 periods. To change the time periods replace each instance of 21 in the formula with the desired number of periods.} Beta: ( ( 21 * Sum( ROC( CLOSE ,1 ,% ) * ROC( INDICATOR ,1 ,% ) ,21 ) ) - ( Sum( ROC( CLOSE ,1 ,% ) ,21) * Sum( ROC( INDICATOR ,1 ,% ) ,21 ) ) ) / ( (21 * Sum( Pwr( ROC( INDICATOR ,1 ,% ) ,2 ) ,21 )) - Pwr( Sum( ROC( INDICATOR ,1 ,% ) ,21 ) ,2 )) **Beta is a measure of volatility of one security against another. This is typically used to measure the volatility of a stock against an index like the S&P 500. A value greater than one indicates the stock is more volatile than the index. Polarized Fractal Efficiency 31 The January 1994 issue of Stocks & Commodities featured an article by Hans Hannula on Polarized Fractal Efficiency. Here is the custom formula for creating the five-period smoothed 10-day PFE using MetaStock: Mov(If(C,>,Ref(C,-9),Sqr(Pwr(Roc(C,9,$),2) + Pwr(10,2)) / Sum(Sqr(Pwr(Roc(C,1,$),2)+1),9),- Sqr(Pwr(Roc(C,9,$),2) + Pwr(10,2)) / Sum(Sqr(Pwr(Roc(C,1,$),2)+1),9))*100,5,E) Price Action Indicator (PAIN) If you were only given today's open, high, low and close, how could you make heads or tails of it? The Price Action Indicator (PAIN) can help. The formula returns a single value that weighs intra-day momentum (C- O), Late Selling Pressure (LSP) (C-L), and Late Buying Pressure (LBP) (C-H). The formula is proven by constructing ideal limit-up and limit down scenarios in bond futures. The output is shown to be consistent with the interpretation of Japanese candlestick patterns. See Michael B. Geraty (1997). "Getting Better Directions" Futures Vol. 26: Aug. ((C-O)+(C-H)+(C-L))/2 Price Volume Rank Taken from Stocks & Commodities, V. 12:6 (235-239): Price-Volume Rank by Anthony J. Macek "Imagine receiving a warning when the market was likely to collapse or being alerted when one of your favorite stocks was about to rally. What if these signals came from analysis that was simple enough to do without a computer and took only a few minutes a day to update, using just two pieces of information found in virtually any newspaper? Is this a dream? Maybe not. Anthony Macek explains. The old adage about keeping things simple applies even to the investment world. Methods of analysis such as polarized fractal efficiency and price oscillator divergences do a great job, but for those with neither the time nor the inclination to master the techniques necessary to monitor every blip and sputter that the market produces may be served just as well by noting only two very important market variables: price and volume." For interpretation refer to the June 94 issue of Technical Analysis of Stocks & Commodities. You need to create all of the following custom formulas in order for the PV Rank to calculate properly. P-V Rank: Fml( "PV1" ) + Fml( "PV2" ) PV1: If( C ,> ,Ref( C ,-1 ) ,If( V ,> ,Ref( V ,-1 ) ,1 ,If( V ,< ,Ref(V ,-1 ) ,2 ,0 ) ) ,0 ) PV2: If( C ,< ,Ref( C ,-1 ) ,If( V ,< ,Ref( V ,-1 ) ,3 ,If( V ,> ,Ref( V ,-1 ) ,4 ,0 ) ) ,0 ) PV Biggie: (This combines all formulas into one formula) If( C ,> ,Ref( C ,-1 ) ,If( V ,> ,Ref( V ,-1 ) ,1 ,If( V ,< ,Ref( V ,-1 ) ,2 ,0 ) ) ,If( C ,< ,Ref( C ,-1 ),If( V ,< ,Ref( V ,- 1 ) ,3 ,If( V ,> ,Ref( V ,-1 ) ,4 ,0 ) ) ,0 ) ) Random Walk Index 32 The following formulas, for the Random Walk Index, were constructed using information from the article "Are There Persistent Cycles", by E. Michael Poulos, in the September 1992 TASC. The formulas are for the Windows and the DOS versions of MetaStock. All formulas are needed. MetaStock Windows versions: Random Walk Index: Max( ( Ref(HIGH,-1) - LOW ) / ( ( Ref(Sum (Atr ( 1 ) ,2 ),-1) / 2) * Sqrt( 2 ) ) ,Max( (Ref(HIGH,-2) -LOW) / ( ( Ref(Sum (Atr ( 1 ),3),-1) / 3) * Sqrt( 3 ) ), Max( (Ref(HIGH,-3) - LOW) / ( (Ref(Sum (Atr( 1 ) ,4) ,-1) / 4) * Sqrt( 4 ) ) , Max( ( Ref( HIGH,-4) - LOW) / ( (Ref(Sum(Atr( 1 ),5),-1) / 5) * Sqrt( 5 ) ), Max( (Ref(HIGH,-5) - LOW) / ( (Ref( Sum( Atr ( 1 ),6),-1) / 6 ) * Sqrt( 6 ) ), Max( ( Ref(HIGH,-6) -LOW) / ( (Ref( Sum( Atr( 1 ),7),-1) / 7) * Sqrt( 7 ) ), Max((Ref(HIGH,-7)-LOW) / ( (Ref(Sum (Atr( 1 ),8),-1) / 8) * Sqrt(8) ), (Ref(HIGH,-8)-LOW) / ( (Ref(Sum (Atr (1),9),-1) / 9) * Sqrt( 9 ) ) ) ) ) ) ) ) ) Rate of Change Since a Specific Date The following formula plots a percent rate of change between a specific date and today. The user is prompted for the specific date.This will only work in MetaStock™ for Windows 95/NT version 6.5 (or higher) or in MetaStock Professional. Construct the formula in the Indicator Builder, giving it the name shown below in bold. All the text after "FORMULA:" and before "*END OF FORMULA*" below should be placed in the Formula field in the Indicator Builder. Once the indicator has been created, you can drag it out of the Indicator Quicklist for placement in an inner-window of your chart. NAME: ROC Since a Date FORMULA: Day1 := Input("Day",1,31,4); Month1 := Input("Month",1,12,1); Year1 := Input("Year",1900,2400,1999); 100 * (CLOSE - ValueWhen(1,DayOfMonth() = Day1 AND Month() = Month1 AND Year() = Year1, CLOSE))/ ValueWhen(1,DayOfMonth() = Day1 AND Month() = Month1 AND Year() = Year1,CLOSE) 33 Regression Oscillator and the Slope/Close Indicator In MetaStock 6.0 it‟s easy to create the Regression Oscillator and the Slope/Close Indicator from Richard Goedde‟s article, "Market timing with the regression oscillator", which appears in the March 97 issue of Technical Analysis Stocks and Commodities magazine. First choose Indicator Builder from the Tools menu and enter the following formulas: Regression Oscillator 100 * (CLOSE/ LinearReg(CLOSE,63)-1) Slope/Close 10000* LinRegSlope(CLOSE,63)/CLOSE Next drag each of these formulas from the Indicator QuickList and drop them on the heading of a chart. To create horizontal lines, click the right mouse button while the mouse pointer is positioned over the Regression Oscillator to display the shortcut menu. Choose Regression Oscillator Properties. On the Horizontal lines page add horizontal lines at 14, 0, and -14. You can use The Explorer to perform the screen mentioned in the article. First choose The Explorer from the Tools menu, next create a new Exploration with the following information: Column A Name: Reg Osc Formula: Fml("Regression Oscillator") Column B Name: Slp/Cls Formula: Fml("Slope/Close") Filter Formula: ColB > 50 and ColA >-15 and ColA < -5 Choose OK and then Explore to run the Exploration. For MetaStock for Windows 5.x users the instructions are the same except enter the following custom indicator in place the ones mentioned earlier. Regression Oscillator 100 * (CLOSE/ ((63 * Sum(Cum(1) * C,63) - Sum(Cum(1),63) * Sum(C,63)) / (63 * Sum(Pwr(Cum(1),2),63) - Pwr(Sum(Cum(1),63),2)) * Cum(1) + (Mov(C,63,S) - Mov(Cum(1),63,S) * (63 * Sum(Cum(1) * C,63) - Sum(Cum(1),63) * Sum(C,63)) / (63 * Sum(Pwr(Cum(1),2),63) - Pwr(Sum(Cum(1),63),2))))-1) Slope/Close 10000* ((63 * Sum(Cum(1) * C,63) - Sum(Cum(1),63) * Sum(C,63)) / (63 * Sum(Pwr(Cum(1),2),63) - Pwr(Sum(Cum(1),63),2)))/CLOSE 34 Custom Relative Strength Index (RSI) This custom RSI will allow you to select which price data to use when you plot it. The standard RSI uses the close value as Welles Wilder did when he created the indicator. This custom indicator will allow you to use the other price fields including volume. Q:=Input("Time Periods",1,1000,14); B:=Input("Field: 1=Close, 2=Open, 3=High, 4=Low, 5=Volume",1,5,1); Z:=If(B=1,Wilders(If(ROC(C,1,$)>0,ROC(C,1,$),0),LastValue(Q)),If(B=2,Wilders(If(ROC(O,1,$)>0,ROC(O,1, $),0),LastValue(Q)),If(B=3,Wilders(If(ROC(H,1,$)>0,ROC(H,1,$),0),LastValue(Q)),If(B=4,Wilders(If(ROC(L,1, $)>0,ROC(L,1,$),0),LastValue(Q)),Wilders(If(ROC(V,1,$)>0,ROC(V,1,$),0),LastValue(Q)))))); Y:=If(B=1,Wilders(If(ROC(C,1,$)<0,Abs(ROC(C,1,$)),0),LastValue(Q)),If(B=2,Wilders(If(ROC(O,1,$)<0,Abs( ROC(O,1,$)),0),LastValue(Q)),If(B=3,Wilders(If(ROC(H,1,$)<0,Abs(ROC(H,1,$)),0),LastValue(Q)),If(B=4,Wil ders(If(ROC(L,1,$)<0,Abs(ROC(L,1,$)),0),LastValue(Q)),Wilders(If(ROC(V,1,$)<0,Abs(ROC(V,1,$)),0),LastV alue(Q)))))); RS:=Z/Y; 100-(100/(1+RS)) Relative Volatility Index (RVI) The following formulas were taken from the article "The relative volatility index," written by Dorsey, Donald, in the June 93 issue of Technical Analysis of STOCKS & COMMODITIES. Taken from Stocks & Commodities, V. 11:6 (253-256): The Relative Volatility Index by Donald Dorsey "The RVI is simply the relative strength index (RSI) with the standard deviation over the past 10 days used in place of daily price change. Because most indicators use price change for their calculations, we need a confirming indicator that uses a different measurement to interpret market strength. The RVI measures the direction of volatility on a scale of zero to 100. Readings above 50 indicate that the volatility as measured by the 10-day standard deviation of the closing prices is more to the upside. Readings below 50 indicate that the direction of volatility is to the downside. The initial testing indicates that the RVI can be used wherever you might use the RSI and in the same way, but the specific purpose of this study is to measure the RVI's performance as a confirming indicator." The RVI was designed to measure the direction of volatility. It calculates price strength by measuring volatility rather than price change. All of the following formulas are required: @RVI Down ((PREV*13)+If(ROC(C,1,%)<0,Stdev(C,10),0))/14 @RVI Up ((PREV*13)+If(ROC(C,1,%)>0,Stdev(C,10),0))/14 @RVI (100*Fml("@RVI Up"))/(Fml("@RVI Up")+Fml("@RVI Down")) 35 Chande & Kroll's r2 2 In their book The New Technical Trader, Chande & Kroll introduce the r indicator. They state that "the 2 primary use of r is as a confirming indicator" and that "it is a lagging indicator that shows the strength of the trend." 2 In MetaStock the r formula is: Pwr(Corr(Cum( 1 ),C,14,0),2) 2 They also present a smoothed r which would be: Mov(Pwr(Corr(Cum( 1 ),C,14,0),2)*100,14,S) For interpretation refer to Chande & Kroll's book, as stated above. Note: The r squared indicator is built into MetaStock for Windows version 6.0. Slope of a Line The following custom formula returns the slope of a line. For example, this formula returns the slope of a 14 day run of the security's closing prices. ( (14 * (Sum(Cum( 1 ) * C ,14 ) ) ) - (Sum(Cum( 1 ) ,14 ) * (Sum( C ,14) ) ) ) / ( (14 * Sum(Pwr (Cum( 1 ) ,2 ) ,14 ) ) - Pwr(Sum(Cum( 1 ) ,14 ) ,2 ) ) To apply this to different lines you would replace C with the desired syntax for the line. For example the slope of a 25 period simple moving average would be: ( ( Sum(Cum(1) * Mov(C,25,S),14) ) - (Sum(Cum(1),14) * Sum(Mov(C,25,S),14) / 14) ) / ( (Sum(Power(Cum(1),2),14) ) - (Power(Sum(Cum(1),14),2) / 14) ) You could also make this a universal formula by using the P variable. You could then plot the formula on top of any line. ( (14*(Sum(Cum(1)*P,14) ) ) - Sum(Cum(1),14)*(Sum(P,14 ) ) ) / ( (14*Sum(Pwr(Cum(1),2 ),14 ) )- Pwr(Sum(Cum(1),14),2 ) ) Slope of a Linear Regression Line The following custom formula will return the slope of a Linear Regression Line. tp:=Input("Time Periods",1,200,21); ((tp*(Sum(Cum(1)*C,tp)))-(Sum(Cum(1),tp)*(Sum(C,tp))))/((tp*Sum(Pwr(Cum(1),2),tp))- Pwr(Sum(Cum(1),tp),2)) 36 Standard Error Bands for MetaStock™ for Windows For interpretation refer to the article "Standard Error Bands", in the September 96 issue of TASC, written by Jon Anderson. 21 period Upper Band (smoothed): Mov((21 * Sum(Cum(1) * C,21) - Sum(Cum(1),21) * Sum(C,21)) / (21 * Sum(Pwr(Cum(1),2),21) - Pwr(Sum(Cum(1),21),2)) * Cum(1) + (Mov(C,21,S) - Mov(Cum(1),21,S) * (21 * Sum(Cum(1) * C,21) - Sum(Cum(1),21) * Sum(C,21))/ (21 * Sum(Pwr(Cum(1),2),21) - Pwr(Sum(Cum(1),21),2))) +2*(Sqrt(((Sum(Power(C,2),21)-(Power(Sum(C,21),2)/21)) -((Sum(Cum(1)*C,21))- ((Sum(Cum(1),21)*Sum(C,21)/21)))/ ((Sum(Power(Cum(1),2),21))-(Power(Sum(Cum(1),21),2)/21)) *((Sum(Cum(1)*C,21))-((Sum(Cum(1),21)*Sum(C,21)/21)))) /19)),3,S) 21 period Lower Band (smoothed): Mov((21 * Sum(Cum(1) * C,21) - Sum(Cum(1),21) * Sum(C,21)) / (21 * Sum(Pwr(Cum(1),2),21) - Pwr(Sum(Cum(1),21),2)) * Cum(1) +(Mov(C,21,S) - Mov(Cum(1),21,S) * (21 * Sum(Cum(1) * C,21) - Sum(Cum(1),21) * Sum(C,21))/ (21 * Sum(Pwr(Cum(1),2),21) - Pwr(Sum(Cum(1),21),2))) - 2*(Sqrt(((Sum(Power(C,2),21)-(Power(Sum(C,21),2)/21)) -((Sum(Cum(1)*C,21))- ((Sum(Cum(1),21) * Sum(C,21)/21))) / ((Sum(Power(Cum (1),2),21))-(Power(Sum(Cum(1),21),2)/21))*((Sum(Cum(1)*C,21))- ((Sum(Cum(1),21)*Sum(C,21)/21)))) /19)),3,S) 21 period R2 (smoothed): Mov((Pwr(Corr(Cum(1),C,21,0),2)),3,S) 21 period Regression Slope: (((Sum(Cum(1)*C,21))-(Sum(Cum(1),21)*Sum(C,21)/21)) / ((Sum(Power(Cum(1),2),21))- (Power(Sum(Cum(1),21),2)/21))) 21 period %A: ((C-Fml("21 period lower band (smoothed)")) / (Fml("21 period upper band(smoothed)") -Fml("21 period lower band (smoothed)"))) 21 period Regression (smoothed): Mov((21*Sum(Cum(1)*C,21)-Sum(Cum(1),21)*Sum(C,21))/ (21*Sum(Pwr(Cum(1),2),21)- Pwr(Sum(Cum(1),21),2))*Cum(1) +(Mov(C,21,S) - Mov(Cum(1),21,S) * (21*Sum(Cum(1) * C,21) - Sum(Cum(1),21)*Sum(C,21))/(21*Sum(Pwr(Cum(1),2),21) -Pwr(Sum(Cum(1),21),2))),3,S) STIX Oscillator STIX oscillator is a short-term trading oscillator that was published in The Polymetric Report. It compares the amount of volume flowing into advancing and declining stocks. Calculation: STIX is based on a variation of the Advance/Decline Ratio: A/D Ratio = (Advancing Issues /(Advancing Issues + Declining Issues)) * 100 37 The STIX is a 21-period exponential moving average of the above A/D Ratio. In MetaStock this would be: STIX = Mov((Advancing Issues /(Advancing Issues + Declining Issues)) * 100,21,E) To construct the STIX in MetaStock for Windows you would need to perform the following steps: In The DownLoader for Windows create a composite of the Advancing Issues + Declining Issues. In MetaStock open the composite and the Advancing Issues Tile the charts so they can both be viewed. Drag the plot of the composite into the chart of the Advancing Issues. Create the custom formula: Mov((C/P)*100,21,E) Plot this formula on top of the composite plot in the Advancing Issues chart. (The composite's plot will turn a purplish color when the formula is going to be plotted on it) You can then drag that new plot to a separate inner window if you prefer. For interpretation refer to The Polymetric Report. Stochastic %D The following formula is a three day moving average of a 14 day Stochastic. In MetaStock for Windows this would be the indicator line that is plotted with the built in Stochastic indicator Mov( ( ( ( C - LLV( L,14 ) ) /( HHV( H,14 ) - LLV( L,14 ) ) ) * 100 ) ,3 ,S ) Stochastic Relative Strength Index In his book The New Technical Trader, Tushar Chande defines the Stochastic RSI as: StochRSI = (RSI - RSIL)/(RSIH -RSIL) where RSIL and RSIH are the lowest and highest values of the RSI over a given period. In his book he uses 14 periods. The MetaStock™ formula for the Stochastic RSI is: ( ( RSI ( 14 ) - LLV( RSI (14 ) ,14 ) ) / ( ( HHV( RSI (14 ) ,14 ) ) - LLV(RSI (14 ),14 ) ) ) 38 The New Advance Decline Line The formulas and steps necessary to do the New Advance -Decline Line from the September 1994 Technical Analysis of Stocks & Commodities, page 14 by Daniel Downing are: Taken from Stocks & Commodities, V. 12:9 (363-365): A New Advance-Decline Line by Daniel E. Downing "Here's a trading tool that uses a unique version of the daily advance-decline line of the New York Stock Exchange (NYSE). This version helps in our short- and long-term trading of index options and stock index futures. It gives many good short-term trading signals and excellent but infrequent longer-term signals… The philosophy behind this tool is that the short-term trader's capital is finite and that traders have to reliquify their holdings after a period. Traders can buy and try to push the equities higher only so many times before they need to reliquify, just as only a finite amount of selling waves can take place before the sellers are out of supplies. A tool that points to when short-term traders need to reliquify their positions will also spot when the markets will soon reverse their trends." For the Windows versions of MetaStock: Load the advances Load the declines Drag the plot of the advances into the chart of the declines Plot the following custom formula directly on the plot of advances. Cum( If( P ,>= ,1000 ,If(C ,< ,1000 , + 1 ,0 ) ,If( C ,>= ,1000 ,-1 ,0 ) ) ) Tick Line Momentum Oscillator In his article "Using The Tick In A Short-Term Indicator", in the January 94 issue of TASC, Daniel E. Downing presents the Tick Line Momentum Oscillator. Taken from Stocks & Commodities, V. 12:1 (42-44): Using The Tick In A Short-Term Indicator by Daniel E. Downing "The tick index, the net difference of the numbers of stocks last traded on an uptick from those last traded on a downtick , is a well-known indicator, but it's got a problem. The raw number result is volatile, perhaps too volatile for some. What to do? here, then, is a way to smooth out the noise to identify short-term trading opportunities. The tick is a basic unit for the markets, watched with fascination during periods of turmoil and periods of enthusiasm. It is quoted throughout the day on most quote services. In addition, the closing tick value can be found on the market statistics pages of financial newspapers such as Barron's and The Wall Street Journal. Let me present, then, the tick line momentum oscillator, which is based on the closing value for the New York Stock Exchange (NYSE) tick indicator. The oscillator has been shown to have a good track record of determining when the NYSE is overbought or oversold on a short-term basis. The formula for the tick line momentum oscillator is simple and can be easily calculated without a computer, although a spreadsheet version can be found in the sidebar, "Tick line momentum." Finally, the oscillator is straightforward and simple to apply." The MetaStock formula for the Tick Line Momentum Oscillator is: Mov( ROC( Cum( If( C ,> ,Ref( Mov(C ,10 ,E ) ,-1 ) ,+1 ,If( C ,< ,Ref( Mov( C ,10 ,E ) ,-1 ) ,- 1 ,0 ) ) ) ,5 ,$ ) ,5 ,E ) 39 Trading Channel Index The Trading Channel Index comes from an early version of AIQ's Stock Expert program. "The Trading Channel Index measures the location of average daily price relative to a smoothed average of average daily price. It is derived from the average difference between these two values." To create the Trading Channel Index in MetaStock create the following custom formula's: AP+: Average price (H+L+C)/3 ESA+: Smoothed price average Mov( Fml( "AP+" ) ,10 ,E ) + ( Mov( Ref( Fml( "AP+" ) ,-1 ) ,10 ,E ) ) D+: Price range estimate Mov( ( Fml( "AP+" ) - Fml( "ESA+" ) ) ,10 ,E ) + ( Mov( Ref( Fml( "AP+" ) - Fml( "ESA+" ) ,-1 ) ,10 ,E ) ) CI+: Channel index ( ( Fml( "AP+" ) - Fml( "ESA+" ) ) / ( 0.015 * Fml( "D+" ) ) ) TRADING CHANEL INDEX: Mov( Fml( "CI+" ) ,21 ,E ) + ( Mov( Ref( Fml( "CI+" ) ,-1 ) ,21 ,E ) ) The Ultimate Oscillator "The trouble for most oscillator workers was, and has continued to be, that while frequently oscillators lead sometimes they lead far too early and, instead of buying a bottom, you are buying falling daggers and getting sliced up. Even the best oscillators consistently give premature buy and sell signals. I believe my "Ultimate Oscillator" corrects this", stated by Larry Williams, in the Apr 85 issue of Technical Analysis of Stocks & Commodities. To create the Ultimate Oscillator as a custom formula, in MetaStock, create the following custom formulas. *** The first formula is the only formula that is plotted. In MetaStock for Windows versions 5.0 and above include the Ultimate Oscillator as a built in indicator. Ultimate Osc ( ( ( Fml("Div_7")*4)+(Fml("Div_14")*2)+Fml("Div_28" )) / 7 )*100 TrueR : True Range Max( ( C - L ) , ( C - Ref( L ,-1 ) )) TotalA : Total Activity Max( Max( ( H - L ) ,H - Ref( L ,-1 ) ) ,Max( ( Ref( H ,-1) - L ) , (Ref( H ,-1 ) - Ref( L,-1) ) ) ) True_7 : Summation (7) of True Range Sum( Fml( "TrueR" ) ,7 ) Total_7 : Summation (7) of Total Activity Sum( Fml( "TotalA" ) ,7 ) Div_7 : Division of 7 days Fml( "True_7" ) / Fml( "Total_7" ) 40 True_14 : Summation (14) of True Range Sum( Fml( "TrueR" ) ,14 ) Total_14 : Summation (14) of Total Activity Sum( Fml( "TotalA" ) ,14 ) Div_14 : Division of 14 days Fml( "True_14" ) / Fml( "Total_14" ) True_28 : Summation (28) of True Range Sum( Fml( "TrueR" ) ,28 ) Total_28 : Summation (28) 0f Total Activity Sum( Fml( "TotalA" ) ,28 ) Div_28 : Division of 28 days Fml( "True_28" ) / Fml( "Total_28" ) Wilder's Volatility In his book New Concepts in Technical Trading Systems, J. Welles Wilder Jr. talks about volatility and describes his Volatility Index and Volatility System. Both of these can be performed in MetaStock™ for Windows. This document describes how to construct both the index and the system. The Volatility Index (VI) is described by Wilder as: VI Today = (13 * VI Prev + TR1) / 14 *where TR1 is today's true range. He defines the true range as the greatest of the following: 1. The distance from today's high to today's low 2. The distance from yesterday's close to today's high, or 3. The distance from yesterday's close to today's low. In MetaStock version 5.0 or higher you would use the following function. VI Today = ATR(14) The Volatility System is: Enter Long Cross(C,Ref(LLV(C,7),-1)+(Ref(ATR(7),-1)*3)) Enter Short Cross(Ref(HHV(C,7),-1)-(Ref(ATR(7),-1)*3),C) 41 WillSpread by Larry Williams The Larry Wiliams' indicator named WillSpread is quite easy to plot in MetaStock for Windows version 6.5. Using version 6.5 of MetaStock for Windows, please follow these steps. Plot the underlying commodity. Drag the Spread Indicator from the indicator quick list to this commodity chart. Select either Tbonds or Tbills as the security to use to spread. I recommend you plot this in a new inner window. Drag the Price Oscillator from the indicator quick list and drop it on the SPREAD plot, not the price plot. The parameters Mr. Williams' uses are 7 and 11 time period exponential moving averages. You also want to use "points" as the method. This plot is the WillSpread indicator. At this point, you may change the Spread Indicator plot's color to match the background of the chart, or perhaps move the WillSpread indicator to a separate inner window. If you save this first effort as a template, perhaps named WillSpread, you are able to apply this template to any commodity you wish and the indicator will be automatically calculated against that commodity. You may also use the "Next Security" function within MetaStock for Windows to view each of your commodities by setting the options for next security to "Keep line studies". If you apply this template to the first commodity in your futures folder, you may then use the right arrow to move down the folder contents. Each new commodity will have the WillSpread calculated as it is loaded. What are the explorations Equis uses to determine the listed Hot Picks on the Equis Web site each week? Following are the explorations for each list we display. To use them, you will need to enter them into your exploration file. Stocks with Bullish Engulfing Lines ColA: CLOSE ColB: Volume Mov(V,70,S) Filter: EngulfingBull() AND ROC(C,60,%)<-15 AND BarsSince(Stoch(9,1)<10)<=3 Filter enabled Yes Periodicity Daily Records required 1300 Stocks with Bearish Engulfing Lines Col A: CLOSE ColB: Volume Mov(V,70,S) Filter: EngulfingBear() AND ROC(C,60,%)>15 AND BarsSince(Stoch(9,1)>90)<=3 Filter enabled Yes Periodicity Daily Records required 1300 42 Stocks up > 20% on double average volume Col A: CLOSE Col B:ROC(C,5,%) Filter ROC(C,5,%)>=20 AND Mov(V,5,S)>=(2*Ref(Mov(V,60,S),-5)) Filter enabled Yes Periodicity Daily Records required 1300 Stocks down > 20% on double average volume Col A: CLOSE Col B: ROC(C,5,%) Filter ROC(C,5,%)<=-20 AND Mov(V,5,S)>=(2*Ref(Mov(V,60,S),-5)) Filter enabled Yes Periodicity Daily Records required 1300 Stocks Crossing Above 200-day Moving Average on Twice Average Volume Filter (C>Mov(C,200,S) AND Ref(C,-5)<Ref(Mov(C,200,S),-5)) AND C>5 AND V>Mov(V,200,S)*2 Stocks Crossing Below 200-day Moving Average on Twice Average Volume Filter (C<Mov(C,200,S) AND Ref(C,-5)>Ref(Mov(C,200,S),-5)) AND C>5 AND V>Mov(V,200,S)*2 Stocks consolidating over the last 16 weeks Col A: CLOSE Filter Fml("congestion index") <= 10 AND BarsSince(Fml("congestion index")>10) > 0 Filter enabled Yes Here is the "congestion index" formula: ((HHV(C,80)-LLV(C,80))/LLV(C,80))*100 Stocks breaking out of consolidation (upside) Col A: CLOSE Filter: Fml("Consolidation breakout (upside)") = 1 Filter enabled: Yes Here is the "consolidation breakout(upside)" formula: If(Ref(Fml("congestion index"),-5),<,10, {and} If(Fml("congestion index"),>=,10, {and} If(CLOSE,>,Ref(HHV(C,80),-5), {and} If(Mov(V,5,S),>=,1.5*(Ref(Mov(V,60,S),-5)), +1,0),0),0),0) Stocks breaking out of consolidation (downside) Col A: CLOSE Filter: Fml("Consolidation breakout (downside)") = 1 Filter enabled: Yes Here is the "consolidation breakout(downside)" formula: If(Ref(Fml("congestion index"),-5),<,10{%}, {and} If(Fml("congestion index"),>=,10{%}, {and} If(CLOSE,<,Ref(LLV(C,80),-5), {and} If(Mov(V,5,S),>=,1.5*(Ref(Mov(V,60,S),-5)), +1,0),0),0),0) Most volatile stocks over last 16 weeks Col A: CLOSE Col B: Vol(10,80) Filter: Vol(10,80)>200 Filter enabled: Yes Biggest % gainers over last week (Report determined by sort order) Col A: CLOSE Col B: ROC(C,5,%) Filter: (ROC(C,5,%)>10 OR ROC(C,5,%)<-10) AND C>5 Filter enabled: Yes 43 Biggest % losers over last week (Report determined by sort order) Col A: CLOSE Col B: ROC(C,5,%) Filter: (ROC(C,5,%)>10 OR ROC(C,5,%)<-10) AND C>5 Filter enabled: Yes Most overbought\oversold stocks (Report determined by sort order) Col A: CLOSE Col B: Fml("ob/os summation") Filter: Fml("ob/os summation") > 450 OR Fml("ob/os summation") < -50 Filter enabled: Yes Here is the "ob/os summation" formula: RSI(25)+Stoch(25,3)+Mo(25)+CCI(25) 44 1996 August TASC Trader's Tips - Connors and Raschke's Historical Volatility System Here is the Connors and Raschke's historical volatility system exploration in August 1996 TASC Trader's Tips translated for MetaStock. COLUMN FORMULAS --------------- Column A : Vol ratio std(log(C/ref(C,-1)),5)/std(log(C/ref(C,-1)),99) Column B : NR4 day if(HIGH-LOW,<,ref(llv(H-L,3),-1),1,0) Column C : Inside if(HIGH,<,ref(HIGH,-1),if(LOW,>,ref(LOW,-1),1,0),0) Column D : High HIGH Column E : Low LOW FILTER FORMULA when(colA,<,0.5) AND (when(colB,=,1) OR when(colC,=,1)) 1996 October TASC Trader's Tip - Freeburg Precious Metal Switch Fund system To create the Freeburg Precious Metal Switch Fund system in MetaStock for Windows, you must first create the K ratio as a composite security. To do this, launch The DownLoader from MetaStock, and choose New and then Composite from The DownLoader's File menu. Make sure the directory specified is the directory where your weekly GMI and Handy and Harman data are located. Name the composite the K ratio, then choose the Barron's Gold Mining Index as the Primary symbol and Handy and Harman prices as the secondary symbol. Next, choose Divide as the Operator and the click the OK button to add the composite. Open the K ratio chart in MetaStock, Plot the Bollinger Bands Indicator and enter 46 for the number of periods and 2.3 for the standard deviations. Plot Bollinger Bands again and enter 4 for the periods and 1.6 for the Standard Deviations. Your chart should look like the one in Figure ?. You can also create this system in MetaStock for Dos with the same steps. 45 The data necessary for this chart/indicator, is extremely difficult to obtain. The only source we are aware of on diskette is the author of the article. The data is in a Lotus spreadsheet. It must be output to ASCII and then converted to MetaStock data files. He will make a small charge for this data. To keep the GMI data updated, it is only available from Barrons magazine and must be manually input. The Handy & Harman data must also be manually updated. This may be obtained from the Wall Street Journal as well. 1996 December TASC Trader's Tip - 2/20-Day EMA Breakout System To create the 2/20-Day EMA Breakout System by David Landry in MetaStock for Windows, choose System Tester from the Tools menu. Now choose new and enter the following system test rules and options: Enter long Alert(Cross(Sum(L > Mov(C,20,E),2) = 2,.5),10) AND HIGH >= Peak(1,Cross(Sum(L > Mov(C,20,E),2) = 2,.5) * HHV(H,2),1) + .001{10 ticks} AND BarsSince(Cross(Sum(L > Mov(C,20,E),2) = 2,.5)) < BarsSince(LOW <= Mov(C,20,E)) Close long LOW <= Mov(C,20,E) Enter short Alert(Cross(Sum(H < Mov(C,20,E),2) = 2,.5),10) AND LOW <= Peak(1,Cross(Sum(H < Mov(C,20,E),2) = 2,.5) * LLV(L,2),1) - .001{10 ticks} AND BarsSince(Cross(Sum(H < Mov(C,20,E),2) = 2,.5)) < BarsSince(HIGH >= Mov(C,20,E)) Close short HIGH >= Mov(C,20,E) Initial equity Points Only Positions Long and short Trade price Close Trade delay 0 46 Please note the {10 ticks} comment in the system rules. The value used in these rules is for most currencies. You should change this value based upon the commodity your testing. 1997 May TASC Trader's Tip - "Genesis of a Simple Futures Trading" It‟s quite easy to use MetaStock for Windows to duplicate the Genesis of a Simple Futures Trading system which is presented in this issue‟s interview of Jay Kaeppel. In MetaStock, choose System Tester from the Tools menu. Click on the New button and enter in the following rules: Jay Kaeppel's Simple Futures Trading System SIGNAL FORMULAS --------------- Enter Long: Cross( Mov( CLOSE,9,S), Mov( CLOSE,50,S)) AND CLOSE > Mov( CLOSE,80,S) Close Long: Cross( Mov( CLOSE,50,S), Mov( CLOSE,9,S)) AND CLOSE > Mov( CLOSE,80,S) Enter Short: Cross( Mov( CLOSE,50,S), Mov( CLOSE,9,S)) AND CLOSE < Mov( CLOSE,80,S) Close Short: Cross( Mov( CLOSE,9,S), Mov( CLOSE,50,S)) AND CLOSE < Mov( CLOSE,80,S) When testing futures in MetaStock it‟s best to use a "points only" test. To do this, choose Options from the System Tester dialog and then Points Only Test from the Testing page. To use The Explorer to screen for futures generating a recent signal with this system, choose The Explorer from the Tools dialog and enter in the following rules: Jay Kaeppel's Simple Futures Trading Sys 47 COLUMN FORMULAS ColumnA: Buy Sign Cross( Mov( CLOSE,9,S), Mov( CLOSE,50,S)) AND CLOSE > Mov( CLOSE,80,S) ColumnB: Shrt Sig Cross( Mov( CLOSE,50,S), Mov( CLOSE,9,S)) AND CLOSE < Mov( CLOSE,80,S) FILTER SOURCE Filter Enabled: Yes Formula: colA = 1 OR colB = 1 Next choose Explore and The Explorer will search for and then display any futures, which have generated new signals. 48 1997 July TASC Trader's Tip - "Rainbow Charts" To create Rainbow Charts in MetaStock for Windows, open any chart, drop the moving average indicator from the Indicator QuickList, and drop it in the same inner windows as the price bars. Enter two for the Periods and simple for the Method. Next plot a second moving average on the first moving average by dragging a moving average from the QuickList and dropping it on the first moving average (Note: The first moving average should turn light purple before you release the mouse button). If you dropped it correctly the Parameters dialog should say „Indicator‟ for the Price Field. Click OK to accept two periods and simple as the parameters. Change the color of this moving average as desired. Now plot a third moving average of the second moving average by repeating these steps. Continue this until you have ten moving averages. Choose Yes if MetaStock prompts you about plotting a duplicate indicator. To save you time, I have created a template that allows you to bypass these steps. You can download this template directly off of the Equis web site at /customer/support/files/systems.html. Download this file to the Charts folder (e.g. C:\Equis\Mswin\Charts) in your MetaStock folder. Open any chart and then click on your right mouse button while the pointer is located on the chart. Choose Apply Template from the Chart Shortcut menu and choose the Rainbow Chart template. You should now have a chart with ten different colored moving averages. Next choose Indicator Builder from the Tools menu and enter the following formulas. Rainbow Max Max(Mov(C,2,S), Max(Mov(Mov(C,2,S),2,S), Max(Mov(Mov(Mov(C,2,S),2,S),2,S), Max(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S), Max(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S), Max(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S), Max(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S), Max(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S), Max(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S), Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)))))))))) Rainbow Min Min(Mov(C,2,S), Min(Mov(Mov(C,2,S),2,S), Min(Mov(Mov(Mov(C,2,S),2,S),2,S), Min(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S), Min(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S), Min(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S), Min(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S), Min(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S), Min(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S), Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)))))))))) Rainbow Oscillator 100 * (CLOSE - ((Mov(C,2,S)+ Mov(Mov(C,2,S),2,S)+ Mov(Mov(Mov(C,2,S),2,S),2,S) + Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S) + Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S) + Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S) + Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S)+ Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)+ Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)+ Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(Mov(C,2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S),2,S)) /10))/(HHV(C,10)-LLV(C,10)) 49 Lower Rainbow Band -100 * (Fml("Rainbow Max") - Fml("Rainbow Min")) / (HHV(C,10) - LLV(C,10)) Upper Rainbow Band 100 * (Fml("Rainbow Max") - Fml("Rainbow Min")) / (HHV(C,10) - LLV(C,10)) Plot the Rainbow Oscillator in a new inner window of your chart with the ten moving averages, by dropping the custom indicator from the QuickList onto the chart‟s heading. Right click on the Rainbow Oscillator and choose properties, then change the Style to a histogram. Now plot the Lower Rainbow Band and the Upper Rainbow Band in the same inner window as the Rainbow Oscillator. If the scaling dialog appears when plotting these indicators, choose „Merge with Scale on Right.‟ Change the colors of the Upper and Lower Rainbow Bands as desired. Now save this as a new template by choosing Save As from the File Menu and changing the File Type to template, so you can easily apply it to any chart. 1997 October TASC Traders Tip - Volatility Bands As A Long Term Strategy This article "Volatility Bands As A Long Term Strategy", by Ahmet Tezel, Ph.D., and Suzan Koknar-Tezel, M.S., which appears in this issue introduces two different volatility band trading systems. One system uses bands based on moving averages and the other is based on bands which use regression. To plot the Moving Average Asymmetric Volatility Price Bands in MetaStock for Windows, simply plot Bollinger Bands using 11 periods and 1.7 standard deviations. Then click your right-mouse button while the cursor is over the lower band and choose properties. Change the standard deviations to 2. This plot will now appear exactly as the bands discussed in the article. To plot the Regression Asymmetric Volatility Price Bands in Metastock for Windows, simply plot Standard Error Bands using 21 periods, 1 for standard errors, and 1 for the smoothing periods. Then click your right- mouse button while the cursor is over the lower band and choose properties. Change the standard errors to 1.5. 50 To recreate the systems in MetaStock for Windows, choose System Tester from the Tools menu. Next choose New and enter the following trading rules and stop conditions. After entering this information, choose Options and change the trade delay to 1, then change the Trade Price to Open. If you have MetaStock 6.5 enter the first set of formulas. MetaStock 6.5 allows variables which will allow you to change the periods when testing much more easily. Formulas for MetaStock 6.5 MovAvg Asymmetric Volatility Price Bands SIGNAL FORMULAS --------------- Enter Long: Periods := 11; UpperBand := BBandTop(CLOSE,Periods,S,1.7); BuySignal1 := Sum(CLOSE > UpperBand,3) = 3; BuySignal2 := CLOSE > UpperBand AND Ref(LOW,-1) > Ref(upperband,-1); BuySignal3 := LOW > UpperBand AND Ref(CLOSE,-1) > Ref(upperband,-1); BuySignal4 := CLOSE > UpperBand AND CLOSE > 1.4 * LLV(LOW,Periods + 1) AND Mov(VOLUME,3,S) > 2000 {assuming volume in 100's otherwise use 200000} AND Mov(HIGH,3,S) > UpperBand AND Mov(HIGH - LOW,3,S) > Mov(HIGH - LOW,Periods,S); BuySignal1 OR BuySignal2 OR BuySignal3 OR BuySignal4 Close Long: Periods := 11; LowerBand := BBandBot(CLOSE,Periods,S,2); SellSignal1 := Sum(CLOSE < LowerBand,3) = 3; SellSignal2 := CLOSE < (1-.18) * HHV(HIGH,Periods + 1) AND Sum(CLOSE < LowerBand,2) = 2; SellSignal3 := CLOSE < (1-.18) * HHV(HIGH,Periods + 1) AND HIGH < LowerBand; SellSignal1 OR SellSignal2 OR SellSignal3 STOPS ----- Maximum Loss: LONG ONLY 10.00 Percent 51 Regression Asymmetric Volatile Price Band SIGNAL FORMULAS --------------- Enter Long: Periods := 21; UpperBand := STEBandTop(CLOSE,Periods,1) ; Sum(CLOSE > UpperBand,3) = 3 AND LinRegSlope(CLOSE,21) > 0 AND ROC(Correl(CLOSE,Cum(1) ,21,0),2,$) >= .2 Close Long: Periods := 21; LowerBand := STEBandBot(CLOSE,Periods,1.5) ; SellSignal1 := Sum(CLOSE < LowerBand,3) = 3; SellSignal2 := CLOSE < (1-.18) * HHV(HIGH,Periods + 1) AND HIGH < LowerBand; SellSignal1 OR SellSignal2 STOPS ----- Maximum Loss: LONG ONLY 10.00 Percent 1997 November TASC Traders Tip - Using Fibonacci Ratios and Momentum In MetaStock for Windows, you can establish Fibonacci Retracement levels as outlined in the November 1997 TASC article "Using Fibonacci Ratios and Momentum" by Thom Hartle by first creating an Expert in the Expert Advisor. To do this, choose Expert Advisor from the Tools menu and then choose New. Enter the following Expert Highlights and Expert Symbols into your Expert. Fibonacci Ratios and Momentum Highlights Name: RSI > 50 Condition: RSI(14) > 50 Color: Dk Green Name: RSI < 50 Condition: RSI(14) < 50 Color: Red Symbols 52 Name: Isolated Low Condition: LOW < Ref(LOW,-1) AND LOW < Ref(LOW,1) Graphic: Buy Arrow Color: Black Label: Isolated Low Name: Isolated High Condition: HIGH > Ref(HIGH,-1) AND HIGH > Ref(HIGH,1) Graphic: Sell Arrow Color: Black Label: Isolated High Note: If the Symbol labels make the chart too busy you may want to shorten the label (e.g. change Isolated High to IH). Next, close the Expert Advisor, open any chart, and then click the right-mouse button on the chart‟s heading. Choose Expert Advisor and then Attach from the Chart Shortcut Menu. You can now choose Fibonacci Retracement from the Insert menu, and then drag from one isolated extreme to another. In MetaStock 6.5 you should right-click on the Fibonacci Retracement lines and choose properties. Check the Snap to Price checkbox so the Retracement lines will automatically snap to the high and low prices. If you followed these steps correctly, your chart should look like the chart below. 53 1997 December TASC Trader's Tip - Volatility % Indicator You can easily create the Volatility% Indicator from William Brower‟s article in MetaStock for Windows. First choose Indicator Builder from the Tools menu in MetaStock. Next choose New and enter one of the following formulas: Formula for MetaStock 6.5 Volatility% Lookback := Input("Time Periods",1,1000,50); HighVolatility := Input("High Volatility %",.01,100,3); 100 * Sum(100 * ATR(1)/CLOSE > HighVolatility, Lookback)/Lookback 1998 January Tasc - Breaking out of Price Channels - VIDYA Article Breaking out of Price Channels, by Gerald Marisch,"Technical Analysis of Stocks & Commodities", January 1998, page 93. "Here's a technique based upon Tushar Chande's variable-length moving average. The indicator is more responsive to market price movements than a conventional simple or exponential moving average, and can be used for position trading." The following formula will match the authors slight modification to the variable moving average: VIDYA 21,5 Indicator Length:=Input("Length",1,200,21); Smooth:=Input("Smoothing",1,200,5); AbsCMO:=(Abs(CMO(C,Length)))/100; SC:=2/(Smooth+1); VIDYA:=If(Cum(1)<=(Length+1),C,(SC*AbsCMO*CLOSE)+(1-(SC*AbsCMO))*PREV); VIDYA The following Expert highlights will show you when the price has undergone trend changes as discussed in the article. Enter each section as a separate highlight in an Expert Advisor. To do this, create a new Expert and select Highlights from the tab dialog. Then select New and name it Bull. Paste the Bull trend formula into the condition box within the editor and set the color to green. Do this for the Bear and the Pause conditions as well, selecting the matching colors, Attach this Expert to your chart and if the conditions are met, the price bars will be displayed in the proper colors. Green Bars (Bull trend): Length:=21; Smooth:=5; 54 AbsCMO:=(Abs(CMO(C,Length)))/100; SC:=2/(Smooth+1); VIDYA:=If(Cum(1)<=(Length+1),C,(SC*AbsCMO*CLOSE)+(1-(SC*AbsCMO))*PREV); C>(Vidya*1.01) Red Bars (Bear trend): Length:=21; Smooth:=5; AbsCMO:=(Abs(CMO(C,Length)))/100; SC:=2/(Smooth+1); VIDYA:=If(Cum(1)<=(Length+1),C,(SC*AbsCMO*CLOSE)+(1-(SC*AbsCMO))*PREV); C<(VIDYA*.99) Yellow Bars( Pause or pending reversal of the trend): Length:=21; Smooth:=5; AbsCMO:=(Abs(CMO(C,Length)))/100; SC:=2/(Smooth+1); VIDYA:=If(Cum(1)<=(Length+1),C,(SC*AbsCMO*CLOSE)+(1-(SC*AbsCMO))*PREV); C>(VIDYA*.99) AND C<(VIDYA*1.01) 55 Smoothing Techniques for more Accurate Signals The following formulas are from the 1998 January TASC article "Smoothing Techniques for more Accurate Signals", by Tim Tillson. Refer to his article for interpretation. "More sophisticated smoothing techniques can be used to determine market trend. Better trend recognition can be lead to more accurate trading signals." ILRS Periods:=Input("Periods?",2,63,11); Size:=LastValue(Cum(1)); Start:=LastValue(Ref(Mov(P,Periods,S),Periods-Size)); Cum(LinRegSlope(P,Periods))+Start; T3 Periods:=Input("Periods?",1,63,5); a:=Input("Hot?",0,2,.7); e1:=Mov(P,Periods,E); e2:=Mov(e1,Periods,E); e3:=Mov(e2,Periods,E); e4:=Mov(e3,Periods,E); e5:=Mov(e4,Periods,E); e6:=Mov(e5,Periods,E); c1:=-a*a*a; c2:=3*a*a+3*a*a*a; c3:=-6*a*a-3*a-3*a*a*a; c4:=1+3*a+a*a*a+3*a*a; c1*e6+c2*e5+c3*e4+c4*e3; February 1998 TASC Trader's Tip - "Anchored Momentum" The four indicators in Rudy Stefenel‟s article "Anchored Momentum" can be easily created in MetaStock. First, choose Indicator Builder from the Tools menu. If you have MetaStock 6.5 enter the following formulas: General Anchored Momentum w/ Exponential Smoothing MomPer := Input("Momentum Periods",1,1000,10); SmaPer := Input("Simple Moving Average Periods",1,1000,7); EmaPer := Input("Exponential Moving Average Periods",1,1000,7); 100 * ((Mov(CLOSE, EMAPer, E) / Ref(Mov(CLOSE, SmaPer, S), ((SmaPer - 1)/2) - MomPer)) - 1) General Anchored Momentum MomPer := Input("Momentum Periods",1,1000,10); SmaPer := Input("Simple Moving Average Periods",1,1000,7); 56 100 * ((CLOSE / Ref(Mov(CLOSE, SmaPer, S), ((SmaPer - 1)/2) - MomPer)) - 1) Most Anchored Momentum w/ Exponential Smoothing MomPer := Input("Momentum Periods",1,1000,10); SmaPer := Input("Simple Moving Average Periods",1,1000,7); EmaPer := Input("Exponential Moving Average Periods",1,1000,7); 100 * ((Mov(CLOSE, EmaPer, E) / Mov(CLOSE, (2 * MomPer) + 1, S) ) - 1) Most Anchored Momentum MomPer := Input("Momentum Periods",1,1000,10); SmaPer := Input("Moving Average Periods",1,1000,7); 100 * ((CLOSE / Mov(CLOSE, (2 * MomPer) + 1, S) ) - 1) Drag any of the above indicators from the Indicator QuickList to the desired chart. MetaStock 6.5 will prompt you to enter values for the specified parameters. If you have an earlier version of MetaStock, you will need to enter values in the following formulas instead of using the MomPer, SmaPer, and EmaPer variables. General Anchored Momentum w/ Exponential Smoothing 100 * ((Mov(CLOSE, EMAPer, E) / Ref(Mov(CLOSE, SmaPer, S), ((SmaPer - 1)/2)- MomPer)) - 1) General Anchored Momentum 100 * ((CLOSE / Ref(Mov(CLOSE, SmaPer, S), ((SmaPer - 1)/2) - MomPer)) -1) Most Anchored Momentum w/ Exponential Smoothing 100 * ((Mov(CLOSE, EmaPer, E) / Mov(CLOSE, (2 * MomPer) + 1, S) ) - 1) Most Anchored Momentum 100 * ((CLOSE / Mov(CLOSE, (2 * MomPer) + 1, S) ) - 1) 57 1998 February TASC - Double Tops and Double Bottoms In the February 1998 issue of Technical Analysis of Stocks & Commodities magazine, Thomas Bulkowski discusses the use of Double Bottoms as a means of finding profitable trades. In MetaStock for Windows, you can find both Double Tops and Double Bottoms with these formulas. There is a caveat however. In the article, Mr. Bulkowski utilizes the High-Low range in finding Double Bottoms. These formulas use only the close value, so a few of the lower priced issues will not produce signals in MetaStock. Overall, however, these formulas produce most of the major signals he discusses. Double Tops PK:=Zig(C,10,%)<Ref(Zig(C,10,%),-1) AND Ref(Zig(C,10,%),-1)>Ref(Zig(C,10,%),-2); TR:=Zig(C,10,%)>Ref(Zig(C,10,%),-1) AND Ref(Zig(C,10,%),-1)<Ref(Zig(C,10,%),-2); PK1:=PeakBars(1,C,10); PK2:=PeakBars(2,C,10); (ValueWhen(1,PK,Ref(C,-1))/ValueWhen(2,PK,Ref(C,-1))>.96 AND ValueWhen(1,PK,Ref(C,-1)) / ValueWhen(2,PK,Ref(C,-1))<1.04) AND PK2-PK1>=10 AND Cross(ValueWhen(1,TR,Ref(C,-1)),C) Double Bottoms PK:=Zig(C,10,%)<Ref(Zig(C,10,%),-1) AND Ref(Zig(C,10,%),-1)>Ref(Zig(C,10,%),-2); TR:=Zig(C,10,%)>Ref(Zig(C,10,%),-1) AND Ref(Zig(C,10,%),-1)<Ref(Zig(C,10,%),-2); TR1:=TroughBars(1,C,10); TR2:=TroughBars(2,C,10); (ValueWhen(1,TR,Ref(C,-1))/ValueWhen(2,TR,Ref(C,-1))>.96 AND ValueWhen(1,TR,Ref(C,-1)) / ValueWhen(2,TR,Ref(C,-1))<1.04) AND TR2-TR1>=10 AND Cross(C,ValueWhen(1,PK,Ref(C,-1))) 58 1998 March TASC Trader's Tip - Adaptive Moving Average In MetaStock 6.5 you can easily create the Perry Kaufman Adaptive Moving Average system. With MetaStock 6.5 running, choose Indicator Builder from the Tools menu and then click on the New button. Enter the following formulas. Adaptive Moving Average Binary Wave Periods := Input("Time Periods",1,1000, 10); Direction := CLOSE - Ref(Close,-periods); Volatility := Sum(Abs(ROC(CLOSE,1,$)),periods); ER := Abs(Direction/Volatility); FastSC := 2/(2 + 1); SlowSC := 2/(30 + 1); SSC := ER * (FastSC - SlowSC) + SlowSC; Constant := Pwr(SSC,2); AMA := If(Cum(1) = periods +1, ref(Close,-1) + constant * (CLOSE - ref(Close,-1)),Prev + constant * (CLOSE - PREV)); FilterPercent := Input("Filter Percentage", 0,100,15)/100; Filter := FilterPercent * Std(AMA - Ref(AMA,-1),Periods); AMALow := If(AMA < Ref(AMA,-1),AMA,PREV); AMAHigh := If(AMA > Ref(AMA,-1),AMA,PREV); If(AMA - AMALow > Filter, 1 {Buy Signal}, If(AMAHigh - AMA > Filter, -1 {Sell Signal}, 0 {No_Signal})) Adaptive Moving Average Periods := Input("Time Periods",1,1000, 10); Direction := CLOSE - Ref(CLOSE,-periods); Volatility := Sum(Abs(ROC(CLOSE,1,$)),periods); ER := Abs(Direction/Volatility); FastSC := 2/(2 + 1); SlowSC := 2/(30 + 1); SSC := ER * (FastSC - SlowSC) + SlowSC; Constant := Pwr(SSC,2); 59 AMA := If(Cum(1) = periods +1, ref(Close,-1) + constant * (CLOSE - ref(Close,-1)),Prev + constant * (CLOSE - PREV)); AMA If you want to see the Adaptive Moving Average, just plot it on any chart. If you want to see the buy and sell signals of the Adaptive Moving Average system plot the Adaptive Moving Average Binary wave. This binary wave plots a 1 when there is a buy signal, a –1 when there is a sell signal and a zero when there is no signal. 1998 May TASC Trader's Tip - Automatic Support and Resistance Copied from Technical Analysis of Stocks and Commodities Magazine. This is in regards to an article on page 51 of the May 1998 issue. In my article "Automatic support and resistance" in this issue, I present a computerized approach to finding support and resistance levels on a chart. To recreate the indicators and system described in my article using MetaStock for Windows, enter the following formulas: Indicators: S1: IF(Ref(LOW,-4)=LLV(LOW,9),Ref(LOW,-4),PREVIOUS) S2: IF(Fml("S1")=Ref(Fml("S1"),-1),PREVIOUS,Ref(Fml("S1"),-1)) S3: IF(Fml("S1")=Ref(Fml("S1"),-1),PREVIOUS,Ref(Fml("S2"),-1)) S4: IF(Fml("S1")=Ref(Fml("S1"),-1),PREVIOUS,Ref(Fml("S3"),-1)) S5: IF(Fml("S1")=Ref(Fml("S1"),-1),PREVIOUS,Ref(Fml("S4"),-1)) S6: IF(Fml("S1")=Ref(Fml("S1"),-1),PREVIOUS,Ref(Fml("S5"),-1)) WSO: 100*(1(Int(Fml("S1")/CLOSE)+Int(Fml("S2")/CLOSE)+Int(Fml("S3")/CLOSE)+Int(Fml("S4")/CLOSE) +Int(Fml("S5")/CLOSE)+Int(Fml("S6")/CLOSE))/6) R1: IF(Ref(HIGH,-4)=HHV(HIGH,9),Ref(HIGH,-4),PREVIOUS) R2: IF(Fml("R1")=Ref(Fml("R1"),-1),PREVIOUS,Ref(Fml("R1"),-1)) R3: IF(Fml("R1")=Ref(Fml("R1"),-1),PREVIOUS,Ref(Fml("R2"),-1)) R4: IF(Fml("R1")=Ref(Fml("R1"),-1),PREVIOUS,Ref(Fml("R3"),-1)) R5: IF(Fml("R1")=Ref(Fml("R1"),-1),PREVIOUS,Ref(Fml("R4"),-1)) R6: IF(Fml("R1")=Ref(Fml("R1"),-1),PREVIOUS,Ref(Fml("R5"),-1)) WRO: 100*(1(Int(Fml("R1")/CLOSE)+Int(Fml("R2")/CLOSE) +Int(Fml("R3")/CLOSE)+Int(Fml("R4")/CLOSE) +Int(Fml("R5")/CLOSE)+Int(Fml("R6")/CLOSE))/6) The indicators S1 through S6 and R1 through R6 should be plotted as points and not as a continuous line. Trading System Formulas and Parameters: Enter long positions on either building support or sustained uptrend and exit position using stops. No short positions. Enter Long: Fml("WSO") > Mov( Fml("WSO") , 4 , S ) OR Mov( Fml("WRO") , 30 , S ) > 95 Stop Out: Breakeven stop: Floor level at 2% Trailing stop: Profit risk of 10 Percent, ignoring 10 periods Maximum loss stop: Maximum loss of 7% 60 Other Conditions: Initial equity = 1000, Long positions only, Trade price = close, Trade delay = 0, Entry commission = 0%, Exit commission = 0%, , Interest rate = 5%, Margin req. 100% 1998 June TASC Traders' Tip - Mutated Variables, Volatility and a New Market Paradigm Mutated Variables, Volatility and a New Market Paradigm by Walter T. Downs, Ph.D. In MetaStock for Windows 6.0 or higher, use the Expert Advisor to create highlights, which will show when contraction and expansion phases are present. First, choose Expert Advisor from the tools menu in MetaStock. Create a new Expert with the following highlights: Expert name: New Market Paradigm HIGHLIGHTS Name: Contraction Condition: BBandTop(CLOSE,28,SIMPLE,2)< Ref(BBandTop(CLOSE,28,SIMPLE,2),-1) AND BBandBot(CLOSE,28,SIMPLE,2)>Ref(BBandBot(CLOSE,28,SIMPLE,2),-1) Color: Blue Name: Expansion Condition: BBandTop(CLOSE,28,SIMPLE,2)> Ref(BBandTop(CLOSE,28,SIMPLE,2),-1) AND BBandBot(CLOSE,28,SIMPLE,2)<Ref(BBandBot(CLOSE,28,SIMPLE,2),-1) Color: Red Click OK to save the changes to the Expert. Open a chart and then click your right-mouse button while pointing at the chart heading. Choose Expert Advisor and then choose Attach from the chart shortcut menu. Choose the New Market Paradigm Expert and then click the OK button. The price bars in the chart will be highlighted blue during a contraction phase and red in an expansion phase 61 1998 July Trader's Tip - Channel Analysis Channel Analysis, beginning on page 18 of the July 1998 Technical Analysis of Stocks & Commodities Magazine It's quite easy to create the Trend Channels discussed in Thom Hartle's Channel Analysis article in MetaStock for Windows. After opening a chart, you may want to zoom in a little to make it easier to draw the Trend Channels more precisely. You can do this by clicking on the "+" button located on the Chart Toolbar at the bottom of the chart. Next you may want to identify the bars for the support or resistant points by drawing circles on the bars as Mr. Hartle did in the article, or you can use symbols from the symbol pallete. Both can be chosen from the Drawing Toolbar which is on left side of the chart. After identifying the points to draw the trendline, click on the Trendline button, also located on the Drawing Toolbar, and draw the trendline between the closing prices of the two bars. If you are using MetaStock 6.5, you may want to right-click on the trendline, choose properties, and then check the Snap to Price checkbox. This will make the trendline line up exactly with the closing prices. To create the second trendline of the Trend Channel, right-click on the first trendline and choose Create Parallel Line. Drag this parallel line so it aligns with the highest high between the two support points or the lowest low between two resistance points. If desired, you can go to the properties of each of these trendlines and choose to extend the lines to the right. 1998 July Trader's Tip - A Volatility Trade In Gold "A Volatility Trade In Gold" by David S. Landry, CTA, Technical Analysis of Stocks & Commodities, page 87. In this article the author gives formulas for three indicators MetaStock. The formulas as given will work in all versions of MetaStock. However, there is an error in the formula the author names Volatility 12 EMA. The formula should be: Mov((Fml("CONHV4") + Fml("CONHV6") + Fml("CONHV10"))/3,12,e) Here are formulas for version 6.5 of MetaStock for Windows. These formulas use Inputs which allow you to select the time periods when you plot the formulas. David Landry Historical Volatility Num:=Input("Number Of Periods For Numerator",1,100,4); Den:=Input("Number Of Periods For Denominator",2,1000,100); Std(Log(C/Ref(C,-1)),Num)/Std(Log(C/Ref(C,-1)),Den) David Landry Average Historical Volatility Den:=Input("Number Of Periods For Denominator",2,1000,100); ((Std(Log(C/Ref(C,-1)),4)/Std(Log(C/Ref(C,-1)),Den))+(Std(Log(C/Ref(C,-1)),6)/Std(Log(C/Ref(C,- 1)),Den))+(Std(Log(C/Ref(C,-1)),10)/Std(Log(C/Ref(C,-1)),Den)))/3 David Landry EMA of Historical Volatility Den:=Input("Number Of Periods For Denominator",2,1000,100); EMA:=Input("Number Of Periods For EMA",2,100,12); Mov(((Std(Log(C/Ref(C,-1)),4)/Std(Log(C/Ref(C,-1)),Den))+(Std(Log(C/Ref(C,-1)),6)/Std(Log(C/Ref(C,- 1)),Den))+(Std(Log(C/Ref(C,-1)),10)/Std(Log(C/Ref(C,-1)),Den)))/3,LastValue(EMA),E) Note: Standard deviation information was not included here because the way these formulas are being used, any standard deviation being used would return an identical value as 1 standard deviation. 62 1998 August Trader's Tip - From Terms To Technical Tools In Walter Downs‟ article "From Terms To Technical Tools" he introduces the Point of Balance Oscillator, two conditions to color bars and two system tests. All of these can be created quite easily in MetaStock 6.5. To create the Point of Balance Oscillator, choose Indicator Builder from the Tools menu, click on the New button, and enter the following formula: Point of Balance Oscillator n := Input("Time Periods",1,100,12)/2; POBC1 := (HHV(CLOSE, n) + LLV(CLOSE,n))/2; POBC2 := (HHV(POBC1, n) + LLV(POBC1,n))/2; POBC3 := (HHV(POBC2, n) + LLV(POBC2,n))/2; POBC4 := (HHV(POBC3, n) + LLV(POBC3,n))/2; POBC5 := (HHV(POBC4, n) + LLV(POBC4,n))/2; POBC6 := (HHV(POBC5, n) + LLV(POBC5,n))/2; POBC7 := (HHV(POBC6, n) + LLV(POBC6,n))/2; POBC8 := (HHV(POBC7, n) + LLV(POBC7,n))/2; POBC9 := (HHV(POBC8, n) + LLV(POBC8,n))/2; POBC10 := (HHV(POBC9, n) + LLV(POBC9,n))/2; AV := (POBC1 + POBC2 + POBC3 + POBC4 + POBC5 + POBC6 + POBC7 + POBC8 + POBC9 + POBC10) / 10; POBCOsc := 100 * ((CLOSE - AV) / (HHV(CLOSE, 10)-LLV(CLOSE, 10))); POBCOsc To highlight bars based on the Bull Fear and Bear Fear conditions discussed in the article, choose Expert Advisor from the Tools menu, click on the New button and enter the following expert: Bull Fear and Bear Fear Expert HIGHLIGHTS Name: Bull Fear Condition: n := 12 {Time periods}; BullFear := (HHV(HIGH,n) - LLV(HIGH,n))/2 + LLV(HIGH,n); CLOSE > BullFear 63 Color: Blue Name: Bear Fear Condition: n := 12 {Time periods}; BearFear := (HHV(LOW,n) - LLV(LOW,n))/2 + LLV(LOW,n); CLOSE < BearFear Color: Red To test the two systems discussed in the article, choose System Tester from the Tools menu and enter both of the following systems: Bull and Bear Fear System Test SIGNAL FORMULAS --------------- Enter Long: n := 12 {Time periods}; BullFear := (HHV(HIGH,n) - LLV(HIGH,n))/2 + LLV(HIGH,n); Cross(CLOSE,BullFear) Enter Short: n := 12 {Time periods}; BearFear := (HHV(LOW,n) - LLV(LOW,n))/2 + LLV(LOW,n); Cross(BearFear,CLOSE) Four-Bar Fear System Test SIGNAL FORMULAS --------------- Enter Long: n := 12 {Time periods}; BullFear := (HHV(HIGH,n) - LLV(HIGH,n))/2 + LLV(HIGH,n); BearFear := (HHV(LOW,n) - LLV(LOW,n))/2 + LLV(LOW,n); 64 Cross(CLOSE,BullFear) AND Ref(Sum(CLOSE < BullFear AND CLOSE > BearFear,4),-1) = 4 Close Long: LOW < Ref(LLV(LOW,3),-1) Enter Short: n := 12 {Time periods}; BullFear := (HHV(HIGH,n) - LLV(HIGH,n))/2 + LLV(HIGH,n); BearFear := (HHV(LOW,n) - LLV(LOW,n))/2 + LLV(LOW,n); Cross(BearFear,CLOSE) AND Ref(Sum(CLOSE < BullFear AND CLOSE > BearFear,4),-1) = 4 Close Short: HIGH > Ref(HHV(HIGH,3),-1) After entering the systems click on the Options button in the System Tester dialog, go to the Testing tab and change the Trade Price to Open and set the Trade delay to one. Following is the formula for the moving averages discussed in the article, but not contained in the Traders Tip published in TASC. Please note, this formula will plot all three moving averages, but will not plot them in three different colors. TP:=Input("Time Periods",1,100,12); BLF:=((HHV(H,TP)+LLV(H,TP))/2); BRF:=((HHV(L,TP)+LLV(L,TP))/2); POB:=((BLF-BRF)/2)+BRF; BLF; BRF; POB 65 1998 September TASC Trader's Tip - Simple Moving Average with Resistance and Support In this issue, Dennis L.Tilley uses support and resistance to confirm price and SMA crossover signals in his article "Simple Moving Average with Resistance and Support". In MetaStock for Windows, you can easily recreate the SMARS Indicators discussed in Tilley's article. First, choose Indicator Builder from the Tools menu in MetaStock 6.5. Next, choose New and enter the following formulas: Resistance and Support LookBack := Input("Look Back Periods",1,1000,10); Resistance :=ValueWhen(1,Cross(Mov(C, LookBack, S),C),HHV(H, LookBack)); Support :=ValueWhen(1,Cross(C,Mov(C, LookBack, S)),LLV(L, LookBack)); Resistance; Support; Resistance and Support * F PrCnt:=Input("Percentage",0,100,10); LookBack:= Input("Look Back Periods",1,1000,10); Resistance:=ValueWhen(1,Cross(Mov(C,LookBack,S),C),HHV(H,LookBack)); Support:=ValueWhen(1,Cross(C,Mov(C,LookBack,S)),LLV(L,LookBack)); Resistance * ((100-prcnt)/100); Support * ((prcnt/100)+1); Note* It is much easier to see the difference between the actual "Resistance and Support" lines and the "Resistance and Support * F " lines if you change the color and/or style of one of them. * To Display the Indicators in MetaStock 6.5 Drag the "Moving Average" indicator from the Indicator QuickList into the price window. Choose Simple as the method, enter the time periods and then click OK. Now, drag the "Resistance and Support" indicator from the QuickList into the price window. You will be prompted to enter the "Look Back" periods. You should select the same time periods you used with the "Moving Average". Finally, drag the "Resistance and Support * F" indicator into the price window. You will be prompted to enter the "Percentage" and the "Look Back" periods. If you would like the indicator to be a 10% difference from the "Resistance and Support" line, you would enter 10. You should select the same time periods you used with the "Moving Average". 66 1998 October TASC Trader's Tip - "Combining Statistical and Pattern Analysis", Shark – 32 In MetaStock for Windows you can use the Expert Advisor to recreate the "Shark – 32" signals on your charts as discussed in Walter T. Down's article "Combining Statistical and Pattern Analysis". First, choose Expert Advisor from the Tools menu in MetaStock 6.5. Next, choose New and enter the following formulas: Name: Click the Name tab and enter "Shark – 32" in the Name field. Trends: Click the Trends tab and enter the following formulas in the Bullish and Bearish fields. Bullish: Mov(C,5,S)>Mov(C,20,S); Bearish: Mov(C,5,S)<Mov(C,20,S); Highlights: rd Click the Highlights tab, choose New, and enter "3 Bar" in the Name field. Now change the color in the Color field to Blue. Finally, enter the following formula in the Condition field, and then choose OK. Symmetry:=.28; Apex:=(H+L)/2; WB:=Ref(H,-2)-Ref(L,-2); Shark:=If((H<Ref(H,-1) AND L>Ref(L,-1) AND Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)>Ref(L,-2))=1,If(Apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry)) ,1,0),0); Shark; Using the same method as above, enter the following 2 highlight formulas. Name: 2nd Bar Color: Blue Condition: Symmetry:=.28; Apex:=(H+L)/2; WB:=Ref(H,-2)-Ref(L,-2); Shark:=If((H<Ref(H,-1) AND L>Ref(L,-1) AND Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)>Ref(L,-2))=1,If(Apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry)) ,1,0),0); 67 Ref(Shark,+1)=1; Name: 1st Bar Color: Blue Condition: Symmetry:=.28; Apex:=(H+L)/2; WB:=Ref(H,-2)-Ref(L,-2); Shark:=If((H<Ref(H,-1) AND L>Ref(L,-1) AND Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)>Ref(L,-2))=1,If(Apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry)) ,1,0),0); Ref(Shark,+2)=1; Symbols: Click the Symbols tab, choose New and enter "Shark Buy" in the Name field. Now enter the following formula in the Condition field. Symmetry:=.28; Apex:=(H+L)/2; WB:=Ref(H,-2)-Ref(L,-2); Shark:=If((H<Ref(H,-1) AND L>Ref(L,-1) AND Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)>Ref(L,-2))=1,If(apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry)) ,1,0),0); Buyok:=Cross(C,ValueWhen(1,Shark=1,Ref(H,-2))); Chk:=Cum(Buyok)-ValueWhen(1,Shark=1,Cum(Buyok)); ValidChk:=Alert(Shark=1,25); {Note* The above ValidChk variable makes the Shark signal valid for 25 periods. If the price does not cross above the High value of the base within 25 periods, you will not receive a signal. You can change the number of periods by changing 25 to the number of periods you desire. *} Buy:= Buyok=1 AND Ref(Chk,-1)=0 AND ValidChk=1; Buy; Click the Graphic tab. Change the symbol in the Graphic field to Buy Arrow. Now change the color in the Color field to Green. Finally, type "Buy" in the Label field, and then choose OK. 68 Using the Same method as above, enter the following Symbol formula. Name: Shark Sell Condition: Symmetry:=.28; Apex:=(H+L)/2; WB:=Ref(H,-2)-Ref(L,-2); Shark:=If((H<Ref(H,-1) AND L>Ref(L,-1) AND Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)>Ref(L,-2))=1,If(apex <= (Ref(H,-2)-(WB*Symmetry)) AND Apex >= (Ref(L,-2)+(WB*Symmetry)) ,1,0),0); Sellok:=Cross(ValueWhen(1,Shark=1,Ref(L,-2)),C); Chk:=Cum(Sellok)-ValueWhen(1,Shark=1,Cum(Sellok)); ValidChk:=Alert(Shark=1,25); {Note* The above ValidChk variable makes the Shark signal valid for 25 periods. If the price does not cross below the Low value of the base within 25 periods, you will not receive a signal. You can change the number of periods by changing 25 to the number of periods you desire. *} Sell:= Sellok=1 AND Ref(Chk,-1)=0 AND ValidChk=1; Sell; Symbol: Sell Arrow Color: Red Label: Sell After you have finished creating the Symbol formulas, you can attach the Expert to your chart by choosing Expert Advisor from the Tools Menu. Select the Expert called "Shark –32" from your list of Experts, choose Attach, and then Close. 69 1998 October Futures Magazine - "Better Bollinger Bands" In an article in Futures Magazine, October 1998, Dennis McNicholl describes the use of Bollinger Bands and provides a means of making them tighter when markets are trending. He calls them Better Bollinger Bands. Here is the formula for MetaStock 6.5 or higher. pds:=Input("Periods",2,200,20); sd:=Input("Standard Deviations",.01,10,2); alpha:=2/(pds+1); mt:=alpha*C+(1-alpha)*(If(Cum(1)<pds,C,PREV)); ut:=alpha*mt+(1-alpha)*(If(Cum(1)<pds,C,PREV)); dt:=((2-alpha)*mt-ut)/(1-alpha); mt2:=alpha*Abs(C-dt)+(1-alpha)*PREV; ut2:=alpha*mt2+(1-alpha)*PREV; dt2:=((2-alpha)*mt2-ut2)/(1-alpha); but:=dt+sd*dt2; blt:=dt-sd*dt2; dt; but; blt 70 TASC 1999 Bonus Issue - Dynamic Multiple Time Frames Here are the formulas described in the 1999 bonus issue of "Technical Analysis of Stocks & Commodities" magazine in the article "Dynamic Multiple Time Frames", p 45. All formulas are written to use daily data. The lines are plotted as described in the article, with the fixed lines only changing their values on the first day of each week. A sixth formula, Tendency, was added to indicate which way the price will tend to move, based on the relationship between the Friday close and the fixed balance point. This formula plots a value on Thursday and on Friday just in case Friday is a market holiday. On every trading week which includes Friday data, ignore the Thursday value. A value of 1 means prices will tend up first and a value of -1 means they will tend down Variables were used in places to simplify the formulas and to allow the referencing of certain values in formulas that plot multiple lines. ________________________________________ Dynamic Balance Point Ref( HHV(H,5)+LLV(L,5)+C, -1)/3 _______________________________________ Dynamic BP Steps WBPS:= Ref( (HHV(H,5)+LLV(L,5)+C)/3,-1); ( WBPS + Ref(WBPS,-5) + Ref(WBPS,-10) + Ref(WBPS, -15) + Ref(WBPS,-20) ) / 5 ________________________________________ Fixed Balance Point day:=DayOfWeek(); FBC:= If(day=1, If(BarsSince(day=1)>5, Ref( HighestSince(1,day=2,H) + LowestSince(1,day=2,L)+C,-1)/3, Ref( HighestSince(1,day=1,H) + LowestSince(1,day=1,L)+C,-1)/3), If(day=2 AND Ref(day,-1)>1, If(BarsSince(day=1)>5, Ref( HighestSince(1,day=2,H) + LowestSince(1,day=2,L)+C,-1)/3, Ref( HighestSince(1,day=1,H) + LowestSince(1,day=1,L)+C,-1)/3),0)); ValueWhen(1,FBC>0,FBC) 71 ______________________________________ Support & Resistance day:=DayOfWeek(); WR:= If(day=1, If(BarsSince(day=1)>5, Ref( HighestSince(1,day=2,H) - LowestSince(1,day=2,L),-1), Ref( HighestSince(1,day=1,H) - LowestSince(1,day=1,L), -1)), If(day=2 AND Ref(day,-1)>1, If(BarsSince(day=1)>5, Ref( HighestSince(1,day=2,H) - LowestSince(1,day=2,L),-1), Ref( HighestSince(1,day=1,H) - LowestSince(1,day=1,L),-1)),0)); WRV:= ValueWhen(1,WR>0,WR); T1:=Fml("Fixed Balance Point") + (WRV*.5); T2:=Fml("Fixed Balance Point") + (WRV*.618); B1:=Fml("Fixed Balance Point") - (WRV*.5); B2:=Fml("Fixed Balance Point") - (WRV*.618); T1; T2; B1; B2 ____________________________________________ Weekly BP Steps (Peak(1,FmlVar("Fixed Balance Point","FBC"),1) + Peak(2,FmlVar("Fixed Balance Point","FBC"),1) + Peak(3,FmlVar("Fixed Balance Point","FBC"),1)+ Peak(4,FmlVar("Fixed Balance Point","FBC"),1) + Peak(5,FmlVar("Fixed Balance Point","FBC"),1) ) / 5 ____________________________________________ Tendency 72 If(DayOfWeek()=4 OR DayOfWeek()=5, If((HighestSince(1,Cross(3,DayOfWeek()),H)+ LowestSince(1,Cross(3,DayOfWeek()),L)+C)/3<C,1,-1),0) 1999 February TASC Traders' Tip - Stock Rhythm System In Jeffrey Owen Katz's article "Trading stocks with a cyclical system" he introduces the Stock Rhythm System. In MetaStock 6.5, or higher, you can easily create this system. With MetaStock running choose "System Tester" from the Tools menu, click on the New button and enter the following formulas: Enter Long thresh:= 4; k:= 3; m:= 63; Value1:= Stdev(Ref(ROC(C,k,$),-m),20); Value2:= Ref(ROC(C,k,$),-m); When(Value2 > thresh*Value1) Enter Short thresh:= 4; k:= 3; m:= 63; Value1:= Stdev(Ref(ROC(C,k,$),-m),20); Value2:= Ref(ROC(C,k,$),-m); When(Value2 <-thresh*Value1) Stops Inactivity Positions - Long and Short Method - Points Minimum Change - 15000 Periods - 10 After entering the formulas click OK, then click on Options. On the Testing page set the Trade Delay to 0, set Positions to Both, then set any other desired options Click OK to save the changes, then open a chart and run the system. 73 June 1999 TASC Traders Tip - How Smooth is Your Data Smoother? (Sine- Wave Weighted Moving Average) {#&} The article "How Smooth is Your Data Smoother", by Patrick E. Lafferty, reviews different types of moving averages, including a Sine-Weighted Moving Average. The Sine-Weighted Moving Average can easily be created in MetaStock 6.5 or higher. In MetaStock select the "Indicator Builder" from the "Tools" menu. In the Indicator Builder click "New" and enter the name (shown below in Bold font) in the Name field. Then place the formula (all the text after "FORMULA:" and before "*END OF FORMULA*") in the Formula field in the Indicator Builder: NAME: Sine-Weighted Moving Average FORMULA: PI:=3.1415926; SD:=180/6; S1:=Sin(1*180/6)*C; S2:=Sin(2*180/6)*Ref(C,-1); S3:=Sin(3*180/6)*Ref(C,-2); S4:=Sin(4*180/6)*Ref(C,-3); S5:=Sin(5*180/6)*Ref(C,-4); Num:=S1+S2+S3+S4+S5; Den:=Sin(SD)+Sin(2*SD)+Sin(3*SD)+Sin(4*SD)+Sin(5*SD); Num/Den *END OF FORMULA* March 2000 TASC Traders' Tip - Hilbert Indicators Tell You When To Trade! The indicators introduced in the article “Hilbert Indicators Tell You When To Trade”, by John Ehlers, can be created in MetaStock 7.0 or higher with the use the new MetaStock External Function (MSX) DLL Interface. Click here to download the formulas. After downloading the exe file double-click it and the formulas will automatically be imported into MetaStock. After the import has finished the two indicators, HilbertPeriod and HilbertSNR, will appear in the Indicator QuickList. Note you must have MetaStock 7 or higher. 2000 May TASC Traders' Tip - Instantaneous Trendline and Sinewave Indicator as described by John Ehlers Here is the MetaStock 6.52 or higher formula code for the Instantaneous Trendline and Sinewave Indicator as described by John Ehlers in his article “At Last! A Trend-Friendly Oscillator”. To implement them the following formulas must be created in MetaStock‟s Indicator Builder. Each formula must be created separately and must be named exactly as it appears below. Only the last two formulas are plotted, so you may wish to prevent the others from being displayed in the Indicator QuickList by unchecking the “Display In QuickList” option when creating the formula. To download and install the formulas use the following steps Download the MS65FORM.DTA file into a temp folder To Download the file for this formula click MS65FORM.DTA 74 Use the following instructions to Import the MS65FORM.DTA file from the temp file it was downloaded to. 1. Run MetaStock. 2. Choose Indicator Builder from the Tools menu. 3. Click the Organize button to launch the Formula Organizer Wizard. 4. Follow the on-screen instructions. Name: H cycle count 1a value:= Fml("Hilbert cycle period - 1a"); If(Sum(value,6)>=360 AND Sum(value,5)<360 ,6,0) + If(Sum(value,7)>=360 AND Sum(value,6)<360 ,7,0) + If(Sum(value,8)>=360 AND Sum(value,7)<360 ,8,0) + If(Sum(value,9)>=360 AND Sum(value,8)<360 ,9,0) + If(Sum(value,10)>=360 AND Sum(value,9)<360 ,10,0) + If(Sum(value,11)>=360 AND Sum(value,10)<360 ,11,0) + If(Sum(value,12)>=360 AND Sum(value,11)<360 ,12,0) + If(Sum(value,13)>=360 AND Sum(value,12)<360 ,13,0) + If(Sum(value,14)>=360 AND Sum(value,13)<360 ,14,0) + If(Sum(value,15)>=360 AND Sum(value,14)<360 ,15,0) Name: H cycle count 2a value:= Fml("Hilbert cycle period - 1a"); If(Sum(value,16)>=360 AND Sum(value,15)<360 ,16,0) + If(Sum(value,17)>=360 AND Sum(value,16)<360 ,17,0) + If(Sum(value,18)>=360 AND Sum(value,17)<360 ,18,0) + If(Sum(value,19)>=360 AND Sum(value,18)<360 ,19,0) + If(Sum(value,20)>=360 AND Sum(value,19)<360 ,20,0) + If(Sum(value,21)>=360 AND Sum(value,20)<360 ,21,0) + If(Sum(value,22)>=360 AND Sum(value,21)<360 ,22,0) + If(Sum(value,23)>=360 AND Sum(value,22)<360 ,23,0) + If(Sum(value,24)>=360 AND Sum(value,23)<360 ,24,0) + If(Sum(value,25)>=360 AND Sum(value,24)<360 ,25,0) Name: H cycle count 3a value:= Fml("Hilbert cycle period - 1a"); If(Sum(value,26)>=360 AND Sum(value,25)<360 ,26,0) + If(Sum(value,27)>=360 AND Sum(value,26)<360 ,27,0) + If(Sum(value,28)>=360 AND Sum(value,27)<360 ,28,0) + If(Sum(value,29)>=360 AND Sum(value,28)<360 ,29,0) + If(Sum(value,30)>=360 AND Sum(value,29)<360 ,30,0) + If(Sum(value,31)>=360 AND Sum(value,30)<360 ,31,0) + If(Sum(value,32)>=360 AND Sum(value,31)<360 ,32,0) + If(Sum(value,33)>=360 AND Sum(value,32)<360 ,33,0) + If(Sum(value,34)>=360 AND Sum(value,33)<360 ,34,0) + If(Sum(value,35)>=360 AND Sum(value,34)<360 ,35,0) Name: H ip sum 1 pd:=Int(Fml("Hilbert cycle period - final-a")); pr:=(H+L)/2; (Cos(0)*pr)+ (Cos(360*(1/pd))*Ref(pr,-1))+ (Cos(360*(2/pd))*Ref(pr,-2))+ (Cos(360*(3/pd))*Ref(pr,-3))+ (Cos(360*(4/pd))*Ref(pr,-4))+ (Cos(360*(5/pd))*Ref(pr,-5))+ 75 If(pd>6, Cos(360*(6/pd))*Ref(pr,-6), 0)+ If(pd>7, Cos(360*(7/pd))*Ref(pr,-7), 0)+ If(pd>8, Cos(360*(8/pd))*Ref(pr,-8), 0)+ If(pd>9, Cos(360*(9/pd))*Ref(pr,-9), 0)+ If(pd>10, Cos(360*(10/pd))*Ref(pr,-10), 0)+ If(pd>11, Cos(360*(11/pd))*Ref(pr,-11), 0)+ If(pd>12, Cos(360*(12/pd))*Ref(pr,-12), 0)+ If(pd>13, Cos(360*(13/pd))*Ref(pr,-13), 0)+ If(pd>14, Cos(360*(14/pd))*Ref(pr,-14), 0) Name: H ip sum 2 pd:=Int(Fml("Hilbert cycle period - final-a")); pr:=(H+L)/2; If(pd>15, Cos(360*(15/pd))*Ref(pr,-15), 0)+ If(pd>16, Cos(360*(16/pd))*Ref(pr,-16), 0)+ If(pd>17, Cos(360*(17/pd))*Ref(pr,-17), 0)+ If(pd>18, Cos(360*(18/pd))*Ref(pr,-18), 0)+ If(pd>19, Cos(360*(19/pd))*Ref(pr,-19), 0)+ If(pd>20, Cos(360*(20/pd))*Ref(pr,-20), 0)+ If(pd>21, Cos(360*(21/pd))*Ref(pr,-21), 0)+ If(pd>22, Cos(360*(22/pd))*Ref(pr,-22), 0)+ If(pd>23, Cos(360*(23/pd))*Ref(pr,-23), 0)+ If(pd>24, Cos(360*(24/pd))*Ref(pr,-24), 0) Name: H ip sum 3 pd:=Int(Fml("Hilbert cycle period - final-a")); pr:=(H+L)/2; If(pd>25, Cos(360*(25/pd))*Ref(pr,-25), 0)+ If(pd>26, Cos(360*(26/pd))*Ref(pr,-26), 0)+ If(pd>27, Cos(360*(27/pd))*Ref(pr,-27), 0)+ If(pd>28, Cos(360*(28/pd))*Ref(pr,-28), 0)+ If(pd>29, Cos(360*(29/pd))*Ref(pr,-29), 0)+ If(pd>30, Cos(360*(30/pd))*Ref(pr,-30), 0)+ If(pd>31, Cos(360*(31/pd))*Ref(pr,-31), 0)+ If(pd>32, Cos(360*(32/pd))*Ref(pr,-32), 0)+ If(pd>33, Cos(360*(33/pd))*Ref(pr,-33), 0)+ If(pd>34, Cos(360*(34/pd))*Ref(pr,-34), 0) Name: H rp sum 1 pd:=Int(Fml("Hilbert cycle period - final-a")); pr:=(H+L)/2; (Sin(0)*pr)+ (Sin(360*(1/pd))*Ref(pr,-1))+ (Sin(360*(2/pd))*Ref(pr,-2))+ (Sin(360*(3/pd))*Ref(pr,-3))+ (Sin(360*(4/pd))*Ref(pr,-4))+ (Sin(360*(5/pd))*Ref(pr,-5))+ If(pd>6, Sin(360*(6/pd))*Ref(pr,-6), 0)+ If(pd>7, Sin(360*(7/pd))*Ref(pr,-7), 0)+ If(pd>8, Sin(360*(8/pd))*Ref(pr,-8), 0)+ If(pd>9, Sin(360*(9/pd))*Ref(pr,-9), 0)+ If(pd>10, Sin(360*(10/pd))*Ref(pr,-10), 0)+ If(pd>11, Sin(360*(11/pd))*Ref(pr,-11), 0)+ If(pd>12, Sin(360*(12/pd))*Ref(pr,-12), 0)+ If(pd>13, Sin(360*(13/pd))*Ref(pr,-13), 0)+ If(pd>14, Sin(360*(14/pd))*Ref(pr,-14), 0) Name: H rp sum 2 pd:=Int(Fml("Hilbert cycle period - final-a")); pr:=(H+L)/2; If(pd>15, Sin(360*(15/pd))*Ref(pr,-15), 0)+ If(pd>16, Sin(360*(16/pd))*Ref(pr,-16), 0)+ 76 If(pd>17, Sin(360*(17/pd))*Ref(pr,-17), 0)+ If(pd>18, Sin(360*(18/pd))*Ref(pr,-18), 0)+ If(pd>19, Sin(360*(19/pd))*Ref(pr,-19), 0)+ If(pd>20, Sin(360*(20/pd))*Ref(pr,-20), 0)+ If(pd>21, Sin(360*(21/pd))*Ref(pr,-21), 0)+ If(pd>22, Sin(360*(22/pd))*Ref(pr,-22), 0)+ If(pd>23, Sin(360*(23/pd))*Ref(pr,-23), 0)+ If(pd>24, Sin(360*(24/pd))*Ref(pr,-24), 0) Name: H rp sum 3 pd:=Int(Fml("Hilbert cycle period - final-a")); pr:=(H+L)/2; If(pd>25, Sin(360*(25/pd))*Ref(pr,-25), 0)+ If(pd>26, Sin(360*(26/pd))*Ref(pr,-26), 0)+ If(pd>27, Sin(360*(27/pd))*Ref(pr,-27), 0)+ If(pd>28, Sin(360*(28/pd))*Ref(pr,-28), 0)+ If(pd>29, Sin(360*(29/pd))*Ref(pr,-29), 0)+ If(pd>30, Sin(360*(30/pd))*Ref(pr,-30), 0)+ If(pd>31, Sin(360*(31/pd))*Ref(pr,-31), 0)+ If(pd>32, Sin(360*(32/pd))*Ref(pr,-32), 0)+ If(pd>33, Sin(360*(33/pd))*Ref(pr,-33), 0)+ If(pd>34, Sin(360*(34/pd))*Ref(pr,-34), 0) Name: H TL sum 1 value:=Int(Fml("Hilbert cycle period - final-a")); If(value=6, Mov((H+L)/2,8,S),0) + If(value=7, Mov((H+L)/2,9,S),0) + If(value=8, Mov((H+L)/2,10,S),0) + If(value=9, Mov((H+L)/2,11,S),0) + If(value=10, Mov((H+L)/2,12,S),0) + If(value=11, Mov((H+L)/2,13,S),0) + If(value=12, Mov((H+L)/2,14,S),0) + If(value=13, Mov((H+L)/2,15,S),0) + If(value=14, Mov((H+L)/2,16,S),0) + If(value=15, Mov((H+L)/2,17,S),0) Name: H TL sum 2 value:=Int(Fml("Hilbert cycle period - final-a")); If(value=16, Mov((H+L)/2,18,S),0) + If(value=17, Mov((H+L)/2,19,S),0) + If(value=18, Mov((H+L)/2,20,S),0) + If(value=19, Mov((H+L)/2,21,S),0) + If(value=20, Mov((H+L)/2,22,S),0) + If(value=21, Mov((H+L)/2,23,S),0) + If(value=22, Mov((H+L)/2,24,S),0) + If(value=23, Mov((H+L)/2,25,S),0) + If(value=24, Mov((H+L)/2,26,S),0) + If(value=25, Mov((H+L)/2,27,S),0) Name: H TL sum 3 value:=Int(Fml("Hilbert cycle period - final-a")); If(value=26, Mov((H+L)/2,28,S),0) + If(value=27, Mov((H+L)/2,29,S),0) + If(value=28, Mov((H+L)/2,30,S),0) + If(value=29, Mov((H+L)/2,31,S),0) + If(value=30, Mov((H+L)/2,32,S),0) + If(value=31, Mov((H+L)/2,33,S),0) + If(value=32, Mov((H+L)/2,34,S),0) + If(value=33, Mov((H+L)/2,35,S),0) + If(value=34, Mov((H+L)/2,36,S),0) + If(value=35, Mov((H+L)/2,37,S),0) 77 Name: Hilbert cycle period - 1a value1:=((H+L)/2) - Ref(((H+L)/2),-6); value2:= Ref(value1,-3); value3:=0.75*(value1-Ref(value1,-6)) + 0.25*(Ref(value1,-2)-Ref(value1,-4)); inphase:= 0.33 * value2 + (0.67 * PREV); quad:= 0.2 * value3 + ( 0.8 * PREV); p1:=Atan(Abs(quad+Ref(quad,-1)),Abs(inphase+Ref(inphase,-1))); phase:=If(inphase<0 AND quad>0, 180-p1, If(inphase<0 AND quad<0, 180+p1, If(inphase>0 AND quad<0, 360-p1,p1))); dp:=If(Ref(phase,-1)<90 AND phase>270, 360+Ref(phase,-1)-phase,Ref(phase,-1)-phase); dp2:=If(dp < 1, 1, If(dp > 60, 60, dp)); dp2 Name: Hilbert cycle period - final-a c1:= Fml( "H cycle count 1a") + Fml( "H cycle count 2a") + Fml( "H cycle count 3a") ; c2:=If(c1=0,PREV,c1); (0.25*c2) + (0.75*PREV) Name: Instantaneous Trend Line pr:=(H+L)/2; (Fml("H TL sum 1") + Fml("H TL sum 2") + Fml("H TL sum 3")); 0.33*(pr + (0.5*(pr-Ref(pr,-3)))) + (0.67*PREV) Name: Sinewave Indicator pd:=Int(Fml("Hilbert cycle period - final-a")); cp:=Fml("Hilbert cycle period - final-a"); ip:=Fml( "H ip sum 1") + Fml( "H ip sum 2") + Fml( "H ip sum 3"); rp:=Fml( "H rp sum 1") + Fml( "H rp sum 2") + Fml( "H rp sum 3"); dc1:=If(Abs(ip)>0.001, Atan(rp/ip,1), 90*If(rp>=0,1,-1)); dc2:=If(ip<0, dc1+270, dc1+90); dcp:=If(dc2>315, dc2-360, dc2); Sin(dcp); Sin(dcp+45) 78 The indicators introduced in the article “Bollinger Band Targets”, by Benjamin L. Cotton, are created in MetaStock 7.0 or higher with the use of the new MetaStock External Function (MSX) DLL Interface. Click here to download the formulas. After downloading the StDevBogieMSXSetup.exe file double-click it and the formulas will automatically be added to MetaStock. Note: you must have MetaStock 7 or higher. August 2000 TASC Traders' Tip - The MetaStock code for the Breakout Range2, by Mark Vakkur, M.D The MetaStock code for the Breakout_Range2, by Mark Vakkur, M.D. is as follows.: For the Custom Indicator: To create the custom indicator select Indicator Builder from the Tools menu, click New and enter the following code: Name: Breakout_Range2 Formula: lb:=4; { number of periods in look back } event:=H > HHV(Ref(H,-1),lb); If(event AND (Ref(BarsSince(event),-1)>=lb), Ref(BarsSince(event),-1), 0 ) For the System: To create the system, select System Tester from the Tools menu, click New and enter the following code: Name: Breakout_Range2 System Enter Long: lb:=OPT1; { number of periods in look back } event:=H > HHV(Ref(H,-1),lb); If(event AND (Ref(BarsSince(event),-1)>=lb),1, 0 ) Stops: Inactivity: Positions: Longs Method: Percent Minimum Change: 10000 Periods: OPT1 Optimization: Name: OPT1 Minimum: 2 Maximum: 20 Step: 1 Note: to remove the optimization replace OPT1 in the formula and in the Inactivity stop with your desired look back period. Cheryl C. Abram, Equis International, Inc. 79 In his article “Squelch Those Whipsaws” John Ehlers introduces the Squelch Control indicator as a paintbar. To create this in MetaStock 6.52 or higher select Indicator Builder from the Tools menu and enter the following new formulas. Each formula must be created separately and must be named exactly as it appears below. The formulas can also be downloaded from /customer/support/formulas/. Note that all of the following formulas are the same formulas referenced from his article in the May 2000 Traders Tip, with the exception of the Expert Advisor highlight. If you have downloaded and installed the May 2000 formulas you will be asked to overwrite the existing formulas when installing these formulas. If you do not wish to overwrite them do not download the formula file, instead refer to the instructions below for creating only the Expert Advisor formula. If you are using MetaStock version 7 or higher follow these instructions: Click here to download the self extracting formula file to a temp folder Double click on the downloaded file to start the importing process After the import has finished locate the formulas in MetaStock Name: Hilbert cycle period - 1a value1:=((H+L)/2) - Ref(((H+L)/2),-6); value2:= Ref(value1,-3); value3:=0.75*(value1-Ref(value1,-6)) + 0.25*(Ref(value1,-2)-Ref(value1,-4)); inphase:= 0.33 * value2 + (0.67 * PREV); quad:= 0.2 * value3 + ( 0.8 * PREV); p1:=Atan(Abs(quad+Ref(quad,-1)),Abs(inphase+Ref(inphase,-1))); phase:=If(inphase<0 AND quad>0, 180-p1, If(inphase<0 AND quad<0, 180+p1, If(inphase>0 AND quad<0, 360-p1,p1))); dp:=If(Ref(phase,-1)<90 AND phase>270, 360+Ref(phase,-1)-phase,Ref(phase,-1)-phase); dp2:=If(dp < 1, 1, If(dp > 60, 60, dp)); dp2 Name: H cycle count 1a value:= Fml("Hilbert cycle period - 1a"); If(Sum(value,6)>=360 AND Sum(value,5)<360 ,6,0) + If(Sum(value,7)>=360 AND Sum(value,6)<360 ,7,0) + If(Sum(value,8)>=360 AND Sum(value,7)<360 ,8,0) + If(Sum(value,9)>=360 AND Sum(value,8)<360 ,9,0) + If(Sum(value,10)>=360 AND Sum(value,9)<360 ,10,0) + If(Sum(value,11)>=360 AND Sum(value,10)<360 ,11,0) + If(Sum(value,12)>=360 AND Sum(value,11)<360 ,12,0) + If(Sum(value,13)>=360 AND Sum(value,12)<360 ,13,0) + If(Sum(value,14)>=360 AND Sum(value,13)<360 ,14,0) + If(Sum(value,15)>=360 AND Sum(value,14)<360 ,15,0) Name: H cycle count 2a value:= Fml("Hilbert cycle period - 1a"); If(Sum(value,16)>=360 AND Sum(value,15)<360 ,16,0) + If(Sum(value,17)>=360 AND Sum(value,16)<360 ,17,0) + If(Sum(value,18)>=360 AND Sum(value,17)<360 ,18,0) + If(Sum(value,19)>=360 AND Sum(value,18)<360 ,19,0) + If(Sum(value,20)>=360 AND Sum(value,19)<360 ,20,0) + If(Sum(value,21)>=360 AND Sum(value,20)<360 ,21,0) + If(Sum(value,22)>=360 AND Sum(value,21)<360 ,22,0) + If(Sum(value,23)>=360 AND Sum(value,22)<360 ,23,0) + If(Sum(value,24)>=360 AND Sum(value,23)<360 ,24,0) + If(Sum(value,25)>=360 AND Sum(value,24)<360 ,25,0) Name: H cycle count 3a value:= Fml("Hilbert cycle period - 1a"); If(Sum(value,26)>=360 AND Sum(value,25)<360 ,26,0) + 80 If(Sum(value,27)>=360 AND Sum(value,26)<360 ,27,0) + If(Sum(value,28)>=360 AND Sum(value,27)<360 ,28,0) + If(Sum(value,29)>=360 AND Sum(value,28)<360 ,29,0) + If(Sum(value,30)>=360 AND Sum(value,29)<360 ,30,0) + If(Sum(value,31)>=360 AND Sum(value,30)<360 ,31,0) + If(Sum(value,32)>=360 AND Sum(value,31)<360 ,32,0) + If(Sum(value,33)>=360 AND Sum(value,32)<360 ,33,0) + If(Sum(value,34)>=360 AND Sum(value,33)<360 ,34,0) + If(Sum(value,35)>=360 AND Sum(value,34)<360 ,35,0) Name: Hilbert cycle period - final-a c1:= Fml( "H cycle count 1a") + Fml( "H cycle count 2a") + Fml( "H cycle count 3a") ; c2:=If(c1=0,PREV,c1); (0.25*c2) + (0.75*PREV) To create the indicator as a highlight, select Expert Advisor from the Tools menu. Click New, enter “Hilbert Squelch Indicator” for the name, and select the Highlights page. Click New and enter the following formula Name: Squelch Threshold Squelch:=20; Fml("Hilbert cycle period - final-a")<Squelch To apply the Indicator, open the Expert Advisor, select the Squelch Indicator expert, and then click the Attach button. The article “Ichimoku Charts”, by Ken Muranaka, introduces the five formulas required to construct the Ichimoku Chart. This can be easily created in MetaStock 6.52 or higher. Select Indicator Builder from the Tools menu, select New and enter the following formula. Name: Ichimoku Chart ST:=(HHV(H,26)+LLV(L,26))/2; TL:=(HHV(H,9)+LLV(L,9))/2; DL:=Ref(C,26); 1Span:=Ref((ST+TL)/2,-26); 2Span:=Ref((HHV(H,52)+LLV(L,52))/2,-26); ST; TL; DL; 1Span; 2Span To create the TC 2000 scans in MetaStock 6.52 or higher, select The Explorer from the Tools menu, click New and in the Filter column, enter the following formula. Name: LONGS (C>20) AND (Mov(V,50,S)>500) AND (C>Ref(HHV(C,5),-1)) AND (C>Ref(C,-1)+1) AND (V>1.5*Mov(V,50,S)) Name: SHORTS (C>20) AND (Mov(V,50,S)>500) AND (C<Ref(LLV(C,5),-1)) AND (C<Ref(C,-1)-1) AND (V>1.5*Mov(V,50,S)) To run the exploration select it from the list and click Explore. Cheryl C. Abram, Equis International, Inc. 81 In his article “Normalization”, Brian Bell introduces some methods for normalizing indicators. These methods can be easily created in MetaStock 6.52 or higher. Select Indicator Builder from the Tools Menu, click New and enter the formula for the desired method. Name: Simple Moving Average Oscillator OscP(4,8,S,$) Name: Simple MA Osc norm to Std Dev OscP(4,8,S,$)/Stdev(C,8) Name: Simple MA Osc norm to Ave True Range OscP(4,8,S,$)/ATR(8) Name: Simple MA Osc norm to Historical Range plot:=OscP(4,8,S,$); (( plot - LLV(plot,200) / (HHV(plot,200)-LLV(plot,200))) * 100 Note: To apply these methods to different indicators replace the Simple Moving Average Oscillator portion with the desired indicator’s formula. Cheryl C. Abram, Equis International, Inc. The function, system, and indicator introduced in the articles “ Refining the Hilbert Indicator”, by John Ehlers, and “Optimizing with Hilbert Indicators”, by Roger Darley, which appear in the November 2000 TASC issue, can be created in MetaStock 7.0 or higher with the use of the new MetaStock External Function (MSX) DLL Interface. Click here to download the formulas. After downloading the exe file double-click it and the formulas will automatically be imported into MetaStock. After the import has finished the indicator, Hilbert Channel Breakout Indicator, will appear in the Indicator QuickList and the signal, Hilbert Channel Breakout Signal, will appear in the System Tester. Note you must have MetaStock 7 or higher. The Buff Averages, as described by Buff Dormeier, in his article Buff Up Your Moving Averages, can easily be created in MetaStock 6.52 or higher. To create the indicator select Indicator Builder from the Tools menu, click New and enter the following code: Name: Buff Averages Formula: X := Input( "Time Periods",1, 500, 25 ); Sum( V * C, X ) / Sum( V, X ) To plot it, locate Buff Averages in MetaStock‟s Indicator Quicklist. 82 In his article, “VWAP for Support and Resistance”, George Reyna explains how to calculate the volume weighted average price, or VWAP. These calculations can be duplicated in MetaStock 6.52 or higher with the following formulas. To create these indicators, select the Indicator Builder from the MetaStock Tools menu. Then click New and enter the formulas as listed below Name: VWAP ( Approximation ) Formula: sm:=Input("starting month",1,12,1); sd:=Input("starting day of month",1,31,1); sy:=Input("starting year",1980,2100,2000); d1:= sd=DayOfMonth() AND sm=Month() AND sy=Year(); pv:=MP()*Cum(V); denom:= If(Cum(V)-ValueWhen(1,d1,V)=0,1,Cum(V)-ValueWhen(1,d1,V)); If(BarsSince(d1),(pv)/denom, MP()) Name: VWAP Support/Resistance Formula: sm:=Input("starting month",1,12,1); sd:=Input("starting day of month",1,31,1); sy:=Input("starting year",1980,2100,2000); start:= sd=DayOfMonth() AND sm=Month() AND sy=Year(); pv:=MP()*V; denom:= If(Cum(V)-ValueWhen(1,start,Cum(V))=0,1,Cum(V)-ValueWhen(1,start,Cum(V))); If(BarsSince(start),(Cum(pv)-ValueWhen(1,start,Cum(pv)))/ denom,MP()) The formulas discussed by John Ehlers; in his article, “ Ehlers Filters”, can be created in MetaStock 6.52 or higher. To create these indicators, in MetaStock, select the Indicator Builder from the Tools menu. Then click New and enter the formulas as listed below Name: Ehlers Filters Formula: ti:= 15; pr:= MP(); coef:= Abs(pr - Ref(pr,-5)); Sum(coef*pr,ti)/Sum(coef,ti) Name: Distant Coefficient Ehlers Filter Formula: ti:= 15; pr:= MP(); coef:=Sum(Power(Ref(LastValue(pr+PREV-PREV)-pr,-1),2),ti); Sum(coef*pr,ti)/Sum(coef,ti) 83 Performance charts, as described in the article “ Relative Performance Charting”, can be created in MetaStock by the following means: 1. Open the charts you wish to compare, designating one of the charts as your baseline chart. 2. Select tile from MetaStock‟s Window menu to make all charts visible. 3. Plot the performance indicator into a new inner window in each of the open charts. You will want to change the color of each of the indicators so that you can differentiate between them when they are in the same chart. 4. In a chart other than your baseline chart, select the performance indicator. From here, you will need to either copy and paste or drag and drop (whichever you prefer), the performance indicator on top of the performance indicator in the baseline chart. If prompted, select the “merge with scales on right” option. Repeat the above steps with all of the other charts until your baseline chart contains all of the other chart‟s performance indicators. 5. For better viewing, maximize your baseline chart. To plot the performance of several securities using a different symbol as the base, use these steps: 1. Create the following custom indicator: Name: Baseline performance Formula: P-Per() 2. Open the charts you wish to compare, designating one of the charts as your baseline chart. For this example, let‟s open EBAY, MSFT and CSCO, choosing CSCO as our baseline chart. 3. Select tile from MetaStock‟s Window menu to make all charts visible. 4. Plot the Performance indicator into a new inner window in each of the open charts. You will want to change the color of each of the indicators so that you can differentiate between them when they are in the same chart. 5. Drag the Performance indicator from EBAY‟s chart, and place on top of the Performance indicator in your baseline chart (CSCO). 6. Plot the Baseline performance indicator directly on top of EBAY‟s performance indicator in CSCO‟s chart. 7. Move the resulting plot to the chart in which you wish to compare the relative performance in. Close EBAY‟s chart. 8. Repeat steps 5-7 for all other securities. 9. You should be left with a single chart containing all of the Baseline Performance plots. In MetaStock Professional version 7.0 and above, the procedure can be simplified by using the Security () function instead of the p variable. However, a separate custom formula needs to be created for each symbol you wish to use as the baseline chart. The formula is written after the following model: Name: Baseline Performance with .SPX Formula: Per()-Security(“.SPX”, Per()) The above formula uses the ticker symbol .SPX as the baseline. To use a different symbol, just change .SPX to the desired symbol. Additionally, the above formula assumes that the ticker symbol of the baseline is located in the same folder as the symbol you are plotting the above formula on. If the location is different, you will need to change the formula to include the correct path. For example, if the ticker symbol .SPX were located in the folder C:\MetaStock Data\index, the formula would be written as: Formula: Per()-Security(“C:\MetaStock Data\index\.SPX”, Per () ) Using the above formula, MetaStock Pro users can plot this indicator instead of the Performance indicator. 1. Create a custom indicator using the formula listed above 2. Open the charts you wish to compare, designating one of the charts as your baseline chart. 3. Select tile from MetaStock‟s Window menu to make all charts visible. 4. Plot the custom indicator into a new inner window in each of the open charts. You will want to change the color of each of the indicators so that you can differentiate between them when they are in the same chart. 84 5. In a chart other than your baseline chart, select the performance indicator. From here, you will need to either copy and paste or drag and drop (whichever you prefer), the performance indicator on top of the performance indicator in the baseline chart. If prompted, select the “merge with scales on right” option. Repeat the above steps with all of the other charts until your baseline chart contains all of the other chart‟s performance indicators. 6. For better viewing, maximize your baseline chart. The formulas discussed by Gordon Gustafson; in his article, “ Average True Range Or Standard Deviation”, can be created in MetaStock 6.52 or higher. To create these indicators, in MetaStock, select the Indicator Builder from the Tools menu. Then click New and enter the formulas as listed below Standard Deviation Bands stdh := Mov(C,20,E)+2*(Stdev(C,20)); stdl := Mov(C,20,E)-2*(Stdev(C,20)); stdh; stdl Average True Range Bands stdha := Mov(C,20,E)+2*(ATR(20)); stdla := Mov(C,20,E)-2*(ATR(20)); stdha; stdla In his article “Elastic Volume Weighted Moving Average (eVWMAV)”, Christian P. Fries introduces the eVWMAV indicator. To create this indicator, in MetaStock, select the Indicator Builder from the Tools menu. Then click New and enter the formula as listed below eVWMAV n := Input("Enter the number of shares: ",1,1000000,1); eVWMAV := ((n-V)*PREV+(V*C))/n; eVWMAV 85 The Balance of Power indicator, presented by Igor Livshin in his article “Balance of Power”, can be created in MetaStock 6.52 or higher. To create the BOP, in MetaStock, select the Indicator Builder from the Tools menu. Then click New and enter the formula as listed below: BOP: THL:=If(H-L=0,.00001,H-L); {Reward Based on the Open} BuRBoO:=(H-O)/(THL); BeRBoO:=(O-L)/(THL); {Reward Based on the Close} BuRBoC:=(C-L)/(THL); BeRBoC:=(H-C)/(THL); {Reward Based on the Open-Close} BuRBoOC:=If(C>O,(C-O)/(THL),0); BeRBoOC:=If(C>O,0,(O-C)/(THL)); BOP:=(BuRBoO+BuRBoC+BuRBoOC)/3 - (BeRBoO+BeRBoC+BeRBoOC)/3; BOP To plot the moving average, add the following line to the formula. Mov(BOP,14,S) Note: You can replace the 14 with your desired number of time periods. In MetaStock 6.52 or higher you can easily create the Crude Oil Seasonal Trade #2, as described in the article “Now‟s The Time to Trade Crude”, by John L. Momsen. In MetaStock select System Tester from the Tools menu. Click New and enter the following formulas. Name: Crude Oil Seasonal Trade #2 Enter Long: Month()=8 AND H>=HHV(Ref(H,-1),5)+1 Close Long: bc:=Month()=8 AND H>=HHV(Ref(H,-1),5)+1; sc:=L<=LLV(Ref(L,-1),3)-1; trade:=If(bc,1,If(sc,0,PREV)); sc OR If(ValueWhen(1,Cross(trade,.5),H)< LLV(Ref(L,-1),8)-1,L<= LLV(Ref(L,-1),8)-1,0) OR (Month()=9 AND DayOfMonth()>=26) OR Month()=10 86 The indicators introduced in the article “High Tech Mesa Adaptive Moving Averages”, by John Ehlers, are created in MetaStock 7.0 or higher with the use of the MetaStock External Function (MSX) DLL Interface. Note you must have MetaStock 7 or higher. 87

DOCUMENT INFO

Shared By:

Categories:

Tags:
How to, michael douglas, stock quotes, Error Details, Page Views, greed is good, wall street, Search Category, neurogenic bladder, investor tools

Stats:

views: | 364 |

posted: | 7/12/2010 |

language: | English |

pages: | 87 |

Description:
Telescan Stocks document sample

OTHER DOCS BY tjt66755

How are you planning on using Docstoc?
BUSINESS
PERSONAL

By registering with docstoc.com you agree to our
privacy policy and
terms of service, and to receive content and offer notifications.

Docstoc is the premier online destination to start and grow small businesses. It hosts the best quality and widest selection of professional documents (over 20 million) and resources including expert videos, articles and productivity tools to make every small business better.

Search or Browse for any specific document or resource you need for your business. Or explore our curated resources for Starting a Business, Growing a Business or for Professional Development.

Feel free to Contact Us with any questions you might have.