PureBytes Links
Trading Reference Links
|
Try something like this:
=========
MA spread
=========
---8<---------------------
{ MA spread v1.0
©Copyright 2006 Jose Silva.
The grant of this license is for personal use
only - no resale or repackaging allowed.
http://www.metastocktools.com }
{ Select MA type }
pds:=Input("MA period spread",1,2520,1);
x:=Input("[1]Exp [2]Simple [3]Time [4]Tri [5]Var [6]Wght",1,6,1);
{ Data array }
y:=Typical();
{ MAs }
p1:=
If(x=1,Mov(y,pds,E),
If(x=2,Mov(y,pds,S),
If(x=3,Mov(y,pds,T),
If(x=4,Mov(y,pds,TRI),
If(x=5,Mov(y,pds,VAR),
Mov(y,pds,W))))));
p2:=
If(x=1,Mov(y,pds*2,E),
If(x=2,Mov(y,pds*2,S),
If(x=3,Mov(y,pds*2,T),
If(x=4,Mov(y,pds*2,TRI),
If(x=5,Mov(y,pds*2,VAR),
Mov(y,pds*2,W))))));
p3:=
If(x=1,Mov(y,pds*3,E),
If(x=2,Mov(y,pds*3,S),
If(x=3,Mov(y,pds*3,T),
If(x=4,Mov(y,pds*3,TRI),
If(x=5,Mov(y,pds*3,VAR),
Mov(y,pds*3,W))))));
p4:=
If(x=1,Mov(y,pds*4,E),
If(x=2,Mov(y,pds*4,S),
If(x=3,Mov(y,pds*4,T),
If(x=4,Mov(y,pds*4,TRI),
If(x=5,Mov(y,pds*4,VAR),
Mov(y,pds*4,W))))));
p5:=
If(x=1,Mov(y,pds*5,E),
If(x=2,Mov(y,pds*5,S),
If(x=3,Mov(y,pds*5,T),
If(x=4,Mov(y,pds*5,TRI),
If(x=5,Mov(y,pds*5,VAR),
Mov(y,pds*5,W))))));
p6:=
If(x=1,Mov(y,pds*6,E),
If(x=2,Mov(y,pds*6,S),
If(x=3,Mov(y,pds*6,T),
If(x=4,Mov(y,pds*6,TRI),
If(x=5,Mov(y,pds*6,VAR),
Mov(y,pds*6,W))))));
p7:=
If(x=1,Mov(y,pds*7,E),
If(x=2,Mov(y,pds*7,S),
If(x=3,Mov(y,pds*7,T),
If(x=4,Mov(y,pds*7,TRI),
If(x=5,Mov(y,pds*7,VAR),
Mov(y,pds*7,W))))));
p8:=
If(x=1,Mov(y,pds*8,E),
If(x=2,Mov(y,pds*8,S),
If(x=3,Mov(y,pds*8,T),
If(x=4,Mov(y,pds*8,TRI),
If(x=5,Mov(y,pds*8,VAR),
Mov(y,pds*8,W))))));
p9:=
If(x=1,Mov(y,pds*9,E),
If(x=2,Mov(y,pds*9,S),
If(x=3,Mov(y,pds*9,T),
If(x=4,Mov(y,pds*9,TRI),
If(x=5,Mov(y,pds*9,VAR),
Mov(y,pds*9,W))))));
p10:=
If(x=1,Mov(y,pds*10,E),
If(x=2,Mov(y,pds*10,S),
If(x=3,Mov(y,pds*10,T),
If(x=4,Mov(y,pds*10,TRI),
If(x=5,Mov(y,pds*10,VAR),
Mov(y,pds*10,W))))));
p11:=
If(x=1,Mov(y,pds*11,E),
If(x=2,Mov(y,pds*11,S),
If(x=3,Mov(y,pds*11,T),
If(x=4,Mov(y,pds*11,TRI),
If(x=5,Mov(y,pds*11,VAR),
Mov(y,pds*11,W))))));
p12:=
If(x=1,Mov(y,pds*12,E),
If(x=2,Mov(y,pds*12,S),
If(x=3,Mov(y,pds*12,T),
If(x=4,Mov(y,pds*12,TRI),
If(x=5,Mov(y,pds*12,VAR),
Mov(y,pds*12,W))))));
{ Plot on price chart }
p1;p2;p3;p4;p5;p6;p7;p8;p9;p10;p11;p12
---8<---------------------
jose '-)
http://www.metastocktools.com
--- In equismetastock@xxxxxxxxxxxxxxx, Lars Widlund
<Lars.Widlund@xxx> wrote:
>
> Thanks.
> I have done this.
> Mov(Typical(),1,T );
> Mov(Typical(),2,T );
> Mov(Typical(),3,T );
> Mov(Typical(),4,T );
> Mov(Typical(),5,T );
> Mov(Typical(),6,T );
> Mov(Typical(),7,T );
> Mov(Typical(),8,T );
> Mov(Typical(),9,T );
> Mov(Typical(),10,T );
> Mov(Typical(),11,T );
> Mov(Typical(),12,T );
>
> I have 7 different indicators the first one is
> for MA´s up to 41days. I wish there was an simple
> way to change the method of the MA´s without to
> have to made different indicator for every method.
>
> Lars
>
>
>
> At 11:31 2006-07-09, you wrote:
>
> Try something like this multiple EMA indicator:
>
> ==============
> EMA - multiple
> ==============
> ---8<--------------------------
>
> { Multiple EMAs - plot on price chart.
> <http://www.metastocktools.com>http://www.metastocktools.com }
>
> { User input }
> x:=Input("EMA separation [0-1000%]",
> 0,1000,0)/100+1;
>
> { Plot }
> Mov(C,2*x,E);
> Mov(C,4*x,E);
> Mov(C,6*x,E);
> Mov(C,8*x,E);
> Mov(C,10*x,E);
> Mov(C,13*x,E);
> Mov(C,16*x,E);
> Mov(C,19*x,E);
> Mov(C,22*x,E);
> Mov(C,25*x,E);
> Mov(C,29*x,E);
> Mov(C,33*x,E);
> Mov(C,37*x,E);
> Mov(C,41*x,E);
> Mov(C,45*x,E);
> Mov(C,50*x,E);
> Mov(C,55*x,E);
> Mov(C,60*x,E);
> Mov(C,65*x,E);
> Mov(C,70*x,E);
> Mov(C,76*x,E);
> Mov(C,82*x,E);
> Mov(C,88*x,E);
> Mov(C,94*x,E);
> Mov(C,100*x,E);
> Mov(C,107*x,E);
> Mov(C,114*x,E);
> Mov(C,121*x,E);
> Mov(C,128*x,E);
> Mov(C,135*x,E);
> Mov(C,143*x,E);
> Mov(C,151*x,E);
> Mov(C,159*x,E);
> Mov(C,167*x,E);
> Mov(C,175*x,E);
> Mov(C,184*x,E)
>
> ---8<--------------------------
>
> jose '-)
> http://www.metastocktools.com
>
>
>
>--- In equismetastock@xxxxxxxxxxxxxxx,
> Lars Widlund wrote:
>
> I agree, it is not advanced programming. I know
> that in TradeStation it is easy to plot 252 MA´s,
> there I just tell the program how many MA´s I
> want and it plot them automatically.
>
> Lars
>
>
>
> At 10:06 2006-07-09, you wrote:
>
> Yes, let's have a good chuckle about MetaStock's inability to deal
> with our highly sophisticated requirements. :p
>
> Lars, I wouldn't exactly call plotting 252 MAs on a chart "advanced
> programming"...
>
> The truth is, you'll find that Technical Analysis' true usefulness
> is inversely proportional to what is generally considered complex
> programming.
>
>
> jose '-)
> http://www.metastocktools.com
>
>
>
> Lars Widlund wrote:
>
> Hello Dusant.
> I have done that now. Yes we have to learn to
> live with the limitations of Metastock. Strange
> that Equis never have done so that we can do some
> more advanced programing in Metastock.
>
> Lars
>
>
> At 12:31 2006-07-08, you wrote:
>
> Hello Lars,
>
> Write all the MA indicators, plot it on a chart,
> and save it as your default template. Then we do
> not have to do it repeatedly. It is not possible to do a looping in
> Metastock.
>
> We have to learn with the limitations of Metastock. :)
>
> Dusant
>
>
> ----- Original Message -----
> From: Lars Widlund
> To: <mailto:equismetastock%40yahoogroups..com>equismetastock@
> Sent: Saturday, July 08, 2006 2:14 PM
> Subject: Re: [EquisMetaStock Group] Multiple MA in an indicator
>
>
> Dusant.
> I did so to, but then I need to do 7 indicators
> for 252 MA´s. What I look for is a way to write
> one indicator in which I can change the method
> for the MA´s. With your suggestion I have to
> write 7 indicators for each method and do several templates.
>
> Lars
>
>
> At 16:28 2006-07-07, you wrote:
>
> Lars
>
> Just right an indicator for all the two hundred
> and fifty two moving averages which you want.
> mov(c,2,s);
> mov(c,3,s);
>
> till you reach the limit of the indicator text space,
>
> Dusant
>
>
> ----- Original Message -----
> From: Lars Widlund
> To: <mailto:equismetastock%40yahoogroups..com>
> Sent: Friday, July 07, 2006 6:41 PM
> Subject: [EquisMetaStock Group] Multiple MA in an indicator
>
>
> Hello.
> Does anyone know how to write an indicator that
> display 252 MA´s in a chart? As it is now I have
> to drag all MA´s in to a chart and then save it
> as an template. But I want to change the method
> of the MA´s and don´t want to do one template for each method.
>
> Sincerely.
> Lars
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/
|