TR=SUM(MAX(MAX(HIGH-LOW,Abs(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14);
HD=HIGH-REF(HIGH,1);
LD=REF(LOW,1)-LOW;
DMP=SUM(IF(HD>0 AND HD>LD,HD,0),14);
DMM=SUM(IF(LD>0 AND LD>HD,LD,0),14);
DI1:DMP*100/TR;
DI2:DMM*100/TR;
A1:DI1>DI2;
dmi金叉:IF(A1,1,0),colorred;
LC=REF(CLOSE,1);
AA=ABS(HIGH-LC);
BB=ABS(LOW-LC);
CC=ABS(HIGH-REF(LOW,1));
DD=ABS(LC-REF(OPEN,1));
R=IF(AA>BB AND AA>CC,AA+BB/2+DD/4,IF(BB>CC AND BB>AA,BB+AA/2+DD/4,CC+DD/4));
X=(CLOSE-LC+(CLOSE-OPEN)/2+LC-REF(OPEN,1));
SI=16*X/R*MAX(AA,BB);
asi:SUM(SI,26);
ASIT:MA(ASI,10);
A2:ASI>ASIT;
ASI金叉:IF(A2,1,0),colorred;
dpo:CLOSE-REF(MA(CLOSE,20),10);
MADPO:MA(DPO,6);
A3:DPO>MADPO;
DPO金叉:IF(A3,1,0),colorred;
roc:(CLOSE-REF(CLOSE,12))/REF(CLOSE,12)*100;
ROCMA:MA(ROC,6);
A4:ROC>ROCMA;
ROC金叉:IF(A4,1,0),colorred;
volUME:=MA(VOL,14)/VOL;
MID:=100*(HIGH+LOW-REF(HIGH+LOW,1))/(HIGH+LOW);
TEMP:= MID*VOLUME*(HIGH-LOW);
IF (HIGH == LOW)
TEMP:=0;
emv:MA(TEMP/MA(HIGH-LOW,14),14);
MAEMV:MA(EMV,9);
A5:EMV>MAEMV;
EMV金叉:IF(A5,1,0),colorred;
A:CLOSE-REF(CLOSE,12);
MI:SMA(A,12,1);
A6:A>MI;
MI金叉:IF(A6,1,0),colorred;
DTM:=IF(OPEN<=REF(OPEN,1),0,MAX((HIGH-OPEN),(OPEN-REF(OPEN,1))));
DBM:=IF(OPEN>=REF(OPEN,1),0,MAX((OPEN-LOW),(OPEN-REF(OPEN,1))));
STM:=SUM(DTM,23);
SBM:=SUM(DBM,23);
ADTM:IF(STM>SBM,(STM-SBM)/STM,IF(STM==SBM,0,(STM-SBM)/SBM));
MAADTM:MA(ADTM,8);
A7:ADTM>MAADTM;
ADTM金叉:IF(A7,1,0),colorred;
TYP := (IF(ISNULL(HIGH),CLOSE,HIGH) + IF(ISNULL(LOW),CLOSE,LOW) + CLOSE)/3;
cci:(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
A8:CCI>0;
CCI金叉:IF(A8,1,0),colorred;
AR:SUM(HIGH-OPEN,26)/SUM(OPEN-LOW,26)*100;
A9:AR>100;
AR金叉:IF(A9,1,0),colorred;
涨买入:IF((A1 AND A2 AND A3 AND A4 AND A5 AND A6 AND A7 AND A8 AND A9) AND REF(A1 AND A2 AND A3 AND A4 AND A5 AND A6 AND A7 AND A8 AND A9,1)=0,7,0),colormagenta,LINETHICK2;
上涨:IF(A1 AND A2 AND A3 AND A4 AND A5 AND A6 AND A7 AND A8 AND A9,7,0),colorcyan,LINETHICK1;
晴天:BArslASTCOUNT(A1 AND A2 AND A3 AND A4 AND A5 AND A6 AND A7 AND A8 AND A9),LINETHICK0;
雨天:(BARSLASTCOUNT(DMI金叉+ASI金叉+DPO金叉+ROC金叉+EMV金叉+MI金叉+ADTM金叉+CCI金叉+AR金叉>0 AND DMI金叉+ASI金叉+DPO金叉+ROC金叉+EMV金叉+MI金叉+ADTM金叉+CCI金叉+AR金叉<21 ))/10,LINETHICK0;
雪天:BARSLASTCOUNT(DMI金叉+ASI金叉+DPO金叉+ROC金叉+EMV金叉+MI金叉+ADTM金叉+CCI金叉+AR金叉=0),LINETHICK0;