Unable to cast object of type error with compressed intraday data on in MSB mode
Author: jeffwcpa
Creation Date: 11/7/2019 3:22 PM
profile picture

jeffwcpa

#1
I keep getting a Error processing symbol WPP Unable to cast object of type 'WealthLab.DataSeries' to type 'WealthLab.Indicators.StochD' when running against intraday and compressed daily data.. I found on the Wiki that this error can occur if data is missing for one of the symbols. I downloaded the daily and intraday date and use a date range prior to today's date but still get this error. I only get this error when executed against a dataset but not individual symbols.

Any ideas as to the problem?

CODE:
Please log in to see this code.
profile picture

Eugene

#2
You're not doing anything wrong. Not many ideas except that it's been a known issue without resolution. See Wiki Open Issues:

QUOTE:
When running a Strategy in MSB mode when an indicator is used in multiple scales simultaneously (via SetScale...) and it accepts Bars as a parameter, you get an error message and chart rendering stops incorrectly:
** Error processing symbol XXX Unable to cast object of type 'WealthLab.DataSeries' to type 'WealthLab.Indicators.IndicatorName'


There's no workaround to the issue currently.

P.S. Should you decide to optimize the Stochastic indicator , there's another pitfall to avoid as suggested by the same helpful Open Issues list:

(55091) Calculating StochD gets slower in geometric progression depending on smoothing

You're not optimizing it currently so I leave it as is.
profile picture

jeffwcpa

#3
Thanks Eugene. I didn't catch that Open Issues post. I appreciate your response.
profile picture

Eugene

#4
You're welcome Jeff. It's the least I can do.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).