//EXPMA:
操盘线7:EMA(CLOSE,7);
操盘线21:EMA(CLOSE,21);
J_操盘线7:=EMA(CLOSE,7);
J_操盘线7:=EMA(CLOSE,21);
//MA
工作线:MA(CLOSE, 30);
J_工作线:=MA(CLOSE, 30);
//MACD
J_DIFF=EMA(CLOSE,12) - EMA(CLOSE,26);
J_DEA= EMA(J_DIFF,9);
J_MACD=2*(J_DIFF-J_DEA);
V_macd:=J_MACD>0;
//CCI
TYP= (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
CCI_num=(TYP-MA(TYP,84))/(0.015*AVEDEV(TYP,84));
V_CCI:=CCI_num>80 AND CCI_num<200;
//条件
V_最低价下穿操盘线7:= LOW*0.94 < J_操盘线7;
V_操盘线7上穿工作线:=COUNT(CROSS(J_操盘线7,J_工作线),10)=1;
V_操盘线7在工作线之上:=J_操盘线7>J_工作线;
V_条件:= V_最低价下穿操盘线7 AND V_操盘线7上穿工作线 AND V_操盘线7在工作线之上 AND V_macd AND V_CCI;
IF (V_条件)
// DRAWTEXT(1=1,LOW,"↑");
DRAWICON(1=1,LOW*0.98,"BUY");