SHORT:=12;LONG:=26;MID:=9;
A:=SUM(C*IF(MOD(DATETODAY(DATE),7)=0,1,0),3)*IF(PERIOD=5,1,0);
DF:=SUM(C*IF(MOD(MINUTE,5)=0,1,0),5)*IF(PERIOD=0,1,0)
+SUM(C*IF(MOD(MINUTE+55,30)=0,1,0),6)*IF(PERIOD=1,1,0)
+SUM(C*IF(HOUR-15=0,1,0),8)*IF(PERIOD=3,1,0)
+A+IF(A=0,REF(A,1),0)
+IF(REF(A,1)+A=0,REF(A,2),0)
+IF(REF(A,2)+REF(A,1)+A=0,REF(A,3),0)
+IF(REF(A,3)+REF(A,2)+REF(A,1)+A=0,REF(A,4),0)
+IF(REF(A,4)+REF(A,3)+REF(A,2)+REF(A,1)+A=0,REF(A,5),0)
+IF(REF(A,5)+REF(A,4)+REF(A,3)+REF(A,2)+REF(A,1)+A=0,REF(A,6),0);
XX:=1+4*IF(PERIOD=0,1,0)
+5*IF(PERIOD=1,1,0)
+7*IF(PERIOD=3,1,0)
+4*IF(PERIOD=5,1,0);
{ _最新股票指标公式}
pdiF:EMA(DF,SHORT*XX)-EMA(DF,LONG*XX);
PDEA:EMA(PDIF,MID*XX);
Pmacd:(PDIF-PDEA)*2,COLORSTICK;
crOSS(PDIF,PDEA);