cci:=EMA(((IF((H>C AND C>O) OR (H>O AND O>=C),C,H)+IF((L< C AND C< O) OR(L< O AND O<=C),C,LOW)/3)-MA((IF((H>C AND C>O) OR (H>O AND O>=C),C,H)+IF((L< C AND C< O) OR(L< O AND O<=C),C,LOW)/3),84.0270012))/(0.015*AVEDEV((IF((H>C AND C>O) OR (H>O AND O>=C),C,H)+IF((L< C AND C< O) OR(L< O AND O<=C),C,LOW)/3),84.0270012)),2.0332),COLORWHITE;
龙头启动:=CCI>HHV(MA(CCI,5),21) AND crOSS(C,1.13*(EMA((expma(C*vol,3)/EXPMA(VOL,3)+EXPMA(C*VOL,6)/EXPMA(VOL,6)+EXPMA(C*VOL,12)/EXPMA(VOL,12)+EXPMA(C*VOL,24)/EXPMA(VOL,24))/4,13))) AND REF(C,1)*1.1-C< 0.01 AND H=C;
趋势王:=龙头启动;
XG:CROSS(趋势王>0,0.4);