[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SMARS - D. Tilley



PureBytes Links

Trading Reference Links

<x-html><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type><TITLE>Copyright © 1997 Technical Analysis, Inc.</TITLE><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN"><BASE 
href=file://D:\Equis\Z-Diversen\faq-MetaStock\TASC\S&amp;c9809\><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<META content='"MSHTML 4.72.2106.11"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>http://www.traders.com</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<BLOCKQUOTE>
    <CENTER>
    <HR noShade SIZE=1>
    <B><FONT size=+1>TRADING TECHNIQUES
    <HR>
     <BR><BR></FONT><FONT size=+4>Moving Averages With Resistance And Support
    <HR>
     </FONT><I>by Dennis L. Tilley<BR>
    <HR>
    </I></B><I><FONT size=+1>Moving averages are a popular way to signal trends. 
    Here's how to combine moving averages and the classic chart analysis of 
    support and resistance for trading mutual funds.</FONT></I><BR>
    <HR>

    <P></P></CENTER>
    <P><FONT size=+2>M</FONT>ost simple moving average systems require one or 
    two additional confirmation signals to avoid excessive whipsaw trades. Such 
    confirmation signals can be based on features of moving averages such as the 
    crossover of multiple moving averages or the reversal of the moving average 
    slope. Momentum, volatility, volume and other nontrend indicators can also 
    serve to confirm moving average buy and sell signals.</P>
    <P>In an effort to develop simple and robust stock and mutual fund trading 
    systems, I have found that combining the simple moving average (SMA) with 
    the concept of resistance and support very effective. Here is a mechanical 
    system for combining these two tried-and-true tools to provide a robust, 
    minimal-whipsaw, intermediate-term mutual fund trading system. I have used 
    this system successfully for about four years to switch emerging markets 
    funds and small-cap funds to and from a Standard &amp; Poor's 500 index fund 
    and/or a money market fund.</P>
    <H4><BR>SMA STRENGTHS</H4>
    <P>I use the most common implementation of an SMA system, which is to buy 
    when the price closes above the SMA and sell when the price falls below the 
    SMA. The strengths of the SMA system compared to other trading techniques 
    are objectivity, simplicity and its trend-following nature. The SMA is 
    objective because it provides unambiguous buy and sell signals; thus, it can 
    be back-tested and suitably optimized.</P>
    <P>The simplicity of the SMA, in that it has only one parameter to fit (the 
    lookback period), generally leads to a robust system. By <I>robust</I>, I 
    mean that it stands a good chance of working in the future. As discussed in 
    a recent STOCKS &amp; COMMODITIES article by Jeffrey Owen Katz and Donna 
    McCormick, a rule of thumb in evaluating trading systems is that the more 
    parameters there is to optimize, the less robust the system is. Taken to the 
    extreme, many fitting parameters can be used to curve-fit past data to 
    eliminate all whipsaws while maintaining good performance. The potential of 
    such a system working in the real world is nil.</P>
    <P>The trend-following feature of the SMA is highly desirable because it 
    resists becoming outdated as markets change character. Independent of the 
    fundamentals driving the market, trend-following techniques are designed to 
    capture extended runs in both bullish and bearish directions. This is 
    especially true for intermediate time-scale movements in the stock market -- 
    those where typical peak-to-trough and trough-to-peak movements are in the 
    10-30% range, with a corresponding time scale on the order of two to six 
    months.</P>
    <CENTER>
    <P><BR><BR><IMG height=262 src="cid:036601bdce36$5a54baa0$eb5679c3@xxxxx"; 
    width=359><BR></P></CENTER></BLOCKQUOTE>
<CENTER>
<P><BR><B>FIGURE 1: MONTGOMERY EMERGING MARKETS FUND (MNEMX), 
1995.</B><I>Trading when the weekly close crosses above and below the 10-week 
moving average would have easily outperformed the fund in 1995.<BR>
<HR>
<BR>Dennis Tilley trades his own portfolio of mutual funds and stocks. He 
received a master's degree in mechanical and aerospace engineering from 
Princeton University in 1991 and works in spacecraft propulsion research and 
development. He can be reached at OPIECJ@xxxxxxxx</I><BR>
<P></P></CENTER>
<BLOCKQUOTE>
    <H5><I>Excerpted from an article originally published in the September 1998 
    issue of Technical Analysis of STOCKS &amp; COMMODITIES magazine. All rights 
    reserved. &copy; Copyright 1998, Technical Analysis, Inc.</I></H5>
    <H5><I></I>
    <HR>
    </H5></BLOCKQUOTE></DIV>
<P></P>
<H1 align=center>September 1998 </H1>
<H1 align=center>TRADERS' TIPS<BR>
<HR>
</H1>
<BLOCKQUOTE>
    <P><I>Here is this month's selection of Traders' Tips, contributed by 
    various developers of technical analysis software to help readers more 
    easily implement some of the strategies presented in this issue. 
    <BR><BR></I><B>You can copy these formulas and programs for easy use in your 
    spreadsheet or analysis software. Simply &quot;select&quot; the desired text 
    by highlighting as you would in any word processing program, then use your 
    standard key command for copy or choose &quot;copy&quot; from the browser 
    menu. The copied text can then be &quot;pasted&quot; into any open 
    spreadsheet or other software by selecting an insertion point and executing 
    a paste command. By toggling back and forth between an application window 
    and the open Web page, data can be transferred with ease. <BR><BR></B>This 
    month's tips include formulas and programs for:<BR><BR><PRE><IMG align=bottom border=0 height=11 src="../../GIFS/tri-red.gif" width=11 NATURALSIZEFLAG = 3> <B>TRADESTATION / SUPERCHARTS
<IMG align=bottom border=0 height=11 src="../../GIFS/tri-red.gif" width=11 NATURALSIZEFLAG = 3> METASTOCK
<IMG align=bottom border=0 height=11 src="../../GIFS/tri-red.gif" width=11 NATURALSIZEFLAG = 3> SMARTRADER
<IMG align=bottom border=0 height=11 src="../../GIFS/tri-red.gif" width=11 NATURALSIZEFLAG = 3> WAVEWI$E MARKET SPREADSHEET
<IMG align=bottom border=0 height=11 src="../../GIFS/tri-red.gif" width=11 NATURALSIZEFLAG = 3> TECHNIFILTER PLUS</B><BR></PRE>
    <P></P>
    <CENTER>
    <P>or return to <B><A href="../content.html">September 1998 
    Contents</A></B></P></CENTER></BLOCKQUOTE>
<CENTER>
<P><A name=tradestation></A>
<HR SIZE=3>

<P></P></CENTER>
<H3><IMG align=bottom height=11 src="../../GIFS/tri-yellow.gif" width=11 
NATURALSIZEFLAG = 3> TRADESTATION / SUPERCHARTS</H3>
<BLOCKQUOTE>
    <P><BR>The focus of this month's Traders' Tips is the combination of a 
    simple moving average with support and resistance, as presented by Dennis 
    Tilley in his article &quot;Moving averages with resistance and 
    support.&quot; I have integrated this very interesting concept into both an 
    indicator and a system for TradeStation or SuperCharts. Notice that the 
    EasyLanguage codes for the indicator and the system are very similar.</P>
    <P>We'll begin with the indicator, named &quot;Mov avg--supp/res.&quot; The 
    indicator has three inputs. &quot;Price&quot; and &quot;length&quot; are 
    parameters for the basis of the moving average. &quot;F&quot; is the 
    critical percentage, and should be entered as the percent value (8 = 8%). 
    The plots for the indicator are as follows: the simple moving average line; 
    points representing the support levels; and points representing the 
    resistance levels. In order for the plots to appear correctly, the style for 
    the indicator must be properly set (formatting information will follow the 
    EasyLanguage code for the indicator).</P><PRE><B>Type: Indicator
Name: Mov Avg--Supp/Res</B></PRE><PRE>Inputs: Price(Close), Length(10), F(8);
Vars: AvgVal(0), S(0), R(0), SC(0), RC(0);

AvgVal = Average(Price, Length);
RC = RC + 1;
SC = SC + 1;

IF Close Crosses Below AvgVal AND Close &gt; S* (1+(F/100)) AND R &lt;&gt; 0 Then Begin
        For value1 = RC-2 TO RC+2 Begin
                Plot2[value1](R, &Ograve;R&Oacute;);
        End;
        Alert = True;
        S = L;
        SC = 0;
End
Else Begin
        IF Close Crosses Below S AND R &lt;&gt; 0 Then Begin
                For value1 = RC-2 TO RC+2 Begin
                        Plot2[value1](R, &Ograve;R&Oacute;);
                End;
                Alert = True;
                S = L;
                SC = 0;
        End;
End;

IF Close Crosses Above AvgVal AND Close &lt; R / (1+(F/100)) AND S &lt;&gt; 0 Then Begin
        For value1 = SC-2 TO SC+2 Begin
                Plot3[value1](S, &quot;S&quot;);
        End;
        Alert = True;
        R = H;
        RC = 0;
End
Else Begin
        IF Close Crosses Above R AND S &lt;&gt; 0 Then Begin
                For value1 = SC-2 TO SC+2 Begin
                        Plot3[value1](S, &quot;S&quot;);
                End;
                Alert = True;
                R = H;
                RC = 0;
        End;
End;

IF Close &gt; AvgVal Then Begin
        IF High &gt;= R Then Begin
                R = High;
                RC = 0;
        End;
End;

IF Close &lt; AvgVal Then Begin
        IF Low &lt;= S OR S = -1 Then Begin
                S = Low;
                SC = 0;
        End;
End;

Plot1(AvgVal, &quot;SMA&quot;);

<B>Style:
       Plot   Name   Type  Color  Weight
</B>        Plot1   SMA     Line    Blue    thinnest
        Plot2   R       Point   Magenta medium
        Plot3   S       Point   Cyan    medium
<B>Scaling:</B> Same as Price Data
<B>Properties:</B> Enable Alert</PRE>
    <P>The EasyLanguage for the moving average system is very similar to that 
    for the indicator. The inputs &quot;price,&quot; &quot;length,&quot; and 
    &quot;F&quot; have the same purpose.</P>
    <P><B>Type: System<BR>Name: Mov Avg--Supp/Res</B><BR></P><PRE>Inputs: Price(Close), Length(10), F(8);
Vars: AvgVal(0), S(0), R(0), SC(0), RC(0);

AvgVal = Average(Price, Length);
RC = RC + 1;
SC = SC + 1;

IF CurrentBar &gt; 1 Then Begin
IF Close Crosses Below AvgVal AND Close &gt; S* (1+(F/100)) AND R &lt;&gt; 0 Then Begin
        Sell Next Bar at Market;
        S = Low;
        SC = 0;
End
Else Begin
        IF Close Crosses Below S AND R &lt;&gt; 0 Then Begin
                Sell Next Bar at Market;
                S = Low;
                SC = 0;
        End;
End;

IF Close Crosses Above AvgVal AND Close &lt; R / (1+(F/100)) AND S &lt;&gt; 0 Then Begin
        Buy Next Bar at Market;
        R = High;
        RC = 0;
End
Else Begin
        IF Close Crosses Above R AND S &lt;&gt; 0 Then Begin
                Buy Next Bar at Market;
                R = High;
                RC = 0;
        End;
End;
IF Close &gt; AvgVal Then Begin
        IF High &gt;= R Then Begin
                R = High;
                RC = 0;
        End;
End;

IF Close &lt; AvgVal Then Begin
        IF Low &lt;= S OR S = -1 Then Begin
                S = Low;
                SC = 0;
        End;
End;
End;</PRE>
    <P>This code is available at Omega Research's Web site. The file name is 
    &quot;MA_SR.ELA.&quot; Please note that all the Traders' Tips analysis 
    techniques that are posted at the Omega Research Web site can be utilized by 
    both TradeStation and SuperCharts. Whenever possible, the posted analysis 
    techniques will include both Quick Editor and Power Editor formats.</P>
    <BLOCKQUOTE>
        <BLOCKQUOTE>
            <ADDRESS>--Gaston Sanchez, Omega Research<BR>800 422-8587, 305 
            270-1095<BR>Internet: 
    http://www.OmegaResearch.com</ADDRESS></BLOCKQUOTE></BLOCKQUOTE>
    <P>GO BACK</A><BR><A name=metastock></P></BLOCKQUOTE>
<P>
<HR>

<P></P>
<H3><IMG align=bottom height=11 src="../../GIFS/tri-yellow.gif" width=11 
NATURALSIZEFLAG = 3> METASTOCK </H3>
<BLOCKQUOTE>
    <P>In this issue, Dennis Tilley uses support and resistance to confirm price 
    and simple moving average (SMA) crossover signals in his article 
    &quot;Moving averages with resistance and support.&quot;</P>
    <P>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:</P>
    <P><TT><B>Resistance and Support<BR></B>LookBack := Input(&quot;Look Back 
    Periods&quot;,1,1000,10);<BR>Resistance :=ValueWhen (1,Cross(Mov(C, 
    LookBack, S),C),HHV(H, LookBack));<BR>Support :=ValueWhen (1,Cross(C,Mov(C, 
    LookBack, S)),LLV(L, LookBack));<BR>Resistance;<BR>Support;</TT></P>
    <P><TT><B>Resistance and Support * 
    F<BR></B>PrCnt:=Input(&quot;Percentage&quot;,0,100,10);<BR>LookBack:= 
    Input(&quot;Look Back Periods&quot;,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));<BR>Resistance 
    * ((100-prcnt)/100);<BR>Support * ((prcnt/100)+1);</TT></P>
    <P>(Note that it's much easier to see the difference between the resistance 
    and support * F lines and the actual resistance and support lines if you 
    change the color and/or style of one of them.)</P>
    <P>To display the indicators in MetaStock 6.5, drag the moving average 
    indicator from the Indicator QuickList into the price window. Choose<I> 
    simple</I> as the method, enter the time periods and then click OK.</P>
    <P>Now, drag the resistance and support indicator from the QuickList into 
    the price window. You will be prompted to enter the lookback periods. You 
    should select the same time periods that you used for the moving 
average.</P>
    <P>Finally, drag the &quot;resistance and support * F&quot; indicator into 
    the price window. You will be prompted to enter the percentage and the 
    lookback periods. If you would like the indicator to be a 10% difference 
    from the resistance and support line, you would enter 10. Again, you should 
    select the same time periods you used for the moving average.</P>
    <BLOCKQUOTE>
        <BLOCKQUOTE>
            <ADDRESS>--Allan J. McNichol, Equis International<BR>800 882-3040, 
            801 265-8886<BR>Internet: 
    http://www.equis.com</ADDRESS></BLOCKQUOTE></BLOCKQUOTE>
    <P>GO BACK</A><BR><A name=smartrader></P></BLOCKQUOTE>
<P>
<HR>

<P></P>
<H3><IMG align=bottom height=11 src="../../GIFS/tri-yellow.gif" width=11 
NATURALSIZEFLAG = 3> SMARTRADER</H3>
<BLOCKQUOTE>
    <P>Implementation of Dennis Tilley's SMARS indicators is simple in 
    SmarTrader. (See the SmarTrader specsheet in Figure 1.) Begin by adding a 
    coefficient in row 9, which is named &quot;periods,&quot; to contain the 
    number of weeks (10) for the simple moving average (SMA) and the lookback 
    for support and resistance. Row 10 is a simple moving average of the close 
    (row 6) using the coefficient periods. Row 11 determines the resistance 
    level (R) using the function &quot;highest&quot; on close for periods. Row 
    12 determines the support level (S) using the function &quot;lowest.&quot; 
    Note that the SMA, R and S all use the coefficient periods. This makes for 
    easy what-if testing by just changing the value held in periods.</P>
    <P>Another coefficient, &quot;percent&quot; in row 13, was used to contain 
    the value of the &quot;critical percentage&quot; as a fraction. Row 14, 
    &quot;Rwork,&quot; is a user row that calculates the level of the critical 
    percent below R. Row 15, &quot;Swork,&quot; similarly computes the critical 
    percent above S. Rows 16 and 17 are user rows defining the conditions for 
    buy and sell. Note in the next row, &quot;trade,&quot; the short entry and 
    exit are set to zero to prevent any short trades.</P>
    <P>We tested this system using the S&amp;P cash for data using only a 
    10-week SMA. We did try various values for percent and found that 2% worked 
    best, since this data is trending steadily up. The result was strong equity 
    gain with very few trades.</P>
    <P>CompuTrac SNAP users can implement this system with no changes.</P>
    <P>This specsheet file is available on Stratagem Software's Web site.</P>
    <P><IMG height=436 src="cid:036901bdce36$5a658380$eb5679c3@xxxxx"; 
    width=404></P>
    <P><B>FIGURE 1: SMARTRADER.<I> </I></B><I>This SmarTrader specsheet 
    implements Dennis Tilley's simple moving average system.</I></P>
    <BLOCKQUOTE>
        <BLOCKQUOTE>
            <BLOCKQUOTE>
                <ADDRESS>--Jim Ritter, Stratagem Software International<BR>504 
                885-7353, E-mail: Stratagem1@xxxxxxx<BR>Internet: 
                http://members.aol.com/stratagem1</ADDRESS></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
    <P>GO BACK</P>
    <P><A name=wavewise></A></P></BLOCKQUOTE>
<P>
<HR width=100%>

<P></P>
<H3><IMG align=bottom height=11 src="../../GIFS/tri-yellow.gif" width=11 
NATURALSIZEFLAG = 3> WAVEWI$E MARKET SPREADSHEET </H3>
<BLOCKQUOTE>
    <P>These Wave Wi$e formulas implement Dennis Tilley's simple moving average 
    system.</P>
    <P><TT>A: DATE @TC2000(C:\TC2000\DATA,SP-500,STANDARD &amp; POORS 
    500,DB)<BR>B: HIGH<BR>C: LOW<BR>D: CLOSE<BR>E: OPEN<BR>F: VOL<BR>G: convert 
    @CONVERT(1) 'CONVERT DATA TO WEEKLY OR MONTHLY H: period 20 'CHANGE PERIOD 
    AS DESIRED<BR>I: avg @MAVG(CLOSE,PERIOD)<BR>J: signals @SIGNAL(CLOSE,BUY, 
    CLOSE&gt;=AVG, CLOSE&lt;AVG)<BR>K:<BR>L: color @IF(SIGNALS&gt;0, GREEN,RED) 
    'COLOR BUY/SELL BARS<BR>M:<BR>==========End Formulas</TT></P>
    <BLOCKQUOTE>
        <BLOCKQUOTE>
            <BLOCKQUOTE>
                <ADDRESS>--Peter Di Girolamo, Jerome Technology<BR>908 369-7503, 
                E-mail: jtiware@xxxxxxx<BR>Internet: 
                http://members.aol.com/jtiware</ADDRESS></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
    <P>GO BACK </P>
    <P><A name=technifilter></A></P></BLOCKQUOTE>
<P><BR>
<HR>

<P></P>
<H3><IMG align=bottom height=11 src="../../GIFS/tri-yellow.gif" width=11 
NATURALSIZEFLAG = 3> TECHNIFILTER PLUS</H3>
<BLOCKQUOTE>
    <P>Given here is a TechniFilter Plus strategy that implements Dennis 
    Tilley's simple moving average system. The resistance and support levels are 
    given in formulas 2 and 3. The resistance requires tracking the maximum high 
    while the close is above the average in a recursive manner. The support is 
    computed in an analogous manner. The buy signal checks to see if the close 
    has broken the resistance level, or if it has broken the average away from 
    the resistance level. The sell signal is similar. Note that the strategy 
    requires the position limit to be set in order to avoid opening multiple 
    positions.</P><PRE><B>SMARS Trading Strategy
</B>NAME: SMARS
TEST TYPE: stock
DATE RANGE: all
POSITION LIMIT: 1</PRE><PRE>FORMULAS---------------------
[1] Date
[2] Resistance
     [1]: C&gt;CA&amp;1
     [2]: ([1]=[1]Y1) * [1] * (TY1%H) + ([1]&lt;&gt;[1]Y1) * [1] * H {r}
     [3]: ([2]Y1 * ([2]=0))U31
     [4]: [3]
[3] Support
     [1]: C&lt;=CA&amp;1
     [2]: ([1]=[1]Y1) * [1] * (TY1#L) + ([1]&lt;&gt;[1]Y1) * [1] * L {r}
     [3]: ([2]Y1 * ([2]=0))U31
     [4]: [3]
[4] Close
     C
[5] SMA(10)
     CA&amp;1
[6] Cross
     (C&gt;[5])U2-TY1</PRE><PRE>RULES---------------------
r1: Buy
     buy long 1 on Close
     at signal: Buy ([4] &gt; [2]) ^ ( ( [6]=1) &amp; ( [2]/[5]&gt;1.08))
r2: Sell
     sell long 1 on Close
     at signal: Sell ([4] &lt; [3]) ^ ( ( [6]=-1) &amp; ( [5]/[3]&gt;1.08))</PRE>
    <P>This TechniFilter Plus strategy and the reports, strategies and formulas 
    of earlier Traders' Tips can be downloaded from RTR's Web site.</P>
    <BLOCKQUOTE>
        <BLOCKQUOTE>
            <ADDRESS>--Clay Burch, Rtr Software<BR>919 510-0608, E-mail: 
            rtrsoft@xxxxxxx<BR>Internet: <A 
            href="http://www.rtrsoftware.com";>http://www.rtrsoftware.com</A></ADDRESS></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
</x-html>
Attachment Converted: "c:\eudora\attach\SMARS - D.gif"

Attachment Converted: "c:\eudora\attach\SMARS - D1.gif"