通达信黄金坑3号副图指标 今天最低价跌入黄金区间 源码 附图
X_1:=LLV(HIGH,240);
X_2:=100*(CLOSE-X_1)/X_1;
X_3:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;
X_4:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530))*100;
X_5:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)*100;
X_6:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;
X_7:=BARSCOUNT(CLOSE);
X_8:=X_5<20 AND X_6<23 AND X_7>35;
X_9:=X_8 AND COUNT(X_8,1)=1;
X_10:=EMA(CLOSE,21)-EMA(CLOSE,8);
X_11:=EMA(X_10,5);
X_12:=TROUGHBARS(3,6,1)<4 AND CROSS(X_10,X_11);
X_13:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0);
X_14:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3);
X_15:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);
X_16:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3);
X_17:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3);
X_18:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3);
X_19:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3);
X_20:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3);
X_21:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3);
X_22:=EMA(CLOSE,2)-EMA(CLOSE,150);
X_23:=EMA(X_22,100);
X_24:=2*(X_22-X_23);
X_25:=POW(X_24,3)*0.1+POW(X_24,1);
X_26:=SQRT(SQRT(LOW*HIGH*OPEN*CLOSE));
X_27:=EMA(X_26*0.97,3);
X_28:=(HIGH+LOW+CLOSE)/3;
X_29:=(X_28-MA(X_28,14))/(0.015*AVEDEV(X_28,14));
X_30:=CROSS(X_27,LOW);
X_31:=X_13;
X_32:=X_14+X_16+X_18+X_20;
X_33:=X_15+X_17+X_19+X_21;
X_34:=IF(X_24>0.1,X_25,0)*1;
X_35:=EMA(WINNER(CLOSE)*100,5);
X_36:=EMA(X_35,2);
X_37:=EMA(X_36,2);
X_38:=EMA(X_37,2);
X_39:=EMA(X_38,2);
X_40:=EMA(X_39,2);
X_41:=EMA(X_40,2);
X_42:=EMA(X_41,2);
X_43:=EMA(X_42,2);
X_44:=EMA(X_43,2);
X_45:=EMA(X_44,2);
X_46:=EMA(X_45,2);
X_47:=EMA(X_46,2);
X_48:=EMA(X_47,2);
X_49:=5;
X_50:=X_35;
X_51:=DRAWLINE(X_50>=HHV(X_50,X_49)=1,X_50,X_50<=LLV(X_50,X_49)=1,X_50,1);
X_52:=REF(X_50,1)=REF(X_51,1) AND X_50>REF(X_50,1);
X_53:=X_52>0;
X_54:=X_32 AND X_53;
X_55:=REF(X_31,1) AND X_54;
X_56:=BARSLAST(X_55);
X_57:=REF(OPEN,X_56);
X_58:=REF(CLOSE,X_56);
X_59:=IF(X_57=REF(X_57,1),X_57,DRAWNULL);
X_60:=IF(X_58=REF(X_58,1),X_58,DRAWNULL);
X_61:=CLOSE<OPEN AND LOW<CLOSE;
TJ1:BETWEEN(LOW,X_59,X_60) AND X_56<30;
X_62:=CLOSE>=ZTPRICE(REF(CLOSE,1),0.1);
X_63:=EXIST(X_62,X_56+2) AND BARSCOUNT(CLOSE)>20;
X_64:=TJ1 AND X_63;
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
该公式包含未来函数:WINNER
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
X_1赋值:240日内最高价最低值
X_2赋值:100*(收盘价-X_1)/X_1
X_3赋值:(收盘价-528日内最低价最低值)/(528日内最高价最高值-528日内最低价最低值)*100
X_4赋值:(收盘价-530日内收盘价最低值)/(530日内收盘价最高值-530日内收盘价最低值)*100
X_5赋值:SMA(收盘价-1日前的收盘价和0较大值,34,1)/SMA(收盘价-1日前的收盘价的绝对值,7,1)*100
X_6赋值:SMA(收盘价-1日前的收盘价和0较大值,13,1)/SMA(收盘价-1日前的收盘价的绝对值,13,1)*100
X_7赋值:收盘价的有效数据周期数
X_8赋值:X_5<20 AND X_6<23 AND X_7>35
X_9赋值:X_8 AND 统计1日满足X_8的天数=1
X_10:=收盘价的21日指数移动平均-收盘价的8日指数移动平均
X_11:=X_10的5日指数移动平均
X_12:=TROUGHBARS(3,6,1)<4 AND X_10上穿X_11
X_13:=IF(TROUGHBARS(3,16,1)=0 AND 最高价>最低价+0.04,4,0)
X_14:=ZIG(3,6)>REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)<=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)<=REF(ZIG(3,6),3)
X_15:=ZIG(3,6)=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3)
X_16:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3)
X_17:=ZIG(3,22)=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3)
X_18:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3)
X_19:=ZIG(3,51)=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3)
X_20:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3)
X_21:=ZIG(3,72)=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3)
X_22:=收盘价的2日指数移动平均-收盘价的150日指数移动平均
X_23:=X_22的100日指数移动平均
X_24:=2*(X_22-X_23)
X_25:=POW(X_24,3)*0.1+POW(X_24,1)
X_26:=SQRT(SQRT(最低价*最高价*开盘价*收盘价))
X_27:=X_26*0.97的3日指数移动平均
X_28:=(最高价+最低价+收盘价)/3
X_29:=(X_28-X_28的14日简单移动平均)/(0.015*AVEDEV(X_28,14))
X_30:=X_27上穿最低价
X_31:=X_13
X_32:=X_14+X_16+X_18+X_20
X_33:=X_15+X_17+X_19+X_21
如果X_24>0.1返回X_25否则返回0
X_35:=EMA(收盘价计算的获利盘比例*100,5)
X_36:=X_35的2日指数移动平均
X_37:=X_36的2日指数移动平均
X_38:=X_37的2日指数移动平均
X_39:=X_38的2日指数移动平均
X_40:=X_39的2日指数移动平均
X_41:=X_40的2日指数移动平均
X_42:=X_41的2日指数移动平均
X_43:=X_42的2日指数移动平均
X_44:=X_43的2日指数移动平均
X_45:=X_44的2日指数移动平均
X_46:=X_45的2日指数移动平均
X_47:=X_46的2日指数移动平均
X_48:=X_47的2日指数移动平均
X_49:=5
X_50:=X_35
X_51:=DRAWLINE(X_50>=X_49日内X_50最高值=1,X_50,X_50<=X_49日内X_50最低值=1,X_50,1)
X_52:=1日前的X_50=1日前的X_51 AND X_50>1日前的X_50
X_53:=X_52>0
X_54:=X_32 AND X_53
X_55:=1日前的X_31 AND X_54
X_56:=上次X_55距今天数
X_57:=X_56日前的开盘价
X_58:=X_56日前的收盘价
X_59:=IF(X_57=1日前的X_57,X_57,DRAWNULL)
X_60:=IF(X_58=1日前的X_58,X_58,DRAWNULL)
X_61:=收盘价<开盘价 AND 最低价<收盘价
输出TJ1:BETWEEN(最低价,X_59,X_60) AND X_56<30
X_62:=收盘价>=ZTPRICE(1日前的收盘价,0.1)
X_63:=最近X_56+2日存在X_62 AND 收盘价的有效数据周期数>20
X_64:=TJ1 AND X_63