dema# swordfish.function.dema()# Calculate the Double Exponential Moving Average (dema) for X in a sliding window of the given length. The formula is: ema1 = ema(x,window) dema = 2 * ema1 - ema(ema1,window) Parameters: X (Constant) – A vector/matrix/table. window (Constant) – A positive integer indicating the size of the sliding window.