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

RE: a new problem with Ref()



PureBytes Links

Trading Reference Links

Ken,

I'll do some more work on it tonight.  It works but comes up with the wrong
answers and I'm not talking about rounding errors or precision.  :)

I'll scan in the correct answers and write down MS answer next to it.
Actually, I'll scan in the MXX and then scan in the calculated results and
put the MS results into Excel so you can see the difference.  I won't do
this until I've gone through it one more time.  I might be doing something
wrong and by detailing the answers in an Excel spreadsheet might help me
identify what's happening.  In calculating MXX and XONE through XEIGHT, MS
came up with the right answer to 4 decimal places except in a couple of
instances where we probably had a rounding difference.  Stuff like this
doesn't bother me.

Since the first eight worked, my thought is that I've done something stupid
and that it's my fault.

Thanks,

Guy

" When I die, I want to go peacefully like my grandfather did, in his sleep.
Not yelling and screaming like the passengers in his car."

-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx [mailto:owner-metastock@xxxxxxxxxxxxx]On
Behalf Of PD Manager
Sent: Wednesday, September 13, 2000 1:19 PM
To: 'metastock@xxxxxxxxxxxxx'
Subject: RE: a new problem with Ref()

Guy:

I am VERY surprised that you are having any problem with this.  At this
point, I can think of NO explanation why everything up to the eighth would
work and everything after that would not.

When you mention that it stops working, what exactly is happening?  Program
lockup, crash, or just plain invalid results?

Ken Hunt
Programming Manager
Equis International


-----Original Message-----
From: Guy Tann [mailto:grt@xxxxxxxxxxxx]
Sent: Wednesday, September 13, 2000 12:38 PM
To: metastock@xxxxxxxxxxxxx
Subject: RE: a new problem with Ref()


Ken,

This is nothing special.  I have a variable called MXX.

I go through a little exercise developing 18 numbers which I use in putting
together a short, medium and long range indicator.

The entire process is as follows:

I start with MXX
XONE:= MXX - Ref( MXX,-1);
XTWO:= (MXX - Ref( MXX, -2)) / 2;
XTHREE:= (MXX - Ref( MXX , -3 ) ) / 3;
Etc.

When I get to XNINE:= ( MXX - Ref( MXX , -9 ) ) / 9; and XTEN:= ( MXX -
Ref( MXX , -10 ) ) / 10; it quits working.  Now, maybe I made a mistake
coding but I don't think so.  I copied the XEIGHT code into the XNINE
indicator and made the changes there and it still didn't work.  It just
seemed strange that it would work for the first 8 and not for the next
group.

I'm going to double check my code today and check X18 on back as well as I
have all of the correct answers printed out.

Regards,

Guy

" When I die, I want to go peacefully like my grandfather did, in his sleep.
Not yelling and screaming like the passengers in his car."

-----Original Message-----
From: owner-metastock@xxxxxxxxxxxxx [mailto:owner-metastock@xxxxxxxxxxxxx]On
Behalf Of PD Manager
Sent: Wednesday, September 13, 2000 7:26 AM
To: 'metastock@xxxxxxxxxxxxx'
Subject: RE: a new problem with Ref()

Define iterations...

There are some limits in the formula language, but until I understand your
definition of iterations, I cannot confirm or deny such a limitation exists.

As for the Ref() function itself, I am not aware of any problems or
limitations regarding the magnitude of the number that can be used in the
second argument.

Ken Hunt
Programming Manager
Equis International


-----Original Message-----
From: Lionel Issen [mailto:lissen@xxxxxxxxx]
Sent: Tuesday, September 12, 2000 5:26 PM
To: metastock@xxxxxxxxxxxxx
Subject: Re: a new problem with Ref()


Guy:
If I understand what you are trying to do, here's a suggestion.
There is a limit on the number of iterations that Metastock can handle in a
single formula.
One way around this might be to break up your iterations into blocks of not
more than 8 iterations, then combine these into one formula.

The Metastock formula language is distinctly limited.

It may be easier to do this in Excel or VB or TAS.

Lionel Issen
lissen@xxxxxxxxx
----- Original Message -----
From: Guy Tann <grt@xxxxxxxxxxxx>
To: Metastock User Group <metastock-list@xxxxxxxxxxxxx>
Sent: Tuesday, September 12, 2000 5:30 PM
Subject: a new problem with Ref()


> List,
>
> Well I've programmed my way around the last problem, but I just hit
another
> snag.
>
> Is there a limit in using the Ref() function?
>
> I have a variable called MXX.  I am manipulating it in a simplistic manner
> and the first 8 worked great.  When I get to the ninth iteration, it quits
> working.
>
> XEIGHT:=  ( MXX - Ref( MXX , -8 ) ) / 8;   This one works correctly
> XNINE:= ( MXX - Ref( MXX , -9 ) ) / 9;       This one doesn't work!
>
> Actually, numbers one through eight work fine.  Nine and ten don't work
and
> I haven't finished checking eleven through twenty yet.  I assume there's
> something in the manual I missed, so any help would be appreciated.
>
> Thanks,
>
> Guy
>
> " When I die, I want to go peacefully like my grandfather did, in his
sleep.
> Not yelling and screaming like the passengers in his car."
>
>