PureBytes Links
Trading Reference Links
|
John Davis asked:
>would somepne take a look at this indicator, and tell me why it says:
>"tried to pass a 0 or a negative value to the log function" and what
>to do about it? I would appreciate any help
It looks to me like your function ChoppyIndex2 which is called
by your indicator (and which you didn't include in your message)
contains a log function.
If you are backtesting on reverse-adjusted continuous futures
contracts, it is likely that somewhere way back in the history
the prices are negative. This is a consequence of the rollover
adjustment. You can't really use any analytical technique involve
logs or percentages of prices for this kind of continuous contract
data. It's valid only on ratio-adjusted data.
--
,|___ Alex Matulich -- alex@xxxxxxxxxxxxxx
// +__> Director of Research and Development
// \
// __) Unicorn Research Corporation -- http://unicorn.us.com
|