通达信孪生素数金版副图指标公式源码

以下是通达信孪生素数金版副图指标公式源码

{公式名称: 孪生素数金版
公式描述:
无参数
公式类型: 技术指标公式-其他类型
画线方法: 副图
公式版本: 0
显示小数: 缺省位数
坐标线位置: 自动
额外Y轴分界: 无

参数精灵:无
用法注释:无
公式源码:}
X_1:=HIGH;
X_2:=LOW;
X_3:=CLOSE;
X_4:=OPEN;
X_5:=1;
X_6:=2;
X_7:=3;
X_8:=4;
X_9:=IF(NAMELIKE(1) OR NAMELIKE(2),0,1);
X_10:=SQRT(X_8*X_1+X_7*X_2+X_6*X_3+X_5*X_4);
X_11:=(X_1+X_2+X_3)/3;
X_12:=(X_11-MA(X_11,14))/(0.015*AVEDEV(X_11,14));
X_13:=POW(X_8,2)+X_6*X_7+X_8*X_6+X_7*X_8*X_6;
X_14:=X_3-REF(X_3,12);
X_15:=MA(X_14,6);
X_16:=(X_7*X_3+X_2+X_4+X_1)/6;
X_17:=(20*X_16+19*REF(X_16,1)+18*REF(X_16,2)+17*REF(X_16,3)+16*REF(X_16,4)+15*REF(X_16,5)+14*REF(X_16,6)+13*REF(X_16,7)+12*REF(X_16,8)+11*REF(X_16,9)+10*REF(X_16,10)+9*REF(X_16,11)+8*REF(X_16,12)+7*REF(X_16,13)+6*REF(X_16,14)+5*REF(X_16,15)+4*REF(X_16,16)+3*REF(X_16,17)+2*REF(X_16,18)+REF(X_16,20))/210;
X_18:=MA(X_17,10);
X_19:=X_8*X_1+X_7*X_2+X_6*X_3+X_5*X_4;
X_20:=POW(X_8,2)+X_7*X_6+X_5*X_6*X_7*X_8-POW(X_6+X_7,2)+(X_5+X_6+X_7+X_8)-(X_6-X_5)-X_6*(X_6*X_7+X_8);
X_21:=X_8*X_4;
X_22:=X_7*X_3;
X_23:=X_6*X_2;
X_24:=X_5*X_1;
X_25:=MA(X_3,10)-MA(X_3,50);
X_26:=MA(X_25,10);
X_27:=CROSS(X_3,X_12) AND X_12>(X_8-X_7)*X_7*X_8 AND REF(X_3,3)>REF(X_3,4) AND REF(X_3,3)>REF(X_4,3) AND REF(X_1,4)=HHV(X_1,5) AND REF(X_22+X_21-X_6*X_3-(X_6+X_7-X_5)*X_4,X_5)<REF(X_22+X_21-X_6*X_3-(X_6+X_7-X_5)*X_4,X_7-X_6);
X_28:=X_19-(X_7-X_6)*X_4-(X_8-X_7)*X_3-(X_5+X_6)*X_2-(X_6+X_7-X_5)*X_1;
X_29:=EMA(EMA(EMA(X_3,12),12),12);
X_30:=(X_29-REF(X_29,1))/REF(X_29,1)*100;
X_31:=MA(X_30,9);
X_32:=(X_13-POW(X_6,2))/X_20;
X_33:=X_21+X_22+X_23+X_24-(X_8-X_7)*X_1-(X_7-X_5)*X_2-(X_5+X_6)*X_3-(X_6*X_7-X_7)*X_4;
X_34:=MA(X_3,5);
X_35:=MA(MA(X_3,20),5);
X_36:=(X_34-REF(X_34,1))/REF(X_34,1)*100;
X_37:=(X_35-REF(X_35,1))/REF(X_35,1)*100;
X_38:=X_24+X_21+X_23+X_22-SQRT(X_8)*X_2-(X_6*X_7-X_8+X_5)*X_3-(X_6*X_7-X_8/2)*X_4;
X_39:=X_5*X_6*X_7*X_8+POW(X_6*X_7,X_6)+X_7*X_8+X_6*X_7*X_8+X_8;
X_40:=ABS((2*X_3+X_1+X_2)/4-MA(X_3,30))/MA(X_3,30);
X_41:=DMA(X_3,X_40);
X_42:=(1+9/100)*X_41;
X_43:=(1-9/100)*X_41;
X_44:=CROSS(X_1,X_18) AND REF(X_3,X_8-X_7)<REF(X_1,X_7-X_6) AND BARSCOUNT(X_24)>X_6*X_7*X_8+POW(X_5+X_6+X_7+X_8,X_6) AND REF(X_3,X_6-X_5)<REF(X_3,X_8-X_6) AND REF(X_2,X_5+X_6)=REF(LLV(X_2,X_5+X_6+X_7+X_8),X_8-X_5) AND NOT(REF(X_4,X_8+X_5)=REF(X_5,X_7+X_6)) AND REF(X_19-(X_7-X_6)*X_4-(X_8-X_6)*X_3-(X_8-X_5)*X_2-(X_5+X_6)*X_1,X_32)<0.98*REF(X_38+X_22-(X_5+X_6)*X_3,X_8*X_7/X_6-X_5);
X_45:=(X_3-LLV(X_2,60))/(HHV(X_1,60)-LLV(X_2,60))*80;
X_46:=SMA(X_45,7,1);
X_47:=SMA(X_46,5,1);
X_48:=IF(CROSS(X_46,X_47) AND X_46<40,50,0);
X_49:=X_19-X_6*X_2-(X_7-X_6)*X_4-POW(X_6,X_6)*X_1-(X_8-X_6)*X_3;
X_50:=MA(X_28,X_32);
X_51:=MA(X_28,X_20);
X_52:=X_13*X_6-X_6*X_8;
X_53:=(POW(X_8,X_6)+X_5*X_6*X_7*X_8)/X_6;
X_54:=X_7/X_52*X_20;
X_55:=MA(X_28,X_53);
X_56:=X_6/X_52*X_20;
X_57:=REF(X_28,X_8-X_7)<(X_39-X_7)/POW(POW(X_7,X_6)+X_5,X_6)*REF(X_28,X_8-X_6) AND REF(X_22/X_7,X_7-X_6)<REF(X_33,X_6-X_5);
X_58:=X_51>X_55;
X_59:=(X_28-X_49)/(X_38-X_49)<X_54;
X_60:=X_28>X_33 AND X_28>REF(X_28,X_5) AND (X_33-X_49)/(X_38-X_49)<X_54;
X_61:=X_28>X_33 AND X_28>REF(X_28,X_5) AND (X_38-X_28)/(X_38-X_49)<X_54;
X_62:=REF(X_59,X_8-X_7) AND X_60 AND X_61;
X_63:=X_55>REF(X_55,X_7-X_6);
X_64:=REF(CROSS(X_50,X_28),X_8-X_7) AND CROSS(X_28,X_50);
X_65:=REF(CROSS(X_51,X_28),X_7-X_6) AND CROSS(X_28,X_51);
X_66:=REF(CROSS(X_55,X_28),X_6-X_5) AND CROSS(X_28,X_55);
XGXG:X_9 AND (X_44 OR X_27 OR (X_57 AND X_62 AND (X_64 OR X_65 OR X_66) AND X_63 AND X_58)),COLORYELLOW;
{公式名称: 孪生素数金版
公式描述:
无参数
公式类型: 条件选股公式-其他类型
公式版本: 0

参数精灵:无
用法注释:无
公式源码:}
X_1:=HIGH;
X_2:=LOW;
X_3:=CLOSE;
X_4:=OPEN;
X_5:=1;
X_6:=2;
X_7:=3;
X_8:=4;
X_9:=IF(NAMELIKE(1) OR NAMELIKE(2),0,1);
X_10:=SQRT(X_8*X_1+X_7*X_2+X_6*X_3+X_5*X_4);
X_11:=(X_1+X_2+X_3)/3;
X_12:=(X_11-MA(X_11,14))/(0.015*AVEDEV(X_11,14));
X_13:=POW(X_8,2)+X_6*X_7+X_8*X_6+X_7*X_8*X_6;
X_14:=X_3-REF(X_3,12);
X_15:=MA(X_14,6);
X_16:=(X_7*X_3+X_2+X_4+X_1)/6;
X_17:=(20*X_16+19*REF(X_16,1)+18*REF(X_16,2)+17*REF(X_16,3)+16*REF(X_16,4)+15*REF(X_16,5)+14*REF(X_16,6)+13*REF(X_16,7)+12*REF(X_16,8)+11*REF(X_16,9)+10*REF(X_16,10)+9*REF(X_16,11)+8*REF(X_16,12)+7*REF(X_16,13)+6*REF(X_16,14)+5*REF(X_16,15)+4*REF(X_16,16)+3*REF(X_16,17)+2*REF(X_16,18)+REF(X_16,20))/210;
X_18:=MA(X_17,10);
X_19:=X_8*X_1+X_7*X_2+X_6*X_3+X_5*X_4;
X_20:=POW(X_8,2)+X_7*X_6+X_5*X_6*X_7*X_8-POW(X_6+X_7,2)+(X_5+X_6+X_7+X_8)-(X_6-X_5)-X_6*(X_6*X_7+X_8);
X_21:=X_8*X_4;
X_22:=X_7*X_3;
X_23:=X_6*X_2;
X_24:=X_5*X_1;
X_25:=MA(X_3,10)-MA(X_3,50);
X_26:=MA(X_25,10);
X_27:=CROSS(X_3,X_12) AND X_12>(X_8-X_7)*X_7*X_8 AND REF(X_3,3)>REF(X_3,4) AND REF(X_3,3)>REF(X_4,3) AND REF(X_1,4)=HHV(X_1,5) AND REF(X_22+X_21-X_6*X_3-(X_6+X_7-X_5)*X_4,X_5)<REF(X_22+X_21-X_6*X_3-(X_6+X_7-X_5)*X_4,X_7-X_6);
X_28:=X_19-(X_7-X_6)*X_4-(X_8-X_7)*X_3-(X_5+X_6)*X_2-(X_6+X_7-X_5)*X_1;
X_29:=EMA(EMA(EMA(X_3,12),12),12);
X_30:=(X_29-REF(X_29,1))/REF(X_29,1)*100;
X_31:=MA(X_30,9);
X_32:=(X_13-POW(X_6,2))/X_20;
X_33:=X_21+X_22+X_23+X_24-(X_8-X_7)*X_1-(X_7-X_5)*X_2-(X_5+X_6)*X_3-(X_6*X_7-X_7)*X_4;
X_34:=MA(X_3,5);
X_35:=MA(MA(X_3,20),5);
X_36:=(X_34-REF(X_34,1))/REF(X_34,1)*100;
X_37:=(X_35-REF(X_35,1))/REF(X_35,1)*100;
X_38:=X_24+X_21+X_23+X_22-SQRT(X_8)*X_2-(X_6*X_7-X_8+X_5)*X_3-(X_6*X_7-X_8/2)*X_4;
X_39:=X_5*X_6*X_7*X_8+POW(X_6*X_7,X_6)+X_7*X_8+X_6*X_7*X_8+X_8;
X_40:=ABS((2*X_3+X_1+X_2)/4-MA(X_3,30))/MA(X_3,30);
X_41:=DMA(X_3,X_40);
X_42:=(1+9/100)*X_41;
X_43:=(1-9/100)*X_41;
X_44:=CROSS(X_1,X_18) AND REF(X_3,X_8-X_7)<REF(X_1,X_7-X_6) AND BARSCOUNT(X_24)>X_6*X_7*X_8+POW(X_5+X_6+X_7+X_8,X_6) AND REF(X_3,X_6-X_5)<REF(X_3,X_8-X_6) AND REF(X_2,X_5+X_6)=REF(LLV(X_2,X_5+X_6+X_7+X_8),X_8-X_5) AND NOT(REF(X_4,X_8+X_5)=REF(X_5,X_7+X_6)) AND REF(X_19-(X_7-X_6)*X_4-(X_8-X_6)*X_3-(X_8-X_5)*X_2-(X_5+X_6)*X_1,X_32)<0.98*REF(X_38+X_22-(X_5+X_6)*X_3,X_8*X_7/X_6-X_5);
X_45:=(X_3-LLV(X_2,60))/(HHV(X_1,60)-LLV(X_2,60))*80;
X_46:=SMA(X_45,7,1);
X_47:=SMA(X_46,5,1);
X_48:=IF(CROSS(X_46,X_47) AND X_46<40,50,0);
X_49:=X_19-X_6*X_2-(X_7-X_6)*X_4-POW(X_6,X_6)*X_1-(X_8-X_6)*X_3;
X_50:=MA(X_28,X_32);
X_51:=MA(X_28,X_20);
X_52:=X_13*X_6-X_6*X_8;
X_53:=(POW(X_8,X_6)+X_5*X_6*X_7*X_8)/X_6;
X_54:=X_7/X_52*X_20;
X_55:=MA(X_28,X_53);
X_56:=X_6/X_52*X_20;
X_57:=REF(X_28,X_8-X_7)<(X_39-X_7)/POW(POW(X_7,X_6)+X_5,X_6)*REF(X_28,X_8-X_6) AND REF(X_22/X_7,X_7-X_6)<REF(X_33,X_6-X_5);
X_58:=X_51>X_55;
X_59:=(X_28-X_49)/(X_38-X_49)<X_54;
X_60:=X_28>X_33 AND X_28>REF(X_28,X_5) AND (X_33-X_49)/(X_38-X_49)<X_54;
X_61:=X_28>X_33 AND X_28>REF(X_28,X_5) AND (X_38-X_28)/(X_38-X_49)<X_54;
X_62:=REF(X_59,X_8-X_7) AND X_60 AND X_61;
X_63:=X_55>REF(X_55,X_7-X_6);
X_64:=REF(CROSS(X_50,X_28),X_8-X_7) AND CROSS(X_28,X_50);
X_65:=REF(CROSS(X_51,X_28),X_7-X_6) AND CROSS(X_28,X_51);
X_66:=REF(CROSS(X_55,X_28),X_6-X_5) AND CROSS(X_28,X_55);
XGXG:X_9 AND (X_44 OR X_27 OR (X_57 AND X_62 AND (X_64 OR X_65 OR X_66) AND X_63 AND X_58)),COLORYELLOW;