VARD:=EMA(0.667*REF(EMA(((CLOSE+HIGH+LOW)/3-LLV(LOW,34))/(HHV(HIGH,34)-LLV
(LOW,34))*100,13),1)+0.333*EMA(((CLOSE+HIGH+LOW)/3-LLV(LOW,34))/(HHV(HIGH,34)
-LLV(LOW,34))*100,13),2);
B1:=EMA(((((2)*(CLOSE)+HIGH+LOW)/(4)-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)
))*(100),8);
DRAWTEXT((CROSS(3*SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,21,
1)-2*SMA(SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,20,1),8,1),
20)),LOW*0.91,'低位转强'),COLORWHITE;
DRAWTEXT((CROSS(EMA(((CLOSE+HIGH+LOW)/3-LLV(LOW,34))/(HHV(HIGH,34)-LLV
(LOW,34))*100,13),EMA(VARD,1)) AND EMA(((CLOSE+HIGH+LOW)/3-LLV(LOW,34))/
(HHV(HIGH,34)-LLV(LOW,34))*100,13)>VARD AND EMA(((CLOSE+HIGH+LOW)/3-LLV
(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34))*100,13)<55 AND C>O),L*0.99,'开始拉升'),
COLORYELLOW;
DRAWTEXT((LLV(C,500)=LLV(C,5) AND C/REF(C,1)>(1+9.8/100)),H*1.03,'极地上涨')
,COLORRED;
{MACD叫“好”};
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
DRAWTEXT(CROSS(DIFF,DEA) AND DIFF<-0.1,L*0.88,' 低位金叉'),COLORWHITE;
DRAWTEXT(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(COUNT(CROSS(DIFF,DEA),BARSLAST(
DEA>=0))=2,21)=1,L*0.86,' 二次金叉')COLORYELLOW;
DRAWTEXT(REF(CLOSE,BARSLAST(REF(CROSS(DIFF,DEA),1))+1)>CLOSE AND DIFF>REF(
DIFF,BARSLAST(REF(CROSS(DIFF,DEA),1))+1) AND CROSS(DIFF,DEA),L*0.84,
' 底背离'),COLORFF00FF;