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

Re: Formula help



PureBytes Links

Trading Reference Links


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="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  ----- Original Message ----- 
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black">From: 
  <A href="mailto:nick.channon@xxxxxxxxxxxxx"; 
  title=nick.channon@xxxxxxxxxxxxx>Nick Channon 
  To: <A 
  href="mailto:metastock@xxxxxxxxxxxxx"; 
  title=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,
  Nick