通达信霸气策略指标公式

X_1:=15;
X_2:=CLOSE/REF(CLOSE,1)>1.095 AND CLOSE=HIGH OR (CLOSE/OPEN>=1.093 AND CLOSE=HIGH);
X_3:=CLOSE/REF(CLOSE,1)>=1.035 AND CLOSE=HIGH OR (CLOSE/OPEN>=1.035 AND CLOSE=HIGH);
X_4:=IF(NAMELIKE(16),1,0);
X_5:=IF(NAMELIKE(17),1,0);
X_6:=IF(NAMELIKE(18),1,0);
X_7:=X_4 OR X_5 OR X_6;
X_8:=BARSLAST(NOT(IF(CLOSE>HHV(REF(HIGH,1),2),1,IF(CLOSE<LLV(REF(LOW,1),2),(-1),0))=0));
X_9:=IF(IF(CLOSE>HHV(REF(HIGH,1),2),1,IF(CLOSE<LLV(REF(LOW,1),2),(-1),0))=0,REF(IF(CLOSE>HHV(REF(HIGH,1),2),1,IF(CLOSE<LLV(REF(LOW,1),2),(-1),0)),X_8),IF(CLOSE>HHV(REF(HIGH,1),2),1,IF(CLOSE<LLV(REF(LOW,1),2),(-1),0)));
X_10:=IF(X_7,BARSLAST(X_3),IF(X_7=0,BARSLAST(X_2),DRAWNULL));
X_11:=REF(CROSS(0,X_9),1) AND CLOSE>=REF(HHV(MAX(CLOSE,OPEN),2),1) AND REF(X_10,1)<=X_1;
红进:REF(CROSS(0,X_9),1) AND CROSS(X_9,0) AND REF(X_10,1)<=X_1,NODRAW,COLORRED;
绿出:=CROSS(0,X_9) AND COUNT(CROSS(0,X_9),BARSLAST(红进))=1,NODRAW,COLORGREEN;
X_12:=COUNT(绿出,BARSLAST(红进))=0;
收益点:IF(COUNT(绿出,BARSLAST(红进))=0>0,CLOSE/REF(CLOSE,BARSLAST(红进))*100-100,DRAWNULL),NODRAW,COLORWHITE;
STICKLINE(红进>0,0,0.5,2,0),COLORYELLOW;
STICKLINE(绿出>0,0,0.5,2,0),COLORGREEN;
DRAWICON(X_11,1,7);
DRAWICON(红进,1,1);
STICKLINE(X_12>0,0,收益点,2,0),COLOR000055;
STICKLINE(X_12>0,0,收益点,1.5,0),COLOR000077;
STICKLINE(X_12>0,0,收益点,1,0),COLOR000099;
STICKLINE(X_12>0,0,收益点,0.7,0),COLOR0000BB;
STICKLINE(X_12>0,0,收益点,0.4,0),COLOR0000DD;
STICKLINE(X_12>0,0,收益点,0.2,0),COLORRED;
STICKLINE(X_12>0,0,收益点,0.05,0),COLORWHITE;
NOTEXT:0,COLORRED;

(0)

相关推荐