几:=2;
SHORTD:=12;
LONGD:=26;
MIDD:=9;
几天终点:=MOD(BARSSINCE(V)+1,几)=MOD(TOTALBARSCOUNT,几);
几天起点:=crOSS(0.5,几天终点);
几天:=SUMBARS(几天起点,1);
CC:=HHV(几天终点*C,几);
{-股票公式网站 }
DIFD:EMA(CC,SHORTD*几)-EMA(CC,LONGD*几);
DEAD:EMA(DIFD,MIDD*几);
macdD:(DIFD-DEAD)*2,COLORSTICK;