function EMA(fNow,fPre,N){ return Number((fNow * 2 / (N + 1) + fPre * (N - 1) / (N + 1)).toFixed(2)); } /** * 计算EMA12和EMA26 */ function EMASL(points,N){ if (points == null || points.length <= 0 || N == 0) return new Array(); let result = new Array(); for(let i=0;i