Rank: Advanced Member
Groups: Registered, Registered Users Joined: 3/19/2005(UTC) Posts: 2,995
Was thanked: 14 time(s) in 10 post(s)
|
<Request forwarded to forum>
How do you build a Moving average formula with 5 days closing price and 6 days opening price MA?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
If you want to see the two lines on the same indicator:
Simple MA's
ma1:=Sum(C,5)/5;
ma2:=Sum(O,6)/6;
ma1;
ma2;
Exponential MA's
m1:=2/(5+1);
ma1:=(C*m1)+(PREV*(1-m1));
m2:=2/(6+1);
ma2:=(O*m2)+(PREV*(1-m2));
ma1;
ma2;
If you want to combine the indicators and add some weighting to one of the values, something like:
ma1:=Sum(C,5);
ma2:=Sum(O,6);
((ma1*x)+(ma2*y))/z;
or
m1:=2/(5+1);
ma1:=(C*m1)+(PREV*(1-m1));
m2:=2/(6+1);
ma2:=(O*m2)+(PREV*(1-m2));
((ma1*x)+(ma2*y))/z;
find the right values of x,y, and z that suit your purpose.
Hope this helps.
wabbit :D
|
|
|
|
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.