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

Building Blocks - MetaStock System Tests - Test_02 Tema Binary Wave Composite, QStick


  • To: "Metastock" <metastock@xxxxxxxxxxxxx>
  • Subject: Building Blocks - MetaStock System Tests - Test_02 Tema Binary Wave Composite, QStick
  • From: "Jim Greening" <JimGinVA@xxxxxxxxxxxxx>
  • Date: Sun, 31 Jan 1999 12:55:45 -0500 (EST)

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>All,</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; I was going to try to 
discuss all my MetaStock system tests today, but decided that wasn't practical 
with this being Super Bowl Sunday &lt;G&gt;.&nbsp; Therefore I decided to 
discuss my binary wave composite test since that's the one that's used with this 
weeks pick of GMH.&nbsp; </FONT><FONT color=#000000 size=2>The basic idea behind 
a MetaStock binary wave is to use if statements on several MetaStock indicators 
and have them return plus one for a bullish indication, minus one for a bearish 
indication, and zero for a neutral condition.&nbsp; Then you add them all up for 
your binary wave indicator.&nbsp; I decided to format all my indicators so they 
could be plotted as a histogram.&nbsp; For these indicators plotting as 
histograms, positive is bullish and negative is bearish.&nbsp; To cut down on 
whipsaws, I decided that over +5 would be bullish, under -13 would be bearish 
and anything in between would be neutral.&nbsp; Therefore my binary wave 
formulas are:<BR>&nbsp;&nbsp;&nbsp;&nbsp; BW2 Demand 
Index<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If(Tema(DI(),21) 
&gt; 5,+1,If(Tema(DI(),21) &lt; -13,-1,0))<BR>&nbsp;&nbsp;&nbsp;&nbsp; BW3 
Linear Regression 
Slope<BR>&nbs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;&nbsp; 
&lt; -5,-1,0))<BR>&nbsp;&nbsp;&nbsp;&nbsp; BW8 VAR 
ma<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If(Mov(C,21,VAR) 
&gt; Mov(C,55,VAR) AND&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HHV(Mov(C,233,VAR),5) 
= <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
HHV(Mov(C,233,VAR),13),+1,If(Mov(C,21,VAR) &lt; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mov(C,55,VAR) AND 
LLV(Mov(C,233,VAR),5) = 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
LLV(Mov(C,233,VAR),13),-1,0))<BR>The next formula just adds up the binary 
wave.<BR>&nbsp;&nbsp;&nbsp;&nbsp; BW 
Add<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Fml(&quot;BW2&quot;) + Fml(&quot;BW3&quot;) + Fml(&quot;BW4&quot;) + 
Fml(&quot;BW5&quot;) +<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Fml(&quot;BW6&quot;) + Fml(&quot;BW7&quot;) + Fml(&quot;BW8&quot;)<BR>Next, I 
decided to do something a little different.&nbsp; Since the whole purpose of 
this test is to catch a trending stock, I decided to add an amplifier that would 
get larger as the trend got stronger.&nbsp; Since I like Fibonacci numbers, I 
decided to use Rsquared as a measure of trend strength and base my amplifier on 
Fibonacci numbers.&nbsp; The formula I finally came up with after a lot of 
tinkering follows.<BR>&nbsp;&nbsp;&nbsp;&nbsp; BW 
Amplifier<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
If(RSquared(C,21) &gt; 0.8,5,If(RSquared(C,21) 
&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
0.6,3,If(RSquared(C,21) &gt; 
0.4,2,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
If(RSquared(C,21)&gt;0.2,1,0.5))))<BR>The last step in constructing the binary 
wave was to decide on the smoothing and put it all together.&nbsp; Of course, I 
used tema smoothing.<BR>&nbsp;&nbsp;&nbsp; Tema Binary Wave 
Composite<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Periods := 
Input(&quot;Enter Tema Smoothing&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Periods&quot;,8,233,21);<BR>&nbsp;&nbsp;&nbsp; Tema(Fml(&quot;BW 
Add&quot;)*Fml(&quot;BW Amplifier&quot;),Periods)&nbsp; <BR>&nbsp;&nbsp;&nbsp; 
<BR>&nbsp;&nbsp;&nbsp;&nbsp; The final step is to come up with a system test for 
the Tema Binary Wave Composite.&nbsp; Remember, the binary wave is just made up 
of a bunch of technical indicators that I give a +1 value when bullish, 0 when 
neutral, and -1 when bearish.&nbsp; Then they are summed and smoothed.&nbsp; So 
in general a positive value is bullish and a negative value is bearish.&nbsp; 
Also a rising number is bullish and a falling<BR>number is bearish.&nbsp; 
Therefore you could use a zero crossover to the upside as a buy signal and a 
crossover to the downside as a sell signal.&nbsp; If you had a good algorithm, 
you could also use a rise from a negative peak (or trough) as a buy signal and a 
fall from a positive peak as a sell signal.&nbsp; I decided to use a 8 day 
moving average of the BW with a crossover of the&nbsp; BW for my algorithm in an 
attempt to get an early signal on a rise from a negative peak.&nbsp; It does 
have the disadvantage of finding way too many peaks so I only use it as an 
Alert.&nbsp; For confirmation I use the QStick function and a variable moving 
average function.</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; 
QStick was developed by Chande as a way to quantify candlesticks.&nbsp; Since 
the difference between the open and close prices lies at the heart of 
candlestick charting, QStick is simply a moving average of that 
difference.&nbsp; Negative values of QStick correlate to black candlesticks, 
positive values to white candlesticks.&nbsp; Since in general black candles are 
bearish and white candles are bullish, this indicator can also be plotted as a 
histogram and interpreted the same was as the Binary Wave.&nbsp; The formula 
is:</FONT></DIV>
<DIV><FONT size=2>&nbsp; Periods := Input(&quot;Enter 
Periods&quot;,1,233,34);<BR>&nbsp; Tema(Qstick(Periods),Periods)</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp; Now to get my open long signal I use 
the ALERT signal with an 8 day vma BW crossover of the BW.&nbsp; Then to 
actually get the signal, I have to have both the QStick rising and the 21 day 
vma greater then the 55 day vma.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>Therefore my buy signal 
became:<BR>&nbsp;&nbsp;&nbsp;&nbsp; Enter 
Long<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alert(Cross(Fml(&quot;Tema 
Binary Wave Comp&quot;), <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Mov(Fml(&quot;Tema Binary Wave Comp&quot;),8,S)),21) 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; HHV(Tema(Qstick(34),34),5) 
=&nbsp;&nbsp;&nbsp; HHV(Tema(Qstick(34),34),13) 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Mov(H,21,VAR) &gt; 
Mov(H,55,VAR)</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; Since the market has an 
upward bias, I wanted my sell signal to be more restrictive.&nbsp; Therefore 
instead of trying to catch a fall from a positive peak as my sell alert, I 
wanted a crossover of an optimized negative number.&nbsp; I still used QStick 
and vma to confirm and also added that the close should be lower than yesterdays 
low.&nbsp; </FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>Therefore, my sell signal 
became:<BR>&nbsp;&nbsp;&nbsp;&nbsp; Enter 
Short<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Alert(Cross(-opt2,Fml(&quot;Tema Binary Wave Comp&quot;)),8) 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tema(Qstick(34),34) &lt; 
-0.1 AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C &lt; 
Ref(L,-1) 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Mov(L,21,VAR) &lt; Mov(L,55,VAR)</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; Then I wanted exit 
conditions that were less then full signal reversals.&nbsp; I decided that the 
BW being less than a negative number would be my primary close long signal, but 
I also wanted confirmation from other indicators.&nbsp; After a lot of trial and 
error I used the following:<BR></FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; Close 
Long<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fml(&quot;Tema 
Binary Wave Comp&quot;) &lt; -opt1 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Tema(Qstick(34),34) &lt; 0 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
LLV(Mov(L,21,VAR),5) =&nbsp; LLV(Mov(L,21,VAR),13)</FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; Close 
Short<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fml(&quot;Tema 
Binary Wave Comp&quot;) &gt; 0 
AND<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Tema(Qstick(34),34) &gt; 0.08<BR></FONT></DIV>
<DIV><FONT color=#000000 size=2>Finally I also used Fibonacci numbers for my 
optimization:<BR>&nbsp;&nbsp;&nbsp;&nbsp; Opt 1:&nbsp; Min 3, Max 13, Step 
5<BR>&nbsp;&nbsp;&nbsp;&nbsp; Opt 2:&nbsp; Min 3, Max 13, Step 
5<BR>&nbsp;&nbsp;&nbsp;&nbsp; </FONT></DIV>
<DIV><FONT color=#000000 size=2>&nbsp;&nbsp;&nbsp;&nbsp; That's it.&nbsp; I'd 
appreciate any comments, ideas, or suggestions for improvements.&nbsp; I'll try 
to post my other tests in the next few weeks.&nbsp; I'm tweaking them as I go, 
so I'll send a MetaStock import file with the revised tests to everyone on my 
formula email list when I get done.&nbsp; <BR></FONT></DIV>
<DIV><FONT color=#000000 size=2>JimG</FONT></DIV>
<DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#000000 size=2><BR></FONT>&nbsp;</DIV></BODY></HTML>
</x-html>From ???@??? Sun Jan 31 15:40:55 1999
Received: from listserv.equis.com (204.246.137.2)
	by mail05.rapidsite.net (RS ver 1.0.2) with SMTP id 22492
	for <neal@xxxxxxxxxxxxx>; Sun, 31 Jan 1999 18:27:36 -0500 (EST)
Received: (from majordom@xxxxxxxxx)
	by listserv.equis.com (8.8.7/8.8.7) id PAA17298
	for metastock-outgoing; Sun, 31 Jan 1999 15:51:52 -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 PAA17295
	for <metastock@xxxxxxxxxxxxxxxxxx>; Sun, 31 Jan 1999 15:51:47 -0700
Received: from smtp02.wxs.nl (smtp02.wxs.nl [195.121.6.60])
	by freeze.metastock.com (8.8.5/8.8.5) with ESMTP id QAA13237
	for <metastock@xxxxxxxxxxxxx>; Sun, 31 Jan 1999 16:00:55 -0700 (MST)
Received: from escom ([195.121.39.110]) by smtp02.wxs.nl
          (Netscape Messaging Server 3.6)  with SMTP id AAA6502
          for <metastock@xxxxxxxxxxxxx>; Sun, 31 Jan 1999 23:49:07 +0100
Message-ID: <009401be4d6b$8e223b00$8d2779c3@xxxxx>
From: "A.J. Maas" <anthmaas@xxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Subject: Re: New Patch 65to652
Date: Sun, 31 Jan 1999 22:35:09 +0100
MIME-Version: 1.0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: 7bit
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: 8d81099847a8aaea4284ab0f1d50d72e.05

Doesn't ELWAVE uses the by DLWIN (previously) maintained MetaStock's
*DOP files along with the *DAT files ?
Think the New 652 Downloader does not automatically maintain them
anymore. So somewhere within the Downloaders' Settings......................
(or mayby even within the MSWIN settings)

Regards,
Ton Maas
ms-irb@xxxxxx

   
----- Original Message ----- 
From: <Kevin243@xxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: zondag 31 januari 1999 17:35
Subject: Re: New Patch 65to652


>I tried a download from Telescan with the new patch installed.  It worked OK.
>My new Elwave software 4.1, which is supposed to work with Metastock files, no
>longer works.  I sent them an email this morning.
>
>Kevin Campbell
>