Rank: Member
Groups: Registered, Registered Users Joined: 8/29/2005(UTC) Posts: 26 Location: South Africa
|
Hi there, does anyone know if it is possible to make a momentum graph in Metastock look similar to this graph below and also with the different colours?
thanks
|
|
|
|
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)
|
Try:
---8<-----------------------------
x:=Input("Data: 1-O 2-H 3-L 4-C 5-MP 6-Typ",1,6,4);
x:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=4,C,If(x=5,MP(),Typical())))));
prd:=Input("Momentum Perods",1,100,10);
mom:=Mo(x,prd)-100;
momUp:=If(mom>0,mom,0);
momDn:=If(mom<0,mom,0);
momUp; {color me green histogram}
momDn; {color me red histogram}
---8<-----------------------------
Hope this helps.
wabbit :D
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 8/29/2005(UTC) Posts: 26 Location: South Africa
|
sorry but where do i put this?
|
|
|
|
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)
|
Read in your Users Manual, "Creating Your Own Indicators". Use the code I provided in the new indicator.
wabbit :D
P.S. Patrick. What happened to the "MS Bible Post?" and btw the search function isnt working right (the search by date function is not operational, and none of my find text searches have any returns??)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 6/13/2005(UTC) Posts: 52
|
Just to add a few comments to what wabbit has said. Once you have placed his code in the Indicator Builder you will need to set the line style and color for both the momUp and momDn.
You may also want to search the forum’s database for similar questions. The forum has been around long enough to have an extensive history and well maintained by the excellent MetaStock staff. =D> Try typing “color” in the Search area and you will find additional information.
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 8/29/2005(UTC) Posts: 26 Location: South Africa
|
thanks Wabbit and investorretired the formula worked perfectly but there is one more thing i would like to ask... How would I apply a moving average to that indicator?
When applying one at the moment it is very flat with large peaks...
thanks
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 3/7/2005(UTC) Posts: 1,346
|
hey noel... while it wouldn't be a true ma of wabbits formula you could just plot the equis standard mom on top of it.... that would in a sense be a ma....
also you could plot equis's mom in its own window and apply a moving average to it.... then drag that ma line down and drop on top of wabbits formula for a yet smoother line.....h
|
|
|
|
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.