PureBytes Links
Trading Reference Links
|
mwtang
Here are my versions of hourly EMA and MACD (based on EMA) indicators, which
initial testing indicates should be good for 5, 10, 15, 20,and 30 minute
intraday charts. I apologise for the lack of comments. Functionally these
indicators are very similar to the commented version of Weekly MACD already
posted.
Roy
{Hourly EMA - Close}
{© 2003 Roy Larsen}
{rlarsen@xxxxxxxxxxxxxx}
{use on intraday charts}
D:=Input("Periods (Hours)",1,99,10);
Q:=Input("1=Dynamic last bar, 2=Sample only @ end of hour",1,2,1);
{1=dynamic last hour, MS compatible}
{2=sample end of hour when available}
A:=Minute()=0;
B:=Hour()<>ValueWhen(2,1,Hour()) OR
DayOfWeek()<>ValueWhen(2,1,DayOfWeek());
F:=LastValue(Cum(1))=Cum(1);
D:=2/(D+1);
J:=If(A,1,If(Alert(A,2)=0 AND B,2,0));
J:=If(F AND J=0 AND Q=1,1,J);
K:=ValueWhen(1,J,If(J=1,C,Ref(C,-1)));
M:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-D)+K*D);
M;
{Hourly MACD - Close}
{© 2003 Roy Larsen}
{rlarsen@xxxxxxxxxxxxxx}
{use on intraday charts}
D:=Input("Signal periods (Hours)",1,19,9);
Q:=Input("1=Dynamic last bar, 2=Sample only @ end of hour",1,2,1);
{1=dynamic last hour, MS compatible}
{2=sample end of hour when available}
A:=Minute()=0;
B:=Hour()<>ValueWhen(2,1,Hour()) OR
DayOfWeek()<>ValueWhen(2,1,DayOfWeek());
F:=LastValue(Cum(1))=Cum(1);
X:=0.15; Y:=0.075; D:=2/(D+1);
J:=If(A,1,If(Alert(A,2)=0 AND B,2,0));
J:=If(F AND J=0 AND Q=1,1,J);
K:=ValueWhen(1,J,If(J=1,C,ValueWhen(2,1,C)));
M:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-X)+K*X);
N:=If(Cum(J>0)=1,K,ValueWhen(1,J,PREV)*(1-Y)+K*Y);
R:=M-N;
Z:=If(Cum(J>0)=1,R,ValueWhen(1,J,PREV)*(1-D)+R*D);
R; {MACD} Z; {signal}
> Many thanks for your help, but i am no good in writting formula. I also
had ploblem to understand in the formula which you had sent to me. So is it
possible you can modify weekly macd histogram to hourly macd for me, so that
i can plot it in a 15 mins chart ? Thanks You !
> ----- Original Message -----
> From: Roy Larsen
> To: equismetastock@xxxxxxxxxxxxxxx
> Sent: Thursday, June 19, 2003 3:16 AM
> Subject: Re: [EquisMetaStock Group] Re: Macd histogram (intraday)
>
>
> mwtang, Dusant
>
> > mwtang
> >
> > Roy has done some excellent work on weekly plots on daily charts and
> > stuff like that.
> > Do an archive search and you'll find the code.
> > You can modify the code to suit your personal requirements.
> > All the best.
> > Dusant
>
> Speaking of which, here's a commented functional version of a weekly
MACD
> for daily charts. This should serve as a useful model for other time
frames.
> Have fun.
>
>
> > --- In equismetastock@xxxxxxxxxxxxxxx, mwtang <mwtang@xxxx> wrote:
> > > Hallo! I would like to have some help.
> > >
> > > It is very usefull to have a weekly indicator (like macd histogram)
> > to be incorporated in a daily chart. As I am still not good in
> > writing formula in computer language for Metastock, I have the
> > following questions to ask for help
> > > .
> > > 1. Can anyone modify the weekly macd histogram to be an hourly
> > histogram (because I am doing intraday trading research) ?
> > >
> > > 2. What are the steps to take for me to plot the hourly histogram
> > in a 15-minute chart (instead of plotting the weekly histogram in a
> > daily chart) and have it presented as ribbon at the bottom of the
chart ?
> > >
> > > 3. What should I do to have the whole set-up be included in '
> > Expert' ?
> > >
> > > Hope some one can assist me. Thanks.
> >
> >
> >
> >
> > To unsubscribe from this group, send an email to:
> > equismetastock-unsubscribe@xxxxxxxxxxxxxxx
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
> >
> >
> >
> >
>
>
>
> Yahoo! Groups Sponsor
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/BefplB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|