Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 126 Location: Italy
|
When running the following system test based on the "EMA - Slope" formula in www.metastocktools.com:
"pds:=21;
x:=4;
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=5,V,If(x=6,P,C)))));
EMA:=Mov(x,pds,E);
EMAprev:=Ref(EMA,-1);
y:=Min(EMA,EMAprev)/Max(EMA,EMAprev);
EMAratio:=(If(EMA>EMAprev,2-y,y)-1)*100;
EMAper:=If(EMAratio<0,Atan(EMAratio,1)-360,
Atan(EMAratio,1))*10/9;
signal:=Mov(EMAper,pds,E);
LE:=Cross(EMAper,signal);
SE:=Cross(signal,EMAper) ;
LX:=0;
SX:=0;
....."
I received the following error message: "Period value out of valid range in Mov() function" . Could somebody suggest a soluion for this type of problem?
Thanks in advace and kind regards.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 1/19/2005(UTC) Posts: 1,065 Location: Koh Pha-Ngan, Earth
Was thanked: 2 time(s) in 2 post(s)
|
That error will appear on stocks where there is insufficient data to calculate the EMA - for example, when trying to calculate a 21-period EMA with only 20 bars of available data.
Also make sure that you set your exploration records loaded to match your chart's loaded periods.
MetaStock -> Tools -> The Explorer -> Options -> Load 2500 Records -> Ok.
jose '-)
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.