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

Re: Number of assigned variables



PureBytes Links

Trading Reference Links


More haste less speed!
 
sorry, this bit y2 = mov(open,int(our_num*10.),s) 
and y3 = mov(open,frac(our_num*10.),s)or similar?  should have read 
mov(open,int(frac(our_num)*10),s) and y3 = mov(open,frac(our_num*10.),s) or 
something - but I guessyou get the idea. 
 
----- Original Message ----- 
<BLOCKQUOTE dir=ltr 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black">From: 
  <A title=davidjennings@xxxxxxxxxxxxx 
  href="mailto:davidjennings@xxxxxxxxxxxxx";>David Jennings 
  To: <A title=metastock@xxxxxxxxxxxxx 
  href="mailto:metastock@xxxxxxxxxxxxx";>metastock@xxxxxxxxxxxxx 
  Sent: Sunday, October 21, 2001 5:58 
  PM
  Subject: Re: Number of assigned 
  variables
  
  As I say, I'm not a Metastock wizard, but 
  help me to understand why one has to give a portion of the variable e.g. 
  our_num  a name. Surely MetaStock is not so limited, that one has to give 
  a variable a name b4 one uses say y= mov(open,int(our_num,s) and y2 = 
  mov(open,int(our_num*10.),s) and y3 = mov(open,frac(our_num*10.),s)or 
  similar?
  <BLOCKQUOTE 
  style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    ----- Original Message ----- 
    <DIV 
    style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black">From: 
    Herman van den 
    Bergen 
    To: <A title=metastock@xxxxxxxxxxxxx 
    href="mailto:metastock@xxxxxxxxxxxxx";>metastock@xxxxxxxxxxxxx 
    Sent: Sunday, October 21, 2001 4:44 
    PM
    Subject: Re: Number of assigned 
    variables
    At 03:36 PM 10/21/01 +0100, you wrote: 
    >>>>Bill, I've 
    not tried this in MetaStock, so cannot say it definitively works however, 
    I've used it extensively elsewhere. Take a variable, our_num. For the sake 
    of argument, lets say it has the value. 34.95. Then you have basically three 
    variables, the first moving average length is 34, the second is nine, and 
    the signal is five. I use this type of thing a lot to decribe both a 
    function input, it's colour and line thickness when building indicators. If 
    it doesn't make sense, then I'll get the Metastock manual out and construct 
    an example. 
    <<<<Encoding several 
    variables into one has its uses but, eventually, you will want to access its 
    components ... so, are you not just postponing the fact that you will 
    eventually run our of variable names within the scope of your 
    formula?Herman>>>>
    Hope it helps
      ----- Original Message ----- From: 
        <mailto:wd78@xxxxxxxxxxxx>wavemechanic To: 
        <mailto:metastock@xxxxxxxxxxxxx>metastock@xxxxxxxxxxxxx 
        Sent: Sunday, October 21, 2001 2:29 PMSubject: 
        Number of assigned variablesI have run into a problem 
        while writing an indicator in which I have too many assigned variables 
        (more than 20). Has anyone found any programming tricks that permit, for 
        example, variables to be combined, etc., so that the total can be 
        greater than 
    20?Bill<<<<