logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
PeterB602  
#1 Posted : Thursday, May 4, 2006 11:04:36 AM(UTC)
PeterB602

Rank: Newbie

Groups: Registered, Registered Users
Joined: 4/29/2006(UTC)
Posts: 2

I wish to know if I am doing things correctly? I have read my MS users manuel P.186 on changing the MACD parameters but when it actually comes to it the MACD idicator only lets you change one number by right clicking on the idicator thats easy.Lets say for eg I want to change from 26-12-9 to 39-19-9 by changing that one number do the others automatically fall in line????????????? Regards PeterB
wabbit  
#2 Posted : Thursday, May 4, 2006 1:28:02 PM(UTC)
wabbit

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)
The value that you are adjusting is the signal line periods i.e. the moving average period. The difference is still between the 0.075 and 0.15 exponential moving averages. You can make your own MACD by following the instructions/code in the "Creating Your Own Indicators" section of the manual. You wil not be able to exactly replicate the built in MACD, but the differences are, for the most part, insignificant. If you get stuck, just ask for help. wabbit :D
hayseed  
#3 Posted : Thursday, May 4, 2006 1:34:33 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey peter.... that changes the the signal/trigger line only.... perhaps you can adapt the code below to match your needs.....h macd style with inputs [color=blue:5c25ef581b]{ edited to reflect jose's more accurate numbers and investorretired's histogram suggestions}[/color]
ma1:=Input("short moving average",1,100,12.3); ma2:=Input("long moving average ",1,200,25.7); ma3:=Input("signal moving average",1,200,9); 0; a:=Mov(C ,ma1 ,E )- Mov(C ,ma2 ,E ); b:=Mov(a,ma3,E); a; b; a-b ----------------------------------------------
Jose  
#4 Posted : Thursday, May 4, 2006 2:09:01 PM(UTC)
Jose

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)
Try 12.3/25.7/9 periods in Hayseed's indicator, for a very close fit to the default MACD. jose '-)
whitehorse  
#5 Posted : Monday, May 8, 2006 11:53:57 AM(UTC)
whitehorse

Rank: Newbie

Groups: Registered, Registered Users
Joined: 1/4/2006(UTC)
Posts: 5

Any idea of how to add the MACD-histogram? :?
hayseed  
#6 Posted : Monday, May 8, 2006 12:05:03 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey whitehorse...... most just use the same macd but change the style to the histogram under color/style tab on the indicators settings itself.....h
investorretired  
#7 Posted : Monday, May 8, 2006 6:15:08 PM(UTC)
investorretired

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 6/13/2005(UTC)
Posts: 52

Hayseed: Changing a MACD to a histogram in MS will not get the desired results. This will give a histogram of the MACD or MACD signal line. I believe the MACD histogram is defined as the difference between the MACD line and the MACD signal line and then presented as a histogram. This makes the centerline crossovers and divergences easily identifiable. By changing your formula slightly (Listed Below “a;b” to “a-b”) and by then changing the line style to histogram will get the desired results. You may also want to add a horizontal line at zero. macd style with inputs -------------------------------------------- ma1:=Input("short moving average",1,100,12); ma2:=Input("long moving average ",1,200,26); ma3:=Input("signal moving average",1,200,9); a:=Mov(C ,ma1 ,E )- Mov(C ,ma2 ,E ); b:=Mov(a,ma3,E); a-b InvestorRetired
hayseed  
#8 Posted : Monday, May 8, 2006 7:13:26 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey ir.... thanks, your absolutely correct.... my error.... have spent too many years refering to the 'difference' as 'divergence'.... its the old dog new trick syndrome.....h
henry1224  
#9 Posted : Monday, May 8, 2006 10:43:30 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Metastock will allow you to use decimals in a moving average, but it will calculate the Moving average as if it were whole numbers. here is a test Macd 1 using decimals in the input ma1:=Input("short moving average",1,100,12.3); ma2:=Input("long moving average ",1,200,25.7); ma3:=Input("signal moving average",1,200,9); 0; a:=Mov(C ,ma1 ,E )- Mov(C ,ma2 ,E ); b:=Mov(a,ma3,E); a; b; a-b Macd 2 using only whole numbers ma1:=Input("short moving average",1,100,12); ma2:=Input("long moving average ",1,200,26); ma3:=Input("signal moving average",1,200,9); 0; a:=Mov(C ,ma1 ,E )- Mov(C ,ma2 ,E ); b:=Mov(a,ma3,E); a; b; a-b plot them into a chart and you will see that the numbers are the same
Jose  
#10 Posted : Monday, May 8, 2006 11:00:37 PM(UTC)
Jose

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)
Henry, the plots are clearly different. Try plotting both indicators in the same window. jose '-)
mstt  
#11 Posted : Monday, May 8, 2006 11:48:18 PM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Jose The plots are clearly different because one MA is using a whole number of 25 and the other is using a whole number of 26, not because MS is using the fractional component of the "periods" parameter. Regards Roy MetaStock Tips & Tools
henry1224  
#12 Posted : Tuesday, May 9, 2006 12:46:00 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
Jose  
#13 Posted : Tuesday, May 9, 2006 1:04:00 AM(UTC)
Jose

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)
Hmmm... I guess that MetaStock's standard MA functions truncate inputs to integer values. This works: [code:1:452bc7b3dd] ma1:=Input("short moving average",1,100,12.3); ma2:=Input("long moving average ",1,200,25.7); ma3:=Input("signal moving average",1,200,9); Ema1:=C*2/(ma1+1)+PREV*(1-2/(ma1+1)); Ema2:=C*2/(ma2+1)+PREV*(1-2/(ma2+1)); a:=Ema1-Ema2; b:=Mov(a,ma3,E); a;b;a-b [/code:1:452bc7b3dd] jose '-)
Capablanca  
#14 Posted : Tuesday, May 9, 2006 4:29:29 AM(UTC)
Capablanca

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 10/25/2005(UTC)
Posts: 7

I did not read the posts too thoroughly but in case it is relevant I think maybe what you are looking for is the PPO indicator or percentage price oscillator or simply price oscillator. It's basically a slightly more flexible version of the MACD although it still has limitations. Syntax: OscP(periods,periods,ma_method,diff_method).
StorkBite  
#15 Posted : Tuesday, May 9, 2006 6:15:42 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
It's a precision thing, not a method thing... :)
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.