I have a WL indicator (RSDif) which takes a symbol name as an "internal" Bars parameter. Since the symbol name is an internal Bars parameter, it's included in the more verbose version of the hashKey, which is the description field. See code below.
CODE:
Please log in to see this code.
But there's a weird problem. When optimizing a strategy, WL caches a "pseudo copy" of this indicator by default for every symbol in the dataset--not desirable.
My question is, since the indicator cache is associated with a Bars object, which uniquely identifies and separates each symbol independently anyway, should the symbol name be
left off the hashKey--
and the description key--in this very special case by default?
If so, would there be a special case--ever--where you would want to include the symbol-name parameter in the hashKey--or description--at some point? I'm asking because sometimes I'm comparing both a sector index and industry index against the S&P500 for a given stock on the Chart (although that's done with a separate member function call). So DataSeries for these two comparison cases are created on the stock Chart.
I've been using this indicator a couple years okay, but I'm wondering if these pseudo copies of this indicator would load memory resources during optimization if I don't clear the cache, which I don't like. Even if these pseudo copies are never cached, they must be taking up some kind of resource, right?