Count is usually thought of as an integer representing a number of bars, but can actually be any decimal value. An EMA is constructed by multiplying each difference between the result so far and the next value by a factor equal to 2 / (count + 1).
Double EMA is calculated as 2 * EMA(expr, count) - EMA(EMA(expr, count)).
Unlike the EMA function, DEMA applies the exponential weight factor from the start of available data rather than beginning with MA(expr, count). This is consistent with how other backtesting software calculates this indicator.