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

Variables



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><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META content="MSHTML 5.50.3825.1300" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV><FONT size=2>
<DIV><FONT size=2><STRONG>MSK Formula FAQ's + Tips</STRONG></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT color=#0000ff><STRONG>Q3. 
</STRONG></FONT></FONT></FONT><FONT size=2><STRONG><FONT size=4>Variables: 
</FONT><FONT size=3>How To Make&nbsp;'Soft' values 
'Hard'......................</FONT></STRONG></FONT></DIV>
<DIV><FONT size=2><FONT size=3><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</STRONG><FONT size=2>(and u</FONT><FONT size=2>sing Variables in MSK: 
how&nbsp;a "Variable" is turned into a "Constant").</FONT></DIV></FONT></FONT>
<DIV><STRONG></STRONG>&nbsp;</DIV>
<DIV><STRONG><FONT size=2>Using variables in Formulas(+Functions) in 
MSKv.65+:</FONT></STRONG></DIV>
<DIV><FONT size=2>
<DIV><FONT size=2><STRONG>-</STRONG>How</FONT><FONT size=3>&nbsp;</FONT><FONT 
size=2>a <STRONG>"Variable's <EM><U>static</U> </EM></STRONG>(pre-defined) 
<STRONG>Numeric value"&nbsp;</STRONG>turned <STRONG>"Numeric 
Constant"</STRONG></FONT></DIV>
<DIV><FONT 
size=2><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</STRONG>topic: 
<STRONG>Using </STRONG><FONT 
face="Times New Roman"><EM><U><STRONG>pre-set</STRONG></U></EM>&nbsp;</FONT><STRONG>Variables 
to Represent Numbers (Numerical Constants) (Part 
1).</STRONG></FONT></DIV></FONT></DIV>
<DIV><FONT size=2><STRONG>-</STRONG>How</FONT>&nbsp;<FONT size=2>a 
<STRONG>"Variable's <EM><U>dynamic</U> </EM></STRONG>(later calculated) 
<STRONG>Numeric value" </STRONG>turned <STRONG>"Numeric 
Constant"</STRONG></FONT></DIV>
<DIV><FONT 
size=2><STRONG>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
</STRONG>topic: <STRONG>Using </STRONG><FONT 
face="Times New Roman"><EM><U><STRONG>calculated</STRONG></U></EM> 
</FONT><STRONG>Variables to Represent Numbers (Numerical Constants)&nbsp;(Part 
2).</STRONG></FONT></DIV>
<DIV><STRONG><FONT size=2></FONT></STRONG>&nbsp;</DIV><FONT size=2></FONT></DIV>
<DIV><FONT size=3><STRONG></STRONG></FONT></DIV>
<DIV><STRONG><U>Using <EM>calculated </EM>Variables to Represent Numbers 
(Numerical Constants)&nbsp;(part 2)</U></STRONG></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><STRONG>How an in a Variable 
<EM><U>calculated</U></EM></STRONG>&nbsp; <STRONG>Numeric value, eg the 
<EM>soft&nbsp;</EM>"Variable",&nbsp;is turned into a (surrogate) <EM>hard 
</EM>"Numeric Constant".</STRONG></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>-<STRONG>Soft </STRONG>coded values are the by a Function's 
<STRONG>later </STRONG><EM>defined&nbsp;<U><STRONG>calculated 
</STRONG></U></EM>values.</FONT></DIV>
<DIV><FONT size=2>-<STRONG>Hard </STRONG>coded values are <U><EM><STRONG>pre-set 
</STRONG></EM></U>values, eg <EM>defined&nbsp;</EM><STRONG>on creation 
</STRONG>of Formula ('s Function)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>Variable values can&nbsp;then be created&nbsp;in MSK&nbsp;by 
using the VA Operator (Varable Assignment, see part 1) and by&nbsp;referencing 
(inputting) </FONT><FONT size=2>that Variable in(to) another 
Function.</DIV></FONT>
<DIV><FONT size=2>For example&nbsp;by&nbsp;using: {among many of the other 
available variable-values-returning&nbsp;Functions}</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>-the CALL Function</FONT></DIV>
<DIV>-the BARS SINCE Function</DIV>
<DIV><FONT size=2>-the LAST VALUE Function</FONT></DIV>
<DIV><FONT size=2>etc. etc..</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2></DIV></FONT>
<DIV><FONT size=2></FONT></FONT><FONT size=2>The (surrogative) "Hard" coded 
values&nbsp;(Variable's <STRONG><EM><U>calculated </U></EM></STRONG>Numeric 
Constants) can&nbsp;then be derived form Soft coded values, and&nbsp;can be 
</FONT><FONT size=2>inputted in(to) a Function using </FONT><FONT size=2>the 
LastValue(DATA ARRAY) Function (nesting the fuction into a function). 
</DIV></DIV>
<DIV>
<DIV><FONT size=2>This&nbsp;</FONT><FONT size=2>to enable for the MSK Formula 
interpreter (the Formula debugger) to accept the Variable's 
<U><EM><STRONG>calculated</STRONG></EM></U> last value </FONT><FONT size=2>as a 
(Numerical) Constant in&nbsp;the (now nested)&nbsp;Function's 
Variable</FONT><FONT size=2>&nbsp;value or Expression value.</DIV></FONT></FONT>
<DIV><FONT size=2>For Example:</DIV></DIV></FONT>
<DIV><FONT size=2></FONT>&nbsp;</DIV></DIV>
<DIV>Day1 := Input("Day of Trade",1,31,4);<BR>Month1 := Input("Month of 
Trade",1,12,1);<BR>Year1 := Input("Year of 
Trade",1900,2400,2000);<BR>PdsTrade:=BarsSince(DayOfMonth()=Day1 AND Month()= 
Month1 AND Year()= Year1);<BR>HHVStop:= 
HHV(H,LastValue(PdsTrade));<BR>HHVStop</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Here the variable's last&nbsp;value calculated for the 
"PdsTrade"-<STRONG>Variable</STRONG>, is made into a (hard coded) 
<STRONG>Constant </STRONG>using the nested LastValue() 
<STRONG>Function</STRONG>.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><STRONG><U>Last Value in Data Array</U></STRONG></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>SYNTAX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lastvalue(DATA 
ARRAY)<BR>FUNCTION&nbsp;&nbsp;&nbsp;This function loads an entire data array 
with the last calculated value of the specified DATA ARRAY.</FONT></DIV>
<DIV><FONT 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The 
result of this function can be used in place of a constant in any function 
argument.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>If DATA ARRAY is undefined (e.g., only 100-days loaded and you 
request the last value of a 200-day moving average) then the lastvalue function 
returns zero.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Since this function loads an entire data array with the last 
value of another array, it allows a formula to look into the 
future.</FONT></DIV>
<DIV><FONT size=2>This is unacceptable for most indicators, but is very 
beneficial for things like pattern recognition.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>EXAMPLE &nbsp;The formula mov(close,lastvalue(fml("Determine 
Periods")),s) calculates a moving average using</FONT></DIV>
<DIV><FONT 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;the number of periods returned by the indicator named "Determine 
Periods".</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><STRONG><U>The Zig Zag and Lastvalue() Trap</U></STRONG></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>The Zig Zag indicator (see Zig Zag) uses 20/20 hindsight to 
filter out fluctuations.&nbsp; It shows only price movements that are equal to 
or greater than the amount specified.&nbsp; However, the Zig Zag indicator 
determines this "after the fact" (an advantage a trader doesn't have).&nbsp; 
With that said, be careful about using the Zig Zag indicator in a system 
test.&nbsp; It will produce results that are not attainable in real 
trading.</FONT></DIV>
<DIV><FONT size=2><BR>The Lastvalue() function (see <STRONG>Last Value in Data 
Array</STRONG>) can see into the future in that it returns the last value of a 
data array.&nbsp; For example, a system test could be written that bases a trade 
on a future price or indicator value&#8212;something unattainable in real-life.&nbsp; 
Although it has value for things like pattern recognition, it should rarely (if 
ever) be used in a system test, as it will provide the system test with 
unattainable information.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><STRONG><U>----------------------------------------------------------------------------------------------------</U></STRONG></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2><STRONG><FONT size=4>Variables: 
General</FONT></STRONG></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>
<DIV><FONT size=2>More1:</FONT></DIV>
<DIV><FONT size=2>-Using Variables to Enhance and Simplify (p.209 
MSKv65-man.)</FONT></DIV>
<DIV><FONT size=2>-Naming of Variables (p.209-210 MSKv65-man.)<BR>-Using 
Variables to Represent Numbers (p.210 MSKv65-man.)</FONT></DIV>
<DIV><FONT size=2>-Using <EM><U>pre-set</U></EM>&nbsp;Variables to Represent 
Numbers (Numerical Constants) (MSK Formula FAQ's + Tips Part 1).</FONT></DIV>
<DIV>
<DIV>
<DIV><FONT size=2>-Using <EM><U>calculated</U></EM> Variables to Represent 
Numbers (Numerical Constants)&nbsp;(MSK Formula FAQ's + Tips Part 
2).</FONT></DIV></DIV>
<DIV><FONT size=2>-Using Variables to Represent Mathematical Expressions 
(p.210-212 MSKv65-man.)<BR>-Referencing Variables within Custom Indicators 
(p.212 MSKv65-man.)</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>More2:</FONT></DIV>
<DIV><FONT size=2>-From the Glossary (p.212 
MSKv65-man.)</FONT></DIV></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>More3:</FONT></DIV>
<DIV><FONT size=2>-From the in MSK available Functions (p231-232 
MSKv65-man.)</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2><FONT 
size=2>--------------------------------------------------------------</FONT></FONT></DIV>
<DIV><FONT size=2>More1:</FONT></DIV>
<DIV><FONT size=2><FONT 
size=2>--------------------------------------------------------------</FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><STRONG><U>Using Variables to Enhance and 
Simplify</DIV></DIV></DIV></DIV></U></STRONG>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>In order to shorten, simplify, enhance, and make the 
maintenance of complex formulas easier, you may want to use 
variables.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><STRONG><U>Variable</U></STRONG></FONT></DIV>
<DIV><FONT size=2>1.- A variable is an alphanumeric name (up to 20 characters) 
that is assigned to an expression or a single value.</FONT></DIV>
<DIV><FONT size=2>2.- Up to 20 variables can be used in a formula.</FONT></DIV>
<DIV><FONT size=2>3.- Variables must be assigned before the variable is used in 
the formula.</FONT></DIV>
<DIV><FONT size=2>4.- A semi-colon must be used at the end of the variable 
assignment line.</FONT></DIV>
<DIV><FONT size=2>5.- Variables cannot be assigned within a 
function.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><STRONG><U>Naming of Variables</U></STRONG></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT size=2>The following rules apply to the naming of 
variables:</FONT></DIV>
<DIV><FONT size=2><STRONG>·&nbsp;</STRONG>Variable names cannot contain commas, 
parenthesis, spaces, underscores, etc. <BR><STRONG>·&nbsp;</STRONG>Variable 
names cannot duplicate names already used by functions (e.g., mov, rsi, cci, if, 
etc.).&nbsp; <BR><STRONG>·&nbsp;</STRONG>A variable cannot be assigned a name 
that matches the parameters reserved for use in formulas (e.g., open, high, low, 
close, simple, o, c, l, h, s, e, w, etc.).&nbsp; </FONT></DIV>
<DIV><FONT size=2>&nbsp; The following would produce an error, since the letter 
"s" is reserved for the moving average function, mov(), to mean 
"simple."</FONT></DIV>
<DIV>s:= (h+l+c)/3;</DIV>
<DIV><FONT size=2><FONT size=2><FONT size=2><FONT 
size=2><STRONG>·&nbsp;</STRONG>Variable </FONT></FONT></FONT>names must contain 
at least one alpha letter (e.g., T1234 ).</FONT></DIV>
<DIV><FONT size=2><STRONG>·&nbsp;</STRONG>Variable names are not case sensitive 
(e.g., "PERIODS" is the same as "periods").</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><STRONG><U>Using <EM>pre-set </EM>Variables to Represent Numbers (Numerical 
Constants)&nbsp;(Part 1)</U></STRONG></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><STRONG><U>Operators</U></STRONG></FONT></DIV>
<DIV><FONT size=2>Being part of the Set of Operators used in 
MetaStock:</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
-Mathematical</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -Logical 
Condition</FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -Variable 
Assigned</FONT></DIV>
<DIV><FONT size=2>the <STRONG>Variable Assignment Operator (VA) </STRONG>is 
written in a Formula as follows:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><STRONG>:=&nbsp; </STRONG>{the <STRONG>Variable Assignment 
Operator</STRONG>}</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><STRONG><U>Variable Assigning</U></STRONG></FONT></DIV>
<DIV><FONT size=2>Suppose you would like to be able to quickly adjust the time 
periods throughout a formula without having to edit each use of the time periods 
individually.</FONT></DIV>
<DIV><FONT size=2>This could be easy accomplished by <STRONG><EM>assigning 
</EM></STRONG>the Time periods (as a Numeric Value)&nbsp;to a 
<STRONG>Variable</STRONG>, </FONT><FONT size=2>for example&nbsp;to a 
<STRONG>Variable </STRONG>named "periods", as in:<BR></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>periods := 10;</DIV>
<DIV>c &gt; mov(c,periods, s) and ref(c,-1) &gt; ref(mov(c,periods,s),-1) 
and</DIV>
<DIV>h &gt; mov(h,periods,s) and ref(h,-1) &gt; ref(mov(h,periods,s),-1)</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>-In the above formula, the number "10" will be the substitute 
value&nbsp;of "periods"&nbsp;wherever the <STRONG>Variable </STRONG>named 
"periods" appears in the formula.</FONT></DIV>
<DIV><FONT size=2>-When you want to adjust the time periods in this formula, 
simply change the <STRONG>Number <EM>assigned </EM></STRONG>to the "periods" 
<STRONG>Variable</STRONG>.</FONT></DIV>
<DIV><FONT size=2>-If you change "10" to "20," the number "20" will be the 
substitute value&nbsp;for "10" throughout the formula. </DIV></FONT>
<DIV><FONT size=2>-</FONT><FONT size=2>Of course, you could also 
<STRONG><EM>assign </EM></STRONG>multiple <STRONG>Variables </STRONG>to 
represent multiple <STRONG>Numbers </STRONG>as follows:</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV>periods1 := 10;<BR>periods2 := 20;<BR>c &gt; mov(c,periods1, s) and 
ref(c,-1) &gt; ref(mov(c,periods1,s),-1) and</DIV>
<DIV>h &gt; mov(h,periods2,s) and ref(h,-1) &gt; ref(mov(h,periods2,s),-1)</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>-In this case, the <STRONG>Variables</STRONG> "periods1" and 
"periods2" represent two different values that can be used as many times as 
desired throughout the formula.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT 
size=2>--------------------------------------------------------------</FONT></FONT></DIV>
<DIV><FONT size=2>More2:</FONT></DIV>
<DIV><FONT size=2>-From the Glossary (p.212 MSKv65-man.)</FONT></DIV>
<DIV><FONT 
size=2>--------------------------------------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><U><STRONG>NUMERIC CONSTANT:</STRONG></U></FONT></DIV>
<DIV><FONT size=2>A single numeric value.&nbsp; A function requiring a numeric 
constant cannot accept a data array since a data array may contain multiple, 
rather than single, numeric values.&nbsp; An example of a numeric constant is 
the "10" in the formula "mov(C,10,E)."</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><U><STRONG>FUNCTION RESULT ARRAY:</STRONG></U></FONT></DIV>
<DIV><FONT size=2>A <EM>data array </EM>that is <STRONG>created </STRONG><EM>as 
the result (</EM>thus as a Data Array value) <STRONG>of the execution 
(=calculation) </STRONG><EM>of a function</EM>.<BR></FONT></DIV>
<DIV><FONT size=2><STRONG><U></U></STRONG></FONT>&nbsp;</DIV>
<DIV><FONT size=2><STRONG><U>LITERAL ARRAY:</U></STRONG></FONT></DIV>
<DIV><FONT size=2>A <EM>data array </EM>that is <STRONG>defined </STRONG>using a 
single Numeric Constant (eg "10").</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT size=2><FONT 
size=2>--------------------------------------------------------------</FONT></FONT></FONT></DIV>
<DIV><FONT size=2>More3:</FONT></DIV>
<DIV><FONT size=2>-From the in MSK available Functions (p231-232 MSKv65-man.) 
</FONT></DIV>
<DIV><FONT 
size=2>--------------------------------------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><STRONG><U>FUNCTION</U></STRONG> lastvalue(DATA 
ARRAY)<BR></FONT></DIV>
<DIV><FONT size=2>The LAST VALUE&nbsp;function <EM><U>loads</U></EM> 
<STRONG>only </STRONG>an:</FONT></DIV>
<DIV><FONT size=2>"entire data array" with the last known calculated value of 
the specified DATA ARRAY". </FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Interpretation</FONT></DIV>
<DIV><FONT size=2><STRONG>-</STRONG>Fuction loads only {the DATA ARRAY} (and 
thus oppose to the FRA or LA functions, which are either</FONT></DIV>
<DIV><FONT size=2>&nbsp;created </FONT><FONT size=2>as the <EM>result 
</EM>of&nbsp;</FONT><FONT size=2>calculations(FRA)</FONT><FONT size=2>&nbsp;or 
<EM>pre-efined </EM>upfront(LA), it uses the <EM>actual&nbsp;</EM></FONT><FONT 
size=2>entire</FONT></DIV>
<DIV><FONT size=2>&nbsp;DATA ARRAY's array data (which could also well be C, for 
example).</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>-And just loads the passed on array&nbsp;data as 
a&nbsp;<U><EM>Constant</EM></U>&nbsp;(thus&nbsp;like done in the Literal 
Array)</DIV></FONT>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>-With the last known (thus once loaded = not&nbsp;changable) 
"calculated value" (thus the Fuction Result data array)</FONT></DIV>
<DIV><FONT size=2>&nbsp;of the specified DATA ARRAY (thus the 'dynamicaly' 
<U><EM>calculated results </EM></U>of Function).</DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>-The result of this function can thus be used <STRONG>in place 
of </STRONG>a Numeric&nbsp;<STRONG>constant </STRONG>(eg "10") in any function 
<EM>argument</EM>.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV></FONT>
<DIV><FONT size=2>-And where a Price Array can be a Data Array, but vice versa, 
where a Data Array can&nbsp;-among many other arrays- be&nbsp;a Price Array, but 
where this need NOT BE the standard all of the time.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=3>Regards,<BR>Ton Maas<BR><A 
href="mailto:ms-irb@xxxxxxxxxxxxxxxx";>ms-irb@xxxxxxxxxxxxxxxx</A><BR>Dismiss the 
".nospam" bit (including the dot) when replying.<BR>Homepage&nbsp; <A 
href="http://home.planet.nl/~anthmaas";>http://home.planet.nl/~anthmaas</A></FONT></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  Michael Spencer </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=metastock@xxxxxxxxxxxxx 
  href="mailto:metastock@xxxxxxxxxxxxx";>metastock@xxxxxxxxxxxxx</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> woensdag 19 april 2000 9:07</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: A Round about way for Date 
  Function</DIV>
  <DIV><BR></DIV>
  <DIV><FONT color=#000000 size=2>Andrew ... I believe that a value can be 
  passed into HHV using the LastValue function.&nbsp; Try 
  HHV(H,lastvalue(array)), where "array" is the value you want to pass in.&nbsp; 
  Metastock should have some sort of app note on this, as I have asked them and 
  received a no-can-do reply.&nbsp; But&nbsp; they don't, I think.&nbsp; 
  However, I am using this method in custom indicators; and, if you look in the 
  manual (V6.52, p.235), you'll see that the Last Value function is specifically 
  identified for passing constants into functions, supposedly like HHV.&nbsp; 
  You shouldn't have any problem, but give me a holler if you need 
  help.</FONT></DIV>
  <DIV><FONT color=#000000 size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2>Best regards,</FONT></DIV>
  <DIV><FONT size=2>Michael Spencer</FONT></DIV>
  <DIV><FONT size=2></FONT>&nbsp;</DIV>
  <DIV><FONT size=2><B>-----Original Message-----</B><BR><B>From: </B>Kornberg 
  Family<BR><B>To: </B>Metastock List &lt;<A 
  href="mailto:metastock@xxxxxxxxxxxxx";>metastock@xxxxxxxxxxxxx</A>&gt;<BR><B>Date: 
  </B>Tuesday, April 18, 2000 5:13 AM<BR><B>Subject: </B>A Round about way for 
  Date Function<BR><BR></DIV>
  <BLOCKQUOTE 
  style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid"></FONT>
    <DIV><FONT size=2><SPAN class=10140112-18042000>Hi,</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000>Metastock still does not 
    have a date function.&nbsp; I have a workaround but unfortunately some of 
    the other Metastock functions eg. HHV cannot use a passed 
    number.</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000>Here is a Days in trade 
    plot.</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000>Days in 
    Trade</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000>Day1 := Input("Day of 
    Trade",1,31,4);<BR>Month1 := Input("Month of Trade",1,12,1);<BR>Year1 := 
    Input("Year of Trade",1900,2400,2000);</SPAN></FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN 
    class=10140112-18042000>PdsTrade:=BarsSince(DayOfMonth()=Day1 AND Month()= 
    Month1 AND Year()= Year1);</SPAN></FONT></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN 
class=10140112-18042000>PdsTrade;</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000>I would like to be able to 
    pass the number of days into HHV but it does not allow me to 
    do&nbsp;this.&nbsp; I want to do the following:</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000>HHVStop:=&nbsp; 
    HHV(H,PDSTrade) ;</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000>Can anyone suggest a 
    workaround?</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT size=2><SPAN class=10140112-18042000>Thanks,</SPAN></FONT></DIV>
    <DIV><FONT size=2><SPAN 
    class=10140112-18042000><BR>Andrew</SPAN></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
</x-html>From ???@??? Sat Apr 22 16:09:31 2000
Return-Path: <majordom@xxxxxxxxxxxxxxxxxx>
Received: from listserv.equis.com (listserv.equis.com [204.246.137.2])
	by purebytes.com (8.9.3/8.9.3) with ESMTP id MAA22075
	for <neal@xxxxxxxxxxxxx>; Sat, 22 Apr 2000 12:18:43 -0700
Received: (from majordom@xxxxxxxxx)
	by listserv.equis.com (8.8.7/8.8.7) id MAA03907
	for metastock-outgoing; Sat, 22 Apr 2000 12:50:22 -0600
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 MAA03902
	for <metastock@xxxxxxxxxxxxxxxxxx>; Sat, 22 Apr 2000 12:50:18 -0600
Received: from hme0.mailrouter03.sprint.ca ([207.107.250.37])
	by freeze.metastock.com (8.8.5/8.8.5) with ESMTP id NAA12625
	for <metastock@xxxxxxxxxxxxx>; Sat, 22 Apr 2000 13:03:03 -0600 (MDT)
Received: from default (spc-isp-ott-uas-23-15.sprint.ca [209.148.160.116])
	by hme0.mailrouter03.sprint.ca (8.8.8/8.8.8) with SMTP id OAA23146
	for <metastock@xxxxxxxxxxxxx>; Sat, 22 Apr 2000 14:44:55 -0400 (EDT)
Message-ID: <002701bfac8a$e7a6dd00$74a094d1@xxxxxxx>
From: "Walter Lake" <wlake@xxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
References: <000201bfac5d$8b780d60$afb44f0c@xxxxxxx>
Subject: Re: COT
Date: Sat, 22 Apr 2000 14:44:31 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6600
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
Sender: owner-metastock@xxxxxxxxxxxxx
Precedence: bulk
Reply-To: metastock@xxxxxxxxxxxxx
Status:   

Tim and others who wrote

This and other downloads ... i.e., Omni Trader 2000 has a free download plus
it displays either the net longs or an adjustable COT Index on the bottom of
each futures chart ... are still bi-weekly data. It comes out every two
weeks.

COT is specialized form of volume, in that it breaks down the positions of
different sub-groups. This can be done daily.

You can also collect individualized commercials and funds daily data ...
just as you would collect individual stock data.

Best regards

Walter


----- Original Message -----
From: "Tim Stevenson" <tim@xxxxxxxxxxxxxxxxxxxxxxx>
To: <metastock@xxxxxxxxxxxxx>
Sent: Saturday, April 22, 2000 9:20 AM
Subject: RE: COT


| I use CSI's Unfair Advantage as my data vendor and I noticed they have an
| entry in their database for COT data for each commodity.  I haven't used
| this but for those looking to collect COT this might be good choice.  I've
| noticed problems posted here about other data vendors from time to time.
| For those considering a change, I can't remember any posts in the past
| complaining about data collection problems with CSI.
|
| Tim Stevenson
|
|
| > -----Original Message-----
| > From: owner-metastock@xxxxxxxxxxxxx
| > [mailto:owner-metastock@xxxxxxxxxxxxx]On Behalf Of Walter Lake
| > Sent: Saturday, April 22, 2000 6:50 AM
| > To: metastock@xxxxxxxxxxxxx
| > Subject: COT
| >
| >
| > Hi Ed and others who wrote
| >
| > There is no official daily "COT" site. You have to get and work with
your
| > own data. Much like the TA's in the '50's and '60's had to do with price
| > data. Now we have Excel to help us ... pivot table are always
| > handy for this
| > type of analysis.
| >
| > Most books on econometrics will discuss obtaining data, handling
| > it and what
| > to do about missing data, etc. Traders raised on downloads or lack of
| > downloads are often not used to thinking about alternate sources of
data.
| >
| > There's are lots of differences to think about between quantity,
| > quality and
| > "suitability" of data. Also quantity is not the same as quantitative,
and
| > quality is not the same as qualitative.
| >
| > Best regards
| >
| > Walter
| >
| >
| > ----- Original Message -----
| > From: "Ed Montero" <emontero@xxxxxxxxxxxxxx>
| > To: <metastock@xxxxxxxxxxxxx>
| > Sent: Friday, April 21, 2000 4:57 PM
| > Subject: Re: (Market) Jul Corn
| >
| >
| > | Walter, how can you collect daily COT data?  Could you mention a
source
| > | please?
| > | Thanks,
| > | Ed Montero
| > | ----- Original Message -----
| > | From: Walter Lake <wlake@xxxxxxxxx>
| > | To: <metastock@xxxxxxxxxxxxx>
| > | Sent: Friday, April 21, 2000 2:43 PM
| > | Subject: Re: (Market) Jul Corn
| > |
| > |
| > | >
| > | > Hi Adam
| > | >
| > | > COT is important. It is basically volume and volume is
| > important in any
| > | form
| > | > of Tech Analysis.
| > | >
| > | > Problems arise when traders rely on bi-weekly COT  ... COT can be
| > | collected
| > | > daily and I prefer daily volume over bi-weekly volume.
| > | >
| > | > Small guys like us are not going to move the market. The funds will.
| > | > Personally, I want to know what the funds are doing all the
| > time. I want
| > | to
| > | > know what their volume is every day and hopefully some idea as to
why.
| > | >
| > | > Other forms of useful analysis besides technical anlaysis include
| > | > fundamental, statistical, historical, and insider, etc.
| > | >
| > | > Whether or not money management and trade management will
| > save our butts
| > | ...
| > | > contrary to accepted wisdom on the List ... I  wouldn't count on it.
| > | >
| > | > Best regards
| > | >
| > | > Walter
| > | >
| > | > ----- Original Message -----
| > | > From: "Adam Hefner" <vonhef@xxxxxxxxxxxx>
| > | > To: <metastock@xxxxxxxxxxxxx>
| > | > Sent: Friday, April 21, 2000 1:22 PM
| > | > Subject: Re: (Market) Jul Corn
| > | >
| > | >
| > | > | Walter,
| > | > |         I think you are missing my point. I am testing the
| > | > |  workings of my mechanical parts, and as you mentioned
| > | > | "Technical Analysis alone is NOT enough" ....but using
| > | > |  the "Commitment Of Traders" is listed as a tool to use
| > | > |  in John Murphy's books ( also goes along Charles
| > | > |  Drummond, and many others...) You may not call this
| > | > |  TA, but is this not using fundamentals in a technical way?
| > | > |  Yes the trade I listed was price/pattern
| > | > | only generated, and yes it was wrong, but what system
| > | > | gives a 100% correct signals? You may be right about
| > | > | TA not being enough...but there are some who disagree.
| > | > | I am undecided on the issue. I do think the COT is a
| > | > | valuable tool and may incorporate into my decisions,
| > | > | but this Drummond stuff is supposed to be good enough
| > | > | to correct itself into the right direction quickly....that is
| > | > | what I am testing. If this basic system proves good enough
| > | > | to build on...then I can add the other decision filters
| > | > | to the process.
| > | > |
| > | > | You Wrote:  "You're too good of an analyst and too
| > | > | patient and persistent in your system development to
| > | > |  use a "hold your nose and jump" trading approach."
| > | > |
| > | > |  Thank you for the compliment ...and you should know
| > | > | I TRULY value your opinions and advice.
| > | > | Some of these signals generate a historically high (non optimized)
| > | > | rate of good entry, If this is true...shouldn't good
| > | > | Money Management and proper monitoring of the
| > | > | trades result in an over-all success?
| > | > |
| > | > |    Adam
| > | > |
| > |
| >
| >
|