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

Re: [EquisMetaStock Group] Plotting Moving average with time frame different



PureBytes Links

Trading Reference Links

Hi Ricardo

This indicator is designed to plot a 60 minute simple moving average on any intraday chart. 

  {Hourly SMA - Close} 
  {2004 Roy Larsen, rlarsen@xxxxxxxxxxxxxx}
  {for use on 1 - 30 minute charts}
N:=Input("Hourly SMA Periods",1,999,5);
R:=Input("Display Mode,  0=Static  1=Dynamic  2=Test",0,2,1);
  {0=Display, update at last bar of hour}
  {1=Display, update on each new bar}
  {2=Backtest, update on first bar of new hour}
A:=Minute(); G:=LastValue(Highest(A)=0);
B:=LastValue(If(Highest(A)=59,1,
  If(Highest(A)=55,5,If(Highest(A)=50,10,
  If(Highest(A)=45,15,If(Highest(A)=40,20,
  If(Highest(A)=30,30,60)))))));
F:=Hour()=0 OR Hour()<>ValueWhen(2,1,Hour());
M:=DayOfWeek()<>ValueWhen(2,1,DayOfWeek()) OR
  (A=30)*(B=30) OR (A=15)*(B=15) OR G OR
  (A=10)*(B=10) OR (A=5)*(B=5) OR (F AND A<>0);
M:=M OR (M+F=0 AND Alert(F AND M=0,2)) OR (A=0 AND ValueWhen(2,1,A)=0);
F:=G OR (F AND M=0);
A:=LastValue(Cum(1)-1)=Cum(1);
B:=LastValue(Cum(1))=Cum(1);
J:=If(F,1,If(Alert(F,2)=0 AND M,2,0));
J:=If(A+LastValue(J)>2 OR B+(R=1)=2,1,J);
J:=If(G,1,If(R=2 OR Cum(J)<=1,M*2,J));
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));
X:=Cum((J>0)*K);
(X-ValueWhen(N+1,J,X))/N;

Kind regards

Roy Larsen
www.metastocktips.co.nz
Free formulas and MS links





----- Original Message ----- 
From: "riccardom70" <riccardom70@xxxxxxxxxxx>
To: <equismetastock@xxxxxxxxxxxxxxx>
Sent: Thursday, November 25, 2004 4:58 AM
Subject: [EquisMetaStock Group] Plotting Moving average with time frame different


> 
> 
> 
> Hi, How I can plottare on a Metastock chart 2 moving averages 
> calculated on frame different : example 5 minute and 60 minute chart 
> to 5 minute ? .
> 
> Thanks
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Yahoo! Groups Links
> 
> 
> 
> 
> 
> 
> 
> 
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/