Rank: Member
Groups: Registered, Registered Users Joined: 11/5/2011(UTC) Posts: 14
|
Hi,
I worked on a formula to get the 10 day exponential out of the ratio Advance securties NYSE/(Advance sec. NYSE + Decline sec. NYSE).
I'm not sure i got it right, because its not giving the results i expect.
Here i go:
{reference to Advance/Decline securities on NYSE}
Security("C:\MetaStock Data\BM Data\X.NYSE-A",C)
Security("C:\MetaStock Data\BM Data\X.NYSE-D",C)
{parameters for the ratio}
A:= Security("C:\MetaStock Data\BM Data\X.NYSE-A",C);
B:= Security("C:\MetaStock Data\BM Data\X.NYSE-D",C);
{ratio}
X:= A/(A+B);
{10 day exp. moving average}
Mov(x, 10, e)
As a newbie i am amazed that a slight change that looks like just rewriting can give differente results. Off course i want the right results, so i wonder when i need to simplify things as done above with the parameter header. If i dont do this, i get different results, which makes life a little hard on getting the right indicator IMO. :/
Thanks for any directions.
grtz
Michel
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Too much code -- take out these lines:
{reference to Advance/Decline securities on NYSE}
Security("C:\MetaStock Data\BM Data\X.NYSE-A",C)
{ this will display and mess up your plot } Security("C:\MetaStock Data\BM Data\X.NYSE-D",C)
{ this will display and mess up your plot }
The rest of it works just fine:
{parameters for the ratio} A:= Security("C:\MetaStock Data\BM Data\X.NYSE-A",C); B:= Security("C:\MetaStock Data\BM Data\X.NYSE-D",C);
{ratio}
X:= A/(A+B);
{10 day exp. moving average}
Mov(x, 10, E)
|
|
|
|
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.