How to run a CCI analysis on a custom series

Hi all,

I created a custom series with advance & decline volume of a custom universe. Next I would like to run a CCI (commodity channel index) on this custom series.

To achieve this I tried to create a new series and call the CCI function in there. This option does not work, because CCI is not a function that can be used in a custom series screener (error message says “Aborted! ERROR: In Rule 1: Error near ‘CCI’: Invalid command ‘CCI’”).

Does anybody know how I can solve this?

Best regards,
Florian

P123: Can we please access custom series as time series objects like the price and indices?

Hi Marco and team,

all we would need here is a way to enter a formula at the bottom of the charts tab instead of the SMA/EMA dropdown menu (see image below). In that field we could then enter a formula that works with all functions (CCI, MACD etc).

Or as alternative, additional functions could be added to the current SMA and EMA in the dropdown menu.

Cheers,
Florian


First, you can already access custom series in any rule that uses a “series” parameter. They’re usually optional parameters. Just use GetSeries in there:

Close(0,GetSeries(“Your custom series here”)

That will give you the most recent value of a custom series with the name “Your custom series here”.

As for the CCI, I was trying to think about how to do that on P123. We’re just so close. :slight_smile: The standard deviation of the absolute price changes is the sticking point. We have the standard deviation of the percentage moves, but not the absolute price changes.

I’ll add this to our internal idea tracker.

Hi Paul,

THe end result of what I am trying to do is a custom series that does a CCI of another custom series. For this I thought that I need two steps:

  1. Create a custom series using the series reference option (this one is called 7sisLiqADvol).
  2. Call the custom series in a new custom series using the stocks reference option. My command in there is …
    CCI(50,100,getseries(“7sisLiqADvol”))

Even though, this creates an error message saying "Aborted! ERROR: In Rule 1: Error near ‘CCI’: Invalid command ‘CCI’ ".
I think this is because the custom series only allows a certain set of functions where CCI is not included.

Any workaround for that?

You can’t nest a custom series in another custom series right now, so you’re doomed to failure with that route.

So a) your CCI rule as given is a rule that can be used in a screen or portfolio; and

b) stock rules can’t be called directly in a custom series. That’s why you’re getting that error message.

The ultimate idea of the custom series tool as it is presently is that it’s for breadth indicators. I don’t read anything about what you’re trying to do that wouldn’t be a transformation that can be done in a screen. That is, I don’t know why you’d want to put the CCI in a custom series.