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

Re: Why am I getting a divide-by-zero error?



PureBytes Links

Trading Reference Links

> Well, I hate to seem argumentative, but this doesn't really
> make sense to me.  Yes, it is an add-in function.  It comes
> in the sschande.ela available at the Omega download site.

I understand it doesn't make sense to you - that's why you are
asking the question.  However, you are calling a function:

>             CMO(n) > CMO(n)[1],

and get:

> the dreaded DBZ error.

However, you have not disclosed what is in the CMO function.
(I know it's on the Omega site but since you're asking for help
it would seem reasonable that you would help the helpers).

You say there are no divisions involved but you have not convinced
me of that and you have not given me enough information to even
investigate.  I don't know what n is, and I don't know what CMO is.
There may indeed be a division for reasons you don't understand.
For example, how is the [1] operator processed for a function like
CMO(n)?  Yesterday's value just doesn't conveniently hang around -
it requires computer instructions to generate, maybe even a division
for some unusual reason.

> My own best guess is that Earl Adamy is right:  The divide-
> by-zero message is just something Omega uses to tell us
> the software has puked for no good reason.

The software has puked for a very good reason and the DBZ is a way
of telling you.  (That beats taking market entries and exits at the
incorrect times and not knowing!)  If you have a painful toothache,
it may not be convenient.  It may even be downright annoying.  But it
is telling you something is wrong.  It's not your bodies way to tell
you your teeth have puked for no good reason - to paraphrase you.
I have made the type of comparision you have made many times.  It is
failing for you this time becuase something is wrong - and for a good
reason.

> But if someone has a better explanation, or a work-around--
> I'd love to hear it.

Just as shoot from the hip thought.  Since you think the problem is
related to comparing against yesterday's CMO(n), don't call CMO(n)[1].
Instead, keep yesterday's result in a variable yourself.  It may work.
But if it does you still need to understand why as you may have simply
avoided the DBZ telling you something is very wrong and continued
in ignorant bliss.

Chris Norrie