PureBytes Links
Trading Reference Links
|
<x-html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.3825.1300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT size=2><FONT size=2>COMHCRXX:= FmlVar("COM-CNTRY","COMCR");
</FONT></FONT></DIV></FONT></DIV>
<DIV><FONT size=2>COMHCRR:= If(</FONT></DIV>
<DIV><FONT
size=2> <FONT
size=2><FONT size=2>COMHCRXX </FONT></FONT>> 0 ,</FONT></DIV>
<DIV><FONT
size=2> (PREV)
+ 1 ,</FONT></DIV>
<DIV><FONT
size=2> If(</FONT></DIV>
<DIV><FONT
size=2> <FONT
size=2><FONT size=2>COMHCRXX </FONT></FONT>< 0 ,</FONT></DIV>
<DIV><FONT
size=2> (PREV)
- 1 ,</FONT></DIV>
<DIV><FONT
size=2> PREV</FONT></DIV>
<DIV><FONT
size=2>
)</FONT></DIV>
<DIV><FONT
size=2>
);</FONT></DIV>
<DIV><FONT size=2>COMHCRT:= If(</FONT></DIV>
<DIV><FONT
size=2> <FONT
size=2><FONT size=2>COMHCRXX </FONT></FONT>> 0 , </FONT></DIV>
<DIV><FONT
size=2> +
1 ,</FONT></DIV>
<DIV><FONT
size=2> If(</FONT></DIV>
<DIV><FONT
size=2>
<FONT size=2><FONT size=2>COMHCRXX </FONT></FONT>< 0 ,</FONT></DIV>
<DIV><FONT
size=2> -
1 ,</FONT></DIV>
<DIV><FONT
size=2>
- 1</FONT></DIV>
<DIV><FONT
size=2>
)</FONT></DIV>
<DIV><FONT
size=2>
);</FONT></DIV>
<DIV><FONT size=2>COMHCRT2:= If(</FONT></DIV>
<DIV><FONT
size=2>
<FONT size=2><FONT size=2>COMHCRXX </FONT></FONT>> 0 ,</FONT></DIV>
<DIV><FONT
size=2>
Ref( COMHCRT, -1 ) + 1
,<BR>
If(</FONT></DIV>
<DIV><FONT
size=2>
<FONT size=2><FONT size=2>COMHCRXX </FONT></FONT>< 0 ,</FONT></DIV>
<DIV><FONT
size=2>
Ref( COMHCRT , -1 ) - 1 ,</FONT></DIV>
<DIV><FONT
size=2>
Ref( COMHCRT , -1 )</FONT></DIV>
<DIV><FONT
size=2>
)</FONT></DIV>
<DIV><FONT
size=2>
);</FONT></DIV>
<DIV><FONT size=2>COMHCRR;</FONT></DIV>
<DIV><FONT size=2>COMHCRT2</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Adjustments were made...just from eyeballing. </FONT></DIV>
<DIV><FONT size=2>Will take up a closer look + more time, to see and test it for
it to be correct,</FONT></DIV>
<DIV><FONT size=2>hope you will get the drift tho, from the alterations
that were made.</FONT></DIV>
<DIV><FONT size=2></FONT><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Regards,<BR>Ton Maas<BR></FONT><A
href="mailto:ms-irb@xxxxxxxxxxxxxxxx"><FONT
size=2>ms-irb@xxxxxxxxxxxxxxxx</FONT></A><BR><FONT size=2>Dismiss the ".nospam"
bit (including the dot) when replying.<BR>Homepage </FONT><A
href="http://home.planet.nl/~anthmaas"><FONT
size=2>http://home.planet.nl/~anthmaas</FONT></A></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2><FONT
size=2><A>////////////////////============//////////////////////</A></FONT></FONT></DIV>
<DIV><FONT size=2></FONT><FONT size=2> </DIV></FONT>
<DIV><FONT size=2>----- Original Message ----- </FONT>
<DIV><FONT size=2>From: "Guy Tann" <</FONT><A
href="mailto:grt@xxxxxxxxxxxx"><FONT size=2>grt@xxxxxxxxxxxx</FONT></A><FONT
size=2>></FONT></DIV>
<DIV><FONT size=2>To: "Metastock User Group" <</FONT><A
href="mailto:metastock-list@xxxxxxxxxxxxx"><FONT
size=2>metastock-list@xxxxxxxxxxxxx</FONT></A><FONT size=2>></FONT></DIV>
<DIV><FONT size=2>Sent: woensdag 16 augustus 2000 18:50</FONT></DIV>
<DIV><FONT size=2>Subject: Calculation question again</FONT></DIV></DIV>
<DIV><FONT size=2><BR></FONT></DIV><FONT size=2>> List,<BR>> <BR>>
Well, I'm still trying to move our Intermediate Term Signals into MS and
I'm<BR>> still having problems. I have completed all of the coding and
am now in the<BR>> debugging stage.<BR>> <BR>> First, here are two
calculations that I've tried. One works (the one with<BR>> PREV) and
one doesn't. After all of the help the last time around, I<BR>>
naturally tried the Ref() function because everyone said it was the<BR>>
preferable approach.<BR>> <BR>> Any and all help is appreciated.<BR>>
<BR>> COMHCRR:= If( FmlVar("COM-CNTRY","COMCR") > 0 , PREV + 1 ,
If(<BR>> FmlVar("COM-CNTRY","COMCR") < 0 , PREV - 1 , PREV ) );<BR>>
COMHCRR;<BR>> <BR>> COMHCRT:= If( FmlVar("COM-CNTRY","COMCR") > 0
, Ref( COMHCRT, -1 ) + 1 ,<BR>> If( FmlVar("COM-CNTRY","COMCR") < 0
, Ref( COMHCRT , -1 ) - 1 , Ref(<BR>> COMHCRT , -1 ) ) );<BR>>
COMHCRT;<BR>> <BR>> This is a simple calculation where I accumulate a
total, adding 1 if the<BR>> indicator > 0, subtracting 1 if it is
< 0 and just carrying the previous<BR>> day's value forward if there is no
change. Nothing sophisticated.<BR>> <BR>> My second minor problem is
that the answer is incorrect. I've exported my<BR>> MS SPI data into a
Clipper database to insure an identical test data set.<BR>> Based upon that,
the results should be identical, especially since this<BR>> calculation is so
simple. I haven't double-checked that COMCR calculation<BR>> in both
systems, but I will right now. I should say that I had verified<BR>>
that calculation before but I will do it again just to make sure nothing<BR>>
else managed to get screwed up.<BR>> <BR>> Guy<BR>> <BR>> Never be
afraid to try something new. Remember, amateurs built the ark,<BR>>
professionals built the Titanic.<BR>> <BR>> <BR>> </FONT></BODY></HTML>
</x-html>
|