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

Formula for n periods ago



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>
<META content='"MSHTML 4.72.3110.7"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000 size=2>For MS6.5 I would like to plot a single symbol 
'n' periods back from the last bar in the database.&nbsp; Simply because 
counting bars backward for any distance gets tiresome.&nbsp; Is this so simple 
that I'm overlooking the solution or is it so simple that there is no alogrithm 
in MS to do it?&nbsp; Any suggestions?</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>Thanks,</FONT></DIV>
<DIV><FONT color=#000000 size=2>Chuck</FONT></DIV></BODY></HTML>
</x-html>From ???@??? Fri Dec 25 23:37:36 1998
Received: from listserv.equis.com (204.246.137.2)
	by mail05.rapidsite.net (RS ver 1.0.2) with SMTP id 4509
	for <neal@xxxxxxxxxxxxx>; Mon, 21 Dec 1998 14:00:07 -0500 (EST)
Received: (from majordom@xxxxxxxxx)
	by listserv.equis.com (8.8.7/8.8.7) id MAA00332
	for metastock-outgoing; Sun, 20 Dec 1998 12:59:48 -0700
X-Authentication-Warning: listserv.equis.com: majordom set sender to owner-metastock@xxxxxxxxxxxxx using -f
Received: from freeze.metastock.com (freeze.metastock.com [204.246.137.5])
	by listserv.equis.com (8.8.7/8.8.7) with ESMTP id MAA00329
	for <metastock@xxxxxxxxxxxxxxxxxx>; Sun, 20 Dec 1998 12:59:45 -0700
Received: from smtp.email.msn.com ([207.46.181.18])
	by freeze.metastock.com (8.8.5/8.8.5) with ESMTP id VAA00236
	for <metastock@xxxxxxxxxxxxx>; Sat, 19 Dec 1998 21:57:54 -0700 (MST)
Received: from user - 153.37.102.66 by email.msn.com with Microsoft SMTPSVC;
	 Sat, 19 Dec 1998 10:28:29 -0800
Message-ID: <007401be2b7d$6ba47940$42662599@xxxx>
From: "Jim Greening" <JimGinVA@xxxxxxxxxxxxx>
To: "Metastock" <metastock@xxxxxxxxxxxxx>
Subject: Weekly Pick
Date: Sat, 19 Dec 1998 13:18:23 -0500
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_000A_01BE2B52.0E3639E0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.0810.800
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0810.800
Sender: owner-metastock@xxxxxxxxxxxxx
Precedence: bulk
Reply-To: metastock@xxxxxxxxxxxxx
X-Loop-Detect: 1
X-UIDL: d6d88a2427d476c37dba246acbf87d06

<x-html><!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<STYLE></STYLE>

<META content='"MSHTML 5.00.0910.1309"' name=GENERATOR></HEAD>
<BODY>
<DIV>All,</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; Another good week although it didn't start out 
that way.&nbsp; My portfolio took a hard hit Monday and I was stopped out of 
three positions during the week (see below).&nbsp; However, my portfolio inched 
its way back during the week and actually showed a small gain by Friday's 
close.&nbsp; Any gain is better than no gain at all &lt;G&gt;.</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; Looking at the market indices, I see clear sailing 
through the end of the year.&nbsp; The NASDAQ gapped up to another new all time 
high Friday and that is a strong buy signal for the Tech and INet stocks.&nbsp; 
The DJI, OEX, and SPX all look like they broke out of their 3 week down trend 
and are about to retest their old highs.&nbsp; Even the RUT looks like it is 
bouncing off the bottom of its horizontal channel.&nbsp; What a difference a 
week makes &lt;G&gt;.&nbsp; However, a lot of this may be a direct result of the 
favorable Christmas seasonality and I'm not going to get over excited about 
it.&nbsp; I really want to see how the first week in January goes before I 
decide that everything is right with the world (or a least the stock 
market)!</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; With the volatility we had this year and the 
favorable year end, I think that the January effect this year may be stronger 
than ever.&nbsp; The January effect is the tendency of the small to medium cap 
stocks that have been hit hard during the year and dumped in the year end window 
dressing, to do much better than the overall market in January.&nbsp; I've been 
adding a few of these types of stocks to my portfolio and now have positions in 
MDM, RDC, and SDTI that qualify although both MDM and SDTI may now be a little 
further off the bottom than the criteria allows.&nbsp; This week I want to add 
three more.&nbsp; The idea is to hold these stocks through January and see what 
happens, although I modify the criteria by using stops and dumping the ones that 
are stopped out.&nbsp; Again I caution that these are higher risk, more 
speculative plays than my usual weekly picks.&nbsp; I'm hoping to catch at least 
one rocket to make up for the expected losses in most of the positions.&nbsp; 
Also, I'm only going to take small positions to minimize the overall portfolio 
risk.&nbsp; My picks are Bethlehem Steel (BS), Integrated Device Technology 
(IDTI), and SIFCO Industries (SIF).&nbsp; As you can see I also spread the risk 
among a basic steel company, a semiconductor high tech company, and a basic 
metal working business.</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BS at &nbsp;7.6875 is in a Horizontal 
Channel (HC) with the top at 12 1/4 and the bottom at 7.&nbsp; It peaked with a 
triple top just above 24 way back in 1994 and has been in a long term down trend 
every since then.&nbsp; However, it did put in a 52 week high of 17 1/8 on 
4/20/98 after setting a triple bottom just below 8 in 1996 and 1997.&nbsp; From 
the 52 week high it dropped all the way to a low of 7 on 8/31/98.&nbsp; It then 
started a sideways move and broke out of its Intermediate Term Down Trend 
Channel (ITDTC)&nbsp;in mid October.&nbsp; It reached a high of 10 3/4 in 
mid-October before falling back to its current price which is less than a point 
from its 52 week low.&nbsp; The fundamentals are OK with a PE of 6.1, a 
price/sales of 0.22, and a debt/equity of 0.42.&nbsp; However, revenue growth is 
flat and projected earnings are down.&nbsp; I'll take a position some time 
Monday.&nbsp; I'll set my initial target just under the top of the HC at 12 and 
the stop just under the bottom of the HC at 6 3/4.</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; IDTI at 6.2118 has a very similar chart except 
that it has risen further from its 52 week low of 4 1/8 has also broken out of 
its HC and formed a new Short Term Up Trend Channel (STUTC).&nbsp; The top of 
the STUTC is at 8 1/8 and the bottom is at 5 1/2.&nbsp; The fundamentals are 
also OK with a price/sales of 0.91, and a debt/equity of 0.68.&nbsp; The bad 
news is that revenues have just recently dipped and earnings are negative.&nbsp; 
Analysts are predicting revenues to increase next year but earnings will remain 
negative at least until late 1999.&nbsp; I'll take a position some time 
Monday.&nbsp; I'll set my initial target just under the 52 week high at 16 and 
my stop just under the STUTC at 4 3/4.</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; SIF at 12 3/4 also has a chart similar to 
BS.&nbsp; The top of its HC is at 17 3/4 and the bottom is at 11 3/8.&nbsp; It's 
52 week high is 27.1875 and its 52 week low is 11 3/8.&nbsp; It's fundamentals 
are the best of the bunch with a PE of 7.2, a price/sales of 0.54, debt/equity 
of 0.33, 13% annual sales growth, and 30% annual earnings growth.&nbsp; I'll 
take a position sometime Monday.&nbsp; I'll set my initial target just under the 
top of the HC at 17 and my stop just under the bottom of the HC at 10 3/4.</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp; I'll send charts of the above to everyone on my 
chart email list.&nbsp; If you aren't on it and want on just yell.&nbsp; Also I 
automatically drop anyone when I get &quot;Can't deliver email&quot; messages 
back.&nbsp; If you have been dropped and want back on, yell again.&nbsp;    
&nbsp;      </DIV>
<DIV>&nbsp;</DIV>
<DIV>JimG</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<TABLE border=1 borderColor=#244a00 cellPadding=2 cellSpacing=2 width=588>
  <TBODY>
  <TR>
    <TD colSpan=7 height=21><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Open Positions</B></FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%">
      <P></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Date</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Entry</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Target</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Stop</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Current</B></FONT></P></TD>
    <TD height=21 width="17%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>%</B></FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Symbol</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Opened</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Price</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Price</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Price</B></FONT></P></TD>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Price</B></FONT></P></TD>
    <TD height=21 width="17%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Gain/Loss</B></FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>AOL</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>10/09/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$44.75</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$135.00</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$85.75</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$104.25</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>132.96%</FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>MDM</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>11/23/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$4.42</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$12.00</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$3.75</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$5.00</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>13.21%</FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>MSFT</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>10/09/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$93.19</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$156.00</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$121.75</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$137.81</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>47.89%</FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>RDC</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>12/17/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$11.81</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$15.00</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$8.75</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$9.94</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>-15.89%</FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>ROW</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>12/14/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$11.50</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=left></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$10.75</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$11.06</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>-3.80%</FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>SDTI</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>12/07/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$16.19</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$30.00</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$13.75</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$18.50</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>14.29%</FONT></P></TD></TR>
  <TR>
    <TD colSpan=7 height=21><B><FONT color=#000000 face=Arial size=2>
      <P align=center>Positions Closed During Week</B></FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>C</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>11/16/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$44.44</FONT></P></TD>
    <TD colSpan=2 height=21 width="28%"><B><FONT color=#000000 face=Arial 
      size=2>
      <P align=left>Stopped 12/15/98</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$47.31</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>6.47%</FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>EGGS</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>12/08/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$21.50</FONT></P></TD>
    <TD colSpan=2 height=21 width="28%"><B><FONT color=#000000 face=Arial 
      size=2>
      <P align=left>Stopped 12/15/98</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$19.19</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>-10.76%</FONT></P></TD></TR>
  <TR>
    <TD height=21 width="14%"><B><FONT color=#000000 face=Arial size=2>
      <P align=center>COHU</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=center>11/16/98</FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>18.38</FONT></P></TD>
    <TD colSpan=2 height=21 width="28%"><B><FONT color=#000000 face=Arial 
      size=2>
      <P align=left>Stopped 12/17/98</B></FONT></P></TD>
    <TD height=21 width="14%"><FONT color=#000000 face=Arial size=2>
      <P align=right>$20.40</FONT></P></TD>
    <TD height=21 width="17%"><FONT color=#000000 face=Arial size=2>
      <P align=right>11.02%</FONT></P></TD></TR></TBODY></TABLE></DIV>
<DIV>&nbsp;</DIV></BODY></HTML>
</x-html>From ???@??? Fri Dec 25 23:37:39 1998
Received: from listserv.equis.com (204.246.137.2)
	by mail02.rapidsite.net (RS ver 1.0.2) with SMTP id 3337
	for <neal@xxxxxxxxxxxxx>; Mon, 21 Dec 1998 14:14:41 -0500 (EST)
Received: (from majordom@xxxxxxxxx)
	by listserv.equis.com (8.8.7/8.8.7) id LAA03674
	for metastock-outgoing; Mon, 21 Dec 1998 11:08:04 -0700
X-Authentication-Warning: listserv.equis.com: majordom set sender to owner-metastock@xxxxxxxxxxxxx using -f
Received: from freeze.metastock.com (freeze.metastock.com [204.246.137.5])
	by listserv.equis.com (8.8.7/8.8.7) with ESMTP id LAA03671
	for <metastock@xxxxxxxxxxxxxxxxxx>; Mon, 21 Dec 1998 11:08:02 -0700
Received: from mail2.centuryinter.net (mail2.centuryinter.net [209.142.136.252])
	by freeze.metastock.com (8.8.5/8.8.5) with ESMTP id LAA01379
	for <metastock@xxxxxxxxxxxxx>; Mon, 21 Dec 1998 11:23:14 -0700 (MST)
Received: from tkruzel (ppp043.ld.centuryinter.net [209.142.128.57])
	by mail2.centuryinter.net (8.8.8/8.8.8) with SMTP id MAA25869
	for <metastock@xxxxxxxxxxxxx>; Mon, 21 Dec 1998 12:12:18 -0600 (CST)
Message-ID: <367E8F51.7CF6@xxxxxxxxxxxxxxxx>
Date: Mon, 21 Dec 1998 12:11:29 -0600
From: TKruzel <TKruzel@xxxxxxxxxxxxxxxx>
X-Mailer: Mozilla 3.0 (Win95; U)
MIME-Version: 1.0
To: metastock@xxxxxxxxxxxxx
Subject: Re: Formula for n periods ago
References: <002001be2d08$a1cb5c00$7193c4ce@xxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Sender: owner-metastock@xxxxxxxxxxxxx
Precedence: bulk
Reply-To: metastock@xxxxxxxxxxxxx
X-Loop-Detect: 1
X-UIDL: 349d951b4dbfa164a81844f410a76749

Chuck Wemlinger wrote:
> 
> For MS6.5 I would like to plot a single symbol 'n' periods back from
> the last bar in the database.  Simply because counting bars backward
> for any distance gets tiresome.  Is this so simple that I'm
> overlooking the solution or is it so simple that there is no alogrithm
> in MS to do it?  Any suggestions?
> 
> Thanks,
> Chuck

The following function will plot a 1 (TRUE) when the current bar is
N bars from the last bar. A 0 (FALSE) is plotted everywhere else.

N:=4;
NBarsFromLast:=If(Cum(1)=LastValue(Cum(1))-N,1,0);
NBarsFromLast;

Regards,
Tim