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

Notification

Icon
Error

Options
Go to last post Go to first unread
udaybilla  
#1 Posted : Monday, July 26, 2010 8:21:59 PM(UTC)
udaybilla

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/26/2010(UTC)
Posts: 7

i am new for metastock , can any one give me the code for daily close of macd histogram for 1 hour charts.

thanks
uday
mstt  
#2 Posted : Monday, July 26, 2010 9:47:39 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 Uday

I'm not sure what you're asking for. Do you want MACD based on daily or hourly data? I get it that your charts are hourly, but "daily close of macd histogram" has me scratching my head.

Roy

udaybilla  
#3 Posted : Monday, July 26, 2010 10:06:20 PM(UTC)
udaybilla

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/26/2010(UTC)
Posts: 7

roy,
i need daily macd close on my hourly charts
thanks
uday
mstt  
#4 Posted : Monday, July 26, 2010 10:40:17 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 Uday

You've rearranged the words but the meaning is still unclear.

I've created a couple of hourly charts and plotted a daily MACD in histogram form with a 9-day signal line. One chart plots the same daily value for every hour until the end of the day and the other chart plots a daily MACD in histogram form just once each day. If neither of these are what you are looking for them you will need to explain what you want a little more clearly.

http://www.metastocktips.co.nz/snap1.jpg, http://www.metastocktips.co.nz/snap2.jpg

Sorry, I left the scale off the charts but it does have hourly bars.

Roy

udaybilla  
#5 Posted : Monday, July 26, 2010 10:48:05 PM(UTC)
udaybilla

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/26/2010(UTC)
Posts: 7

hi roy,

sorry i am not able to make you understand my intension, well coming to point i am trading hourly charts so i need macd hitogram of daily data to be plotted on my hourly chart in order to see the weather macd histogram od daily charts is bullish or bearish. and coming to your charts posted the code in the first chart will help.

thanks
uday
mstt  
#6 Posted : Monday, July 26, 2010 11:20:23 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 Uday

OK, so the charts I posted are exactly what you asked for, give or take a signal line or two. So what is it about the charts that you don't think is correct? Were you expecting a daily MACD to plot as a nice smooth line or profile? An indicator based on daily data can only change value once every 24 hours, and this is why you see a "stepped" histogram and signal line - the value only changes at the end of each day.

Roy

udaybilla  
#7 Posted : Monday, July 26, 2010 11:32:44 PM(UTC)
udaybilla

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/26/2010(UTC)
Posts: 7

hi roy,

i need the code of indicator which uses daily macd histogram values to be plotted on hourly charts, since i am not that expert in this field , i request you to give me the code which you feel the best in your opinion.

thanks
uday
mstt  
#8 Posted : Tuesday, July 27, 2010 2:00:10 AM(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 Uday

It's not quite as simple as me handing over my code because I use a proprietary DLL in a number of my Multi-Frame formulas. Here's a version that has the Forum DLL as a substitute for the MSTT DLL. The difference is that the Forum DLL cannot use partial periods in the EMAs needed to create MACD. Therefore you're stuck with an approximation using periods of 12 and 26 instead of 12.3333 and 25.6667 (which give new to old data ratios of 0.15 and 0.075 for the EMAs). If the formula below is not accurate enough then you'll need to purchase the MSTT DLL from me.

Assuming this does the trick it will initially plot MACD and Signal as lines - you'll need to convert one to a histogram by changing the the line style. To avoid having to repeat that process on every chart you should create a new default template once you've set up a chart just the way you want it. Hope this helps.

Roy

{Multi-Frame X MACD special}
{Requires Equis Forum DLL}
{Roy Larsen, 2009-2010, 27/7/10}

{User settings}
N:=Input("Multi-Frame X MACD, Signal Periods",1,19,9);
J:=Input("Hours per Frame, (1-24)",1,24,24);
J:=If((J<5)+(J=8)+(Mod(J,6)=0 AND J<>18),Int(J),2)*60;
Q:=Input("Mode, 0=Static 1=Dynamic 2=Delayed",0,2,1);
{Update on last bar, new bar or new frame}

{Timing signals}
{Day counter by metastocktools.com}
D:=DayOfMonth();F:=Rnd(Life(291231));
Z:=Cum(1);D:=ValueWhen(1,Z=1,F+D)-F;
D:=D*1440+Minute()+Hour()*60;
I:=Int(If(J=1440,D,D-1)/J);
I:=I>ValueWhen(2,1,I);
G:=LastValue(Lowest(Sum(I>0,9))>7);
I:=ExtFml("Forum.Sum",I,1);M:=G+I;
F:=ExtFml("Forum.Sum",Ref(I,1),1)*(M=0)+G;
B:=LastValue(Z);A:=B-1=Z;B:=B=Z;
F:=F+B*(Q=0)*(D/J=Int(D/J))*(Mod(D,1440)>0);
J:=If(F,1,(Alert(F,2)=0)*M*2*(Z>1));
J:=If(A+LastValue(J)>2 OR B+(Q=1)=2,1,J);
J:=If(G,1,If(Q=2,M*2,J));

{Frame CLOSE}
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2-G,1,C)));

{Calculate/plot MACD and signal}
X:=ExtFml("Forum.Mov",K,If(J,12,Pwr(10,10)),E);
Y:=ExtFml("Forum.Mov",K,If(J,26,Pwr(10,10)),E);
R:=X-Y;
Z:=ExtFml("Forum.Mov",R,If(J,N,Pwr(10,10)),E);
R; {MACD}
Z; {Signal}

udaybilla  
#9 Posted : Tuesday, July 27, 2010 2:09:18 AM(UTC)
udaybilla

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/26/2010(UTC)
Posts: 7

hi roy,

when i pasted your code given in to the indicator builder its giving the following error(This DLL does not exist in the MSX DLL folder.).anyways i am ready for your kind service , plz give me the price for your indicator.

thanks
uday
udaybilla  
#10 Posted : Tuesday, July 27, 2010 2:30:06 AM(UTC)
udaybilla

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/26/2010(UTC)
Posts: 7

hi roy,

i have solved the above problem but the thing is its not giving exact signals as shown by daily macd closing values , so i am ready to pay for your indicator, so plz give me the price and mode of payment.

thanks
uday
mstt  
#11 Posted : Tuesday, July 27, 2010 2:31:55 AM(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 Uday

Before you spend any money try installing (copying) the Forum DLL into the "External Formula DLLs" folder (below the "MetaStock folder") and restarting MetaStock. With the DLL installed the formula should be fine, as least to get a feel for. I'll email you a copy but you can also download from the files section of this forum (you would probably need to rename a copy from here as Forum.DLL is the name my formula uses). I'll send a copy in the next few minutes then I'm off to watch TV.

Roy

udaybilla  
#12 Posted : Tuesday, July 27, 2010 2:38:25 AM(UTC)
udaybilla

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/26/2010(UTC)
Posts: 7

hi roy,

i have downloaded the above file and installed it , but the thing is its not giving accurate signals as you mentioned in your replies, so do the needful

thanks
uday
mstt  
#13 Posted : Tuesday, July 27, 2010 2:45:31 AM(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 Uday

Please check your email for a message and reply to that message. Thanks.

Roy

kenny  
#14 Posted : Tuesday, August 3, 2010 1:02:46 AM(UTC)
kenny

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/2/2010(UTC)
Posts: 1

Hi Uday, Have you got the formula? Im equally interested on the formula. kenny
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.