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

Re: Formula help



PureBytes Links

Trading Reference Links


Hi Corey,
 
Many thanks for your speedy and detailed reply. The 
formula works brilliantly, the only problem I had was that the 'input' command 
was not accepted for a Symbol so I had to hard-code the values 
there.
 
I'm experimenting with 0.3 as the shift right 
now.
 
Much appreciated,
Nick
<BLOCKQUOTE dir=ltr 
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: 
  Corey Saxe 
  To: <A title=metastock@xxxxxxxxxxxxx 
  href="mailto:metastock@xxxxxxxxxxxxx";>metastock@xxxxxxxxxxxxx 
  Sent: Saturday, December 22, 2001 2:52 
  AM
  Subject: Re: Formula help
  
  Nick,
   
  {Plot}
  V1:=Input("Mov periods",2,500,200);V2:=Input("% 
  shift",0,50,.1);A1:=Mov(C,V1,E);A2:=A1+(A1*(V2/100));A3:=A1-(A1*(V2/100));A1;A2;A3
   
  {Alerts}
  V1:=Input("Mov periods",2,500,200);V2:=Input("% 
  shift",0,50,.1);A1:=Mov(C,V1,E);A2:=A1+(A1*(V2/100));    
  {Top band}A3:=A1-(A1*(V2/100));    {Bottom 
  band}Alert(C=A2 OR Cross(A2,C),1);    {Top band contact OR 
  crossing}
  -Alert(C=A3 OR Cross(C,A3),1);    {Bottom 
  band contact OR crossing, minus sign in front makes it easier to see 
  plot}
   
  0.1% might be too tight. I would try ~5% shift.
   
  -Corey.
  <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: 
    <A title=nick.channon@xxxxxxxxxxxxx 
    href="mailto:nick.channon@xxxxxxxxxxxxx";>Nick Channon 
    To: <A title=metastock@xxxxxxxxxxxxx 
    href="mailto:metastock@xxxxxxxxxxxxx";>metastock@xxxxxxxxxxxxx 
    Sent: Friday, December 21, 2001 8:02 
    AM
    Subject: Formula help
    
    I wonder if anybody can give me a clue as to 
    how to achieve the following:
     
    I have plotted a 200-day exponential moving 
    average, and also:
    * above it, the same MA but with a vertical 
    shift of 0.1%
    * below it, the same MA but with a vertical 
    shift of 0.1%
     
    This obviously creates 3 parallel 
    bands.
     
    I want to set up an alert that fires when the 
    price touches or drops below the top band, and another that fires when the 
    price touches or rises above the bottom band.
     
    All suggestions welcome.
     
    Many thanks,
    <FONT face=Arial 
size=2>Nick