Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Possible to use built-in factor data in a custom factor?

I am writing a custom factor and would like to use things like VWAP, Returns, and AverageDollarVolume. It is possible to pass the data from these built-in factors to my custom factor somehow or would I be better off rewriting these?

I have attempted to add VWAP as input to the custom factor and get the following error:

NonWindowSafeInput: Can't compute windowed expression Custom101((USEquityPricing.high::float64, USEquityPricing.low::float64, VWAP((USEquityPricing.close::float64, USEquityPricing.volume::float64), window_length=2)), window_length=20) with windowed input VWAP((USEquityPricing.close::float64, USEquityPricing.volume::float64), window_length=2).

Any ideas what is causing this?

UPDATE: I found the answer here:
https://www.quantopian.com/posts/exponentialweightedmovingaverage-inside-customfactors

Thanks for your time.