喜相逢 通达信副图/选股源码通用
X_1:=CLOSE>REF(CLOSE,1)*1.094 AND CLOSE=HIGH;
X_2:=LLVBARS(LOW,60);
X_3:=BARSLAST(CURRBARSCOUNT=CONST(X_2)+1);
X_4:=FINDHIGHBARS(HIGH,X_2+1,60,1);
X_5:=DRAWLINE(CURRBARSCOUNT=CONST(X_4)+1,HIGH,ISLASTBAR,REF(HIGH,X_4),0);
X_6:=BARSLAST(CURRBARSCOUNT=CONST(X_4)+1);
X_7:=DRAWLINE(X_3=0,(X_5-LOW)*0.618+LOW,ISLASTBAR,REF((X_5-LOW)*0.618+LOW,X_3),0);
X_8:=IF(CLOSE>OPEN OR (CLOSE=OPEN AND CLOSE>=REF(CLOSE,1)),VOL,0);
X_9:=IF(CLOSE<OPEN OR (CLOSE=OPEN AND CLOSE<REF(CLOSE,1)),VOL,0);
X_10:=SUM(X_8,X_3)/SUM(X_9,X_3);
X_11:=COUNT(CROSS(CLOSE>=X_5,0.5),X_3+1)=1 AND CROSS(CLOSE>=X_5,0.5) AND X_10>1.5;
X_12:=X_1 AND EXIST(CROSS(CLOSE,REF(HIGH,X_6)),3) AND CLOSE>REF(HIGH,X_6);
X_12 AND REF(X_12,1)=0 AND CLOSE>EMA(COST(85/1.2),10);
未来函数检测结果如下:
该公式包含未来函数:COST
该公式包含未来函数:DHIGH
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
X_1赋值:收盘价>1日前的收盘价*1.094 AND 收盘价=最高价
X_2赋值:LLVBARS(最低价,60)
X_3赋值:上次 到最后交易的周期=CONST(X_2距今天数+1)
X_4赋值:FIND最高价BARS(最高价,X_2+1,60,1)
X_5赋值:DRAWLINE( 到最后交易的周期=CONST(X_4)+1,最高价,ISLASTBAR,X_4日前的最高价,0)
X_6赋值:上次 到最后交易的周期=CONST(X_4距今天数+1)
X_7赋值:DRAWLINE(X_3=0,(X_5-最低价)*0.618+最低价,ISLASTBAR,REF((X_5-最低价)*0.618+最低价,X_3),0)
X_8赋值:IF(收盘价>开盘价 OR (收盘价=开盘价 AND 收盘价>=1日前的收盘价),成交量,0)
X_9赋值:IF(收盘价<开盘价 OR (收盘价=开盘价 AND 收盘价<1日前的收盘价),成交量,0)
X_10:=X_3的X_8日累和/X_3的X_9日累和
X_11:=统计X_3+1日满足收盘价>=X_5上穿0.5的天数=1 AND 收盘价>=X_5上穿0.5 AND X_10>1.5
X_12:=X_1 AND EXIST(CROSS(收盘价,X_6日前的最高价),3) AND 收盘价>X_6日前的最高价
X_12 AND 1日前的X_12=0 AND 收盘价>EMA(获利盘为85/1.2%的成本分布,10)