PureBytes Links
Trading Reference Links
|
I compared your "Weekly MACD - Close" with the built-in Metastock
MACD. As you said, it's an excellent match.
I have a question on your formula. In some cases, you repeat the
definition of a variable. For example:
I:=Fml("Calendar Week counter");
I:=Abs(I-ValueWhen(2-G,1,I)); M:=G OR I>0;
Is this similar to usage in computer programming? For example,
x:=x+1. Here, the old value of "x" is being operated on to produce a
new value.
Here are my first attempts to decipher your "Weekly MACD - Close":
total confusion and disarray.
G:=LastValue(Highest(Sum(DayOfWeek()=F,5))=5);
Split into smaller pieces:
a:=Sum(DayOfWeek()=F,5);
b:=Highest(a);
c:=LastValue(b=5)
Explanation:
a:=Sum(DayOfWeek()=F,5);
--------------------------------------
The value of F is input by the user. Assume F=5, so no trading on
Saturday or Sunday.
Assume that today is Monday (=1).
Therefore:
Today: [DayOfWeek()=5] is False, or 0
Previous day, Friday (because F=5): [] is True, or 1
Thursday: [] is False, or 0
and so on.
Therefore,
a:= the sum for five periods, (0,1,0,0,0), which is 1
It seems to me that the sum will always be "1", so already I must be
losing the thread :-)
If I plot this bit as an indicator, I get a horizontal line at Y=5
going back to 1994. This implies that the daily values are all "1"
:-)
--------------------------------------
b:=Highest(a);
--------------------------------------
b is the highest ever value for "a", starting from the first day
loaded in the chart until today.
By my analysis (paralysis?), this can only ever be "1". When plotted
in Metastock, it's "5".
--------------------------------------
c:=LastValue(b=5)
--------------------------------------
If the last value of the data array "b" is equal to "5", then c:=1
(True).
Otherwise, c:=0 (False)
A few hints would be appreciated.
Regards,
Alan
--- In equismetastock@xxxxxxxxxxxxxxx, "Roy Larsen" <rlarsen@xxxx>
wrote:
> Hi Alan
>
> > I made my post at 2233 SHT (Scottish Highlands Time) and your
reply
> > was at 2350.
>
> As you can see I don't always reply that quickly, and sometimes I
forget to reply at all.
>
> > At that rate of output (five A4 pages), I estimate that
> > your book will take about four days to write. That's a lot less
than
> > the several weeks it will take me to work through your response
point
> > by point.
>
> If only writing a book were that easy :-)
>
> > I'm amazed at your offer to an obvious know-nothing to "walk me
> > through" something that I described as "fiendishly complicated".
>
> It's not a problem for me.
>
> > On the subject of probabilities, no statistician would believe
that,
> > out of the world's total population of 7,000 (according to Fred
> > Flintstone -it's probably double that by now), I find myself
casually
> > boasting to the author about a "fiendishly complicated" formula.
If
> > the newsgroup moderators had any human feelings at all, they would
> > have intercepted your post to prevent the affront to my dignity.
>
> Your opinion is probably shared by many, but you just happened to
be the one that put it in writing.
> No offence taken.
>
> What you need to watch for is when you accidentally post a private
reply to a large group. Now that
> can be embarrassing.
>
> Regards
>
> Roy
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> 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/
|