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

Building Blocks - MetaStock Tests -03_Tema PDI - MDI, ADX (Vol Required)



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.3612.1700"' name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; This week I'm going to 
discuss my third MetaStock Profit System Test -&nbsp; 03_Tema PDI - MDI, ADX 
(Vol Required).&nbsp; This test is based on Wilder's directional movement 
indicators.&nbsp; As the MetaStock manual indicates, Wilder says a buy signal 
occurs when PDI - MDI&nbsp; moves above zero and a sell signal occurs when 
PDI-MDI falls below zero.&nbsp; I started with that thought and experimented a 
little.&nbsp; Wilder used 14 day periods to calculate&nbsp; his PDI and MDI 
functions.&nbsp; Since I like Fibonacci numbers, I used 13 days instead.&nbsp; 
Also I like to smooth my indicators so I used Tema smoothing.&nbsp; My custom 
PDI - MDI formula then became:</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp; Tema PDI - MDI<BR>&nbsp;&nbsp; Periods := 
Input(&quot;Enter Tema Smoothing Periods&quot;,8,55,13);<BR>&nbsp;&nbsp; 
Tema(PDI(13) - MDI(13),Periods)</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; I started with the idea 
that I would take the PDI-MDI crossover of an optimized number as my basic buy 
and sell trigger.&nbsp; However, this number did not have to be zero and did not 
have to be the same for entering long and entering short.&nbsp; After a lot of 
trial an error I decide -1, -3, or -5 would be my enter long number and -5, -13, 
or -21 would be my enter short number.&nbsp; This makes sense since the market 
is biased to the up side, so entering a little under zero would get us in a 
little earlier.&nbsp; Also down moves tend to be fast an extreme and this would 
only let us in short for larger, faster down moves which is what I wanted.&nbsp; 
Finally I wanted some way to reduce the number of false signals and I wanted to 
do that with directional movement indicators only so this test would be 
completely uncorrelated with my other tests.&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp; 
For long positions, I notice that most up moves started when adx was low and 
that adx climbed during the move to a max and then started to fall at the end of 
the move.&nbsp; Therefore, I thought an adx max and min for a buy signal would 
help reduce false signals.&nbsp; After some experimenting, I set the min at 8 
and the max at 21.&nbsp; I also noticed that most good buy points occurred when 
MDI and ADX were close together so I decided that the difference between the two 
should be small.&nbsp; After more experimenting, I decided on the following for 
my open long signal:</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp; Open Long:<BR>&nbsp; 
Alert(Cross(Fml(&quot;Tema PDI - MDI&quot;),opt1),13) AND<BR>&nbsp;&nbsp; 
MDI(13) - ADX(13) &lt;= 4 AND<BR>&nbsp;&nbsp;&nbsp; MDI(13) - ADX(13) &gt;= -2 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp; ADX(13) &gt;= 8 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ADX(13) &lt;= 21</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp; To close my open long 
position I wanted the PDI-MDI to be less than opt1.&nbsp; When a stock starts to 
drop, the MDI starts to rise, so I wanted the MDI to be greater than a certain 
number to close a position.&nbsp; Finally, since markets are biased upwards, I 
also wanted the 55 day variable moving average to be dropping before I closed 
the position.&nbsp; Therefore, the close long became:</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp; Close Long:<BR>&nbsp;&nbsp; 
Fml(&quot;Tema PDI - MDI&quot;) &lt; opt1 AND<BR>&nbsp;&nbsp;&nbsp; MDI(13) &gt; 
21 AND<BR>&nbsp;&nbsp;&nbsp;&nbsp; LLV(Mov(L,55,VAR),5) =&nbsp; 
LLV(Mov(L,55,VAR),13)</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; To open a short 
position, I wanted the PDI-MDI to cross below a fairly high negative 
number.&nbsp; I wanted confirmation in that the adx was still fairly high when 
that happened.&nbsp; The answer was:</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp; Open Short:<BR>&nbsp;&nbsp; 
Alert(Cross(opt2,Fml(&quot;Tema PDI - MDI&quot;)),8) AND<BR>&nbsp;&nbsp;&nbsp; 
ADX(13) &gt; 34</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; To close the short 
position, I only wanted PDI-MDI to be greater than a certain positive 
number.&nbsp; I don't like a lot of confirmations for closing shorts.&nbsp; With 
the bias being up, you need to close shorts fast.&nbsp; My close Short and 
optimization became:<BR>&nbsp; Close Short:<BR>&nbsp;&nbsp;&nbsp; Fml(&quot;Tema 
PDI - MDI&quot;) &gt; 13</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp; Optimization:<BR>&nbsp;&nbsp;&nbsp; 
Opt1:&nbsp; Min = -1&nbsp;&nbsp; Max = -5&nbsp; Step = 2<BR>&nbsp;&nbsp;&nbsp; 
Opt2:&nbsp; Min = -21&nbsp; Max = -5&nbsp; Step = 8</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; That's it.&nbsp; Any 
comments or questions?</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>JimG<BR>&nbsp;&nbsp;&nbsp;&nbsp; <BR>       
<BR></FONT></DIV></BODY></HTML>
</x-html>From ???@??? Sun Feb 28 17:47:32 1999
Received: from listserv.equis.com (204.246.137.2)
	by mail02.rapidsite.net (RS ver 1.0.2) with SMTP id 22885
	for <neal@xxxxxxxxxxxxx>; Fri, 26 Feb 1999 23:28:36 -0500 (EST)
Received: (from majordom@xxxxxxxxx)
	by listserv.equis.com (8.8.7/8.8.7) id MAA08150
	for metastock-outgoing; Sat, 27 Feb 1999 12:03:37 -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 MAA08147
	for <metastock@xxxxxxxxxxxxxxxxxx>; Sat, 27 Feb 1999 12:03:34 -0700
Received: from smtp.email.msn.com (cpimssmtpu02.email.msn.com [207.46.181.18])
	by freeze.metastock.com (8.8.5/8.8.5) with ESMTP id VAA18618
	for <metastock@xxxxxxxxxxxxx>; Fri, 26 Feb 1999 21:00:31 -0700 (MST)
Received: from VonHef - 208.250.172.184 by email.msn.com with Microsoft SMTPSVC;
	 Fri, 26 Feb 1999 19:48:28 -0800
Message-ID: <004701be6204$0ed6c520$b8acfad0@xxxxxxxxxxxxxxxxx>
From: "Adam Hefner" <VonHef@xxxxxxxxxxxxx>
To: "MetaStock" <metastock@xxxxxxxxxxxxx>
Subject: "Prompt For Dates"
Date: Fri, 26 Feb 1999 21:48:35 -0600
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Sender: owner-metastock@xxxxxxxxxxxxx
Precedence: bulk
Reply-To: metastock@xxxxxxxxxxxxx
X-Loop-Detect: 1
X-UIDL: 718fc2d3f587c37459f2947163462a5b.30

My option to "Prompt For Dates" no longer works, has anyone else
experienced this? It worked before last upgrade.

  Best wishes,
      Adam Hefner.
VonHef@xxxxxxxxxxxxx

---------------------------------------