Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Help implementing DEMA (double-exponentially weighted moving average)

I'm new to using the Pipeline and I would like to implement DEMA a DEMA factor, which is:

DEMA = ( 2 * EMA(n)) - (EMA(EMA(n)) ), where n= period

but I'm not sure how to pull it off correctly using a CustomFactor.