[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Exploration: MACD Historgram Uptrend for Weekly and Daily



PureBytes Links

Trading Reference Links

------------------------------------------------------------------------
You cannot reply to this message via email because you have chosen not
to disclose your email address to the group.

To reply:  http://groups.yahoo.com/group/equismetastock/post?act=reply&messageNum=5950
------------------------------------------------------------------------

Alex

> Ouch! You sure know how to inflict pain.

Sorry

> Ok... I did try cutting and pasting the formual into
> the filter tab.....and the error msg came back "this
> function is not allowed in this type of formula"

The 'Weekly MACD' is an indicator - it's not intended to be used directly in
an exploration but can be called using Fml() and FmlVar() once the default
Input() functions values have been set.

> With the limited knowledge of metastock, I don even
> have a clue where to start to troubleshoot. What
> should I do now...if you still willing to help?

My mistake. I guess I assumed a level of fluency that is a little ahead of
where you are at with MS code. I tend to forget that not everyone has worked
with MS every day for several years. As long as you're willing to learn I'm
willing to help. I'm convinced that the 'Weekly MACD' can do most of what
you expect, but to extract the information from it there is still a little
way to go.

The first step is that you need to cut and paste the code to the Indicator
Builder, then drop it onto a chart and experiment with the different input
options. You should also try changing the style of the MACD line to
histogram (Properties - Color/Style) and see how that compares visually to
the histogram option I built into the indicator (which I admit is rather
crude).

You could also switch your chart to weekly periodicy and check my indicator
against the standard MACD. When you do that you will probably see variations
that suggest errors in my code. Make sure both indicators are using the same
scale (right click and select scaling). Differences displayed using weekly
periodicy are caused by missing Fridays, and this causes my code to miss an
entire weekly bar of data. However when used with daily periodicy the weekly
close is taken from the bar before Monday whenever a missing Friday is
detected.

Understanding the detail of the code is not as important as just getting a
feel for how it looks and what the various options do. This is nesessary
before it can be used in an exploration. When you are familiar with it I'll
give you some suggestions on what to do next.

Roy



> Alex
>
>
>
> --- Roy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
> > Alex
> >
> > > It appears that the formula is too complex for me
> > to
> > > understand.
> > >
> > > I find it really intriguing that this is such a
> > common
> > > technique for scanning for stocks to buy but yet
> > no
> > > metastock formula is freely available. I saw some
> > > sites selling the formula though. How does the
> > > Metastock community expects to grow with such
> > limited
> > > sharing of formulas? Isn't this site geared to
> > solve
> > > such a situation?
> > >
> > > Any thoughts on the statement?
> > >
> > > Alex
> >
> > Only that I'm disappointed you should give up so
> > easily, and that you reject
> > the very answer you seek.
> >
> > Did you load the code and try it out before
> > rejecting it? Did I suggest I
> > wouldn't answer any questions you might have? I have
> > a few more questions of
> > my own but I think they are best left unasked for
> > the moment.
> >
> > Roy
> >
> >
> >
> >
> > > --- Roy Larsen <rlarsen@xxxxxxxxxxxxxx> wrote:
> > > > Alex
> > > >
> > > > > Is there away to search via Explorers for both
> > > > Weekly
> > > > > and Daily uptrends in MACD Histogram?
> > > >
> > > > Yes there is. This is why I have put some time
> > and
> > > > effort into developing a
> > > > number of weekly indicators for daily charts.
> > The
> > > > following 'Weekly MACD'
> > > > could be tested in one column of an exploration
> > and
> > > > the standard MACD tested
> > > > in another. This indicator is provided with a
> > signal
> > > > line that can be used
> > > > or commented out as required.
> > > >
> > > > Because this indicator requires a PREV for each
> > EMA
> > > > (12, 26, signal line) it
> > > > will run more slowly than your current
> > exploration,
> > > > and for reasonable
> > > > accuracy with each (weekly) EMA your exploration
> > > > should use at least 250
> > > > periods.
> > > >
> > > > > Currently I am doing it via one time in Daily,
> > and
> > > > > another via Weekly, and then see if those two
> > > > results
> > > > > match for a given stock. Very tedious! It
> > would be
> > > > > great if there is a way to do it all in one
> > run.
> > > >
> > > > If you have problems setting this up for an
> > > > exploration I have some ideas
> > > > that will help but take a look first.
> > > >
> > > > Roy
> > > >
> > > >
> > > >   {Weekly MACD} {for daily charts}
> > > > Hs:=Input("0=Line, or 1=Histogram",0,1,0);
> > > >   {use histogram for chart display only}
> > > > P1:=Input("Weeks for Short EMA",1,99,12);
> > > > P2:=Input("Weeks for Long EMA",1,99,26);
> > > > P3:=Input("Weeks for Signal Line",1,99,9);
> > > > P1:=2/(P1+1); P2:=2/(P2+1); P3:=2/(P3+1);
> > > > Q:=Input("1=Update at Friday bar,  Dynamic
> > Current
> > > > Week",0,0,0);
> > > > Q:=Input("2=Update at Friday bar,  3=Update at
> > > > Monday bar",1,3,2);
> > > >  {1=dynamic current week, MS compatible}
> > > >  {2=update @ end of week except when no Friday}
> > > >  {3=update @ start of new week}
> > > > Lb:=LastValue(Cum(1)-0)=Cum(1);
> > > > W1:=DayOfWeek()=5;
> > > > W2:=DayOfWeek()<=Ref(DayOfWeek(),-1);
> > > > We:=If(W1,1,If(Alert(W1,2)=0 AND W2,2,0));
> > > > Cl:=ValueWhen(1,We>0,If(We=1,C,Ref(C,-1)));
> > > >
> > >
> >
> Ma:=If(Cum(We>0)=1,Cl,ValueWhen(1,We>0,PREV)*(1-P1)+Cl*P1);
> > > > Ma:=If(Q=1 AND We=0 AND Lb,ValueWhen(1,We>0,Ma)
> > > > *(1-P1)+C*P1,Ma);
> > > > Ma:=If(DayOfWeek()=5 AND Q=3,Ref(Ma,-1),Ma);
> > > >
> > >
> >
> Mb:=If(Cum(We>0)=1,Cl,ValueWhen(1,We>0,PREV)*(1-P2)+Cl*P2);
> > > > Mb:=If(Q=1 AND We=0 AND Lb,ValueWhen(1,We>0,Mb)
> > > > *(1-P2)+C*P2,Mb);
> > > > Mb:=If(DayOfWeek()=5 AND Q=3,Ref(Mb,-1),Mb);
> > > > Md:=(Ma-Mb);
> > > >
> > >
> >
> Sg:=If(Cum(We>0)=1,Md,ValueWhen(1,We>0,PREV)*(1-P3)+Md*P3);
> > > > Sg:=If(Q=1 AND We=0 AND Lb,ValueWhen(1,We>0,Sg)
> > > > *(1-P3)+Md*P3,Sg);
> > > > Sg:=If(DayOfWeek()=5 AND Q=3,Ref(Sg,-1),Sg);
> > > > Md:=If(Hs=0,Md,If(Md<>Ref(Md,-1),Md,0));
> > > > Md; Sg;
> > > >
> > > >
> > > >
> > >
> > >
> > > __________________________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up
> > now.
> > > http://mailplus.yahoo.com
> > >
> > > 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/
> > >
> > >
> > >
> >
> >
> >
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
>
> 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/
>
>
>
>



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/