[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

>It sure is a bug, but not Omega's.  Its of whomever
>wrote that CMO() function.  I don't have it in any of
>my TradeStations, so unless SuperCharts has functions
>that TradeStation does not, this function was written
>by someone else.


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.
And it works fine.  Plot the indicator, and I've never had
a problem.  Use it in a "system" ( I just use them to collect
statistics), and the system runs.  But do this:

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

and you get the dreaded DBZ error.

I've had this happen with other indicators as well, including
a derivative I wrote of the RSI which did not involve any
divisions.  Worked fine until I tried to compare one day's
oscillator value with the previous day's.  Another case of
inexplicable DBZ.

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.  But if someone
has a better explanation--or, please God, a work-around--
I'd love to hear it.

Thanks for trying.

Owen Davies