MID2:= MA(CLOSE,21);
UPPER2:= MID2 + 1.382 * STD(CLOSE,21);
LOWER2:= MID2 - 1.382 * STD(CLOSE,21);
UP2:= MID2 + 2.56 * STD(CLOSE,21);
LOOW2:= MID2 - 2.56 * STD(CLOSE,21);
MID:= MID2;
UPPER:= UPPER2;
UP:= UP2;
LOWER:= LOWER2;
LOOW:= LOOW2;
A:= CLOSE;
ROC1:= 100 * (A - REF(A,9))/REF(A,9);
ROC2:= 100 * (A - REF(A,13))/REF(A,13);
ROC3:= 100 * (A - REF(A,18))/REF(A,18);
ROC4:= 100 * (A - REF(A,24))/REF(A,14);
KST:= (MA(ROC1,9) + 2 * MA(ROC2,13) + 3 * MA(ROC3,18) + 4 * MA(ROC4,24))/10;
KSTMA4:= MA(KST,4);
KSTMA10:= MA(KST,10);
XX:= EMA(CLOSE,30) - EMA(CLOSE,17);
YY:= EMA(XX,13);
短针2:= TROUGHBARS(3,5,1)<1 AND XX<YY;
阴:= IFF(短针2>0,0.4,0);
价咯多头:= KST>REF(KST,1) AND KSTMA4>REF(KSTMA4,1) AND KSTMA10>REF(KSTMA10,1);
天地2号:= DRAWICON(REF(阴,1) AND KST>REF(KST,1) AND KSTMA4>REF(KSTMA4,1) AND CROSS(C,LOWER),L * 0.98,7);
天地3号:= DRAWICON(REF(阴,1) AND KST>REF(KST,1) AND KSTMA4>REF(KSTMA4,1) AND CROSS(C,LOOW),L * 0.99,25);
ENTERLONG: (REF(阴,1) AND 价咯多头 AND CROSS(C,MID)) OR 天地2号 OR 天地3号;