求将通达信技术指标公式改为条件预警公式。
QA:=BARSLAST(AA);
总额:SUM(AMOUNT/10000,QA+1),NODRAW;
QC:=IF(ABS(AMOUNT/10000>=100) AND C>=REF(C,1),AMOUNT/10000,0);
QG:=IF(ABS(AMOUNT/10000>=100) AND C<REF(C,1),AMOUNT/10000,0);
QD:=IF(ABS(AMOUNT/10000<50) AND C>=REF(C,1),AMOUNT/10000,0);
QH:=IF(ABS(AMOUNT/10000<50) AND C<REF(C,1),AMOUNT/10000,0);
ZD:=IF(ABS(AMOUNT/10000<100 AND AMOUNT/10000>50) AND C>=REF(C,1),AMOUNT/10000,0);
ZH:=IF(ABS(AMOUNT/10000<100 AND AMOUNT/10000>50) AND C<REF(C,1),AMOUNT/10000,0);
大单:SUM(QC-QG,QA+1),COLORRED;
中单:SUM(ZD-ZH,QA+1),COLORYELLOW;
小单:SUM(QD-QH,QA+1),COLORGREEN;
大小单比:(大单/小单-1)*100,COLORWHITE,NODRAW;
DRAWTEXT(ISLASTBAR,大单,'大单'),COLORRED;
DRAWTEXT(ISLASTBAR,中单,'中单'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,小单,'小单'),COLORGREEN;
问题补充:要求大单上穿中小单,分时预警 展开
AA:=DAY!=REF(DAY,1);
QA:=BARSLAST(AA);
总额:=SUM(AMOUNT/10000,QA+1);
QC:=IF(ABS(AMOUNT/10000>=100) AND C>=REF(C,1),AMOUNT/10000,0);
QG:=IF(ABS(AMOUNT/10000>=100) AND C<REF(C,1),AMOUNT/10000,0);
QD:=IF(ABS(AMOUNT/10000<50) AND C>=REF(C,1),AMOUNT/10000,0);
QH:=IF(ABS(AMOUNT/10000<50) AND C<REF(C,1),AMOUNT/10000,0);
ZD:=IF(ABS(AMOUNT/10000<100 AND AMOUNT/10000>50) AND C>=REF(C,1),AMOUNT/10000,0);
ZH:=IF(ABS(AMOUNT/10000<100 AND AMOUNT/10000>50) AND C<REF(C,1),AMOUNT/10000,0);
大单:=SUM(QC-QG,QA+1),COLORRED;
中单:=SUM(ZD-ZH,QA+1),COLORYELLOW;
小单:=SUM(QD-QH,QA+1),COLORGREEN;
大小单比:=(大单/小单-1)*100,COLORWHITE;
XG:CROSS(大单,中单);
放到这里面才能在预警菜单中找到