通达信庄装钱——牛股涨停副图 源码有未来 附图
X_1:=3;
X_2:=REF(HIGH,X_1)=HHV(HIGH,2*X_1+1);
X_3:=FILTER(X_2,X_1);
X_4:=BACKSET(X_3,X_1+1);
X_5:=FILTER(X_4,X_1);
X_6:=REF(LOW,X_1)=LLV(LOW,2*X_1+1);
X_7:=FILTER(X_6,X_1);
X_8:=BACKSET(X_7,X_1+1);
X_9:=FILTER(X_8,X_1);
X_10:=(REF(LLV(LOW,2*X_1),1)+REF(HHV(HIGH,2*X_1),1))/2;
X_11:=(HIGH+LOW)/2;
X_12:=X_5 AND NOT(X_9 AND X_10>=X_11) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X_13:=X_9 AND NOT(X_5 AND X_10< X_11);
X_14:=X_5 AND NOT(X_9 AND X_10>=X_11);
X_15:=REF(BARSLAST(X_12),1)+1;
X_16:=BACKSET(X_12 AND COUNT(X_13,X_15)>0,LLVBARS(IF(X_13,LOW,10000),X_15));
X_17:=X_16>REF(X_16,1);
X_18:=BACKSET(X_17,2);
X_19:=X_18>REF(X_18,1);
X_20:=X_19 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X_21:=REF(BARSLAST(X_20),1)+1;
X_22:=BACKSET(X_20 AND COUNT(X_14,X_21)>0,HHVBARS(IF(X_14,HIGH,0),X_21));
X_23:=X_22>REF(X_22,1);
X_24:=BACKSET(X_23,2);
X_25:=X_24>REF(X_24,1);
X_26:=BACKSET(ISLASTBAR,MIN(BARSLAST(X_25),BARSLAST(X_19))+1);
X_27:=X_26>REF(X_26,1);
X_28:=HIGH< REF(HIGH,REF(BARSLAST(X_25),1)+1);
X_29:=REF(HIGH,REF(BARSLAST(X_25),1)+1)>REF(HIGH,REF(BARSLAST(X_25),1)+2+REF(BARSLAST(X_25),REF(BARSLAST(X_25),1)+2));
X_30:=X_28 AND X_29 AND X_25;
X_31:=BACKSET(X_30,REF(BARSLAST(X_25),1)+2);
X_32:=X_31>REF(X_31,1);
X_33:=LOW>REF(LOW,REF(BARSLAST(X_19),1)+1);
X_34:=REF(LOW,REF(BARSLAST(X_19),1)+1)< REF(LOW,REF(BARSLAST(X_19),1)+2+REF(BARSLAST(X_19),REF(BARSLAST(X_19),1)+2));
X_35:=X_33 AND X_34 AND X_19;
X_36:=BACKSET(X_35,REF(BARSLAST(X_19),1)+2);
X_37:=X_36>REF(X_36,1);
X_38:=X_32 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X_39:=REF(BARSLAST(X_38),1)+1;
X_40:=BACKSET(X_38 AND COUNT(X_37,X_39)>0,LLVBARS(IF(X_37,LOW,POW(10,20)),X_39));
X_41:=X_40>REF(X_40,1);
X_42:=BACKSET(X_41,2);
X_43:=X_42>REF(X_42,1);
X_44:=X_43 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;
X_45:=REF(BARSLAST(X_44),1)+1;
X_46:=BACKSET(X_44 AND COUNT(X_32,X_45)>0,HHVBARS(IF(X_32,HIGH,-POW(10,20)),X_45));
X_47:=X_46>REF(X_46,1);
X_48:=BACKSET(X_47,2);
X_49:=X_48>REF(X_48,1);
X_50:=BACKSET(ISLASTBAR,MIN(BARSLAST(X_49),BARSLAST(X_43))+1);
X_51:=X_50>REF(X_50,1);
X_52:=BACKSET(ISLASTBAR,BARSLAST(X_19)+1);
X_53:=X_52>REF(X_52,1);
X_54:=BACKSET(X_53,REF(BARSLAST(X_19),1)+2);
X_55:=X_54>REF(X_54,1);
X_56:=BACKSET(ISLASTBAR,BARSLAST(X_25)+1);
X_57:=X_56>REF(X_56,1);
X_58:=BACKSET(X_57,REF(BARSLAST(X_25),1)+2);
X_59:=X_58>REF(X_58,1);
X_60:=BACKSET(X_55,REF(BARSLAST(X_19),1)+2);
X_61:=X_60>REF(X_60,1);
X_62:=BACKSET(X_59,REF(BARSLAST(X_25),1)+2);
X_63:=X_62>REF(X_62,1);
X_64:=REF(LOW,BARSLAST(X_53));
X_65:=REF(LOW,BARSLAST(X_55));
X_66:=REF(HIGH,BARSLAST(X_57));
X_67:=REF(HIGH,BARSLAST(X_59));
X_68:=REF(LOW,BARSLAST(X_53));
X_69:=REF(HIGH,BARSLAST(X_57));
X_70:=X_68+0.5*(X_69-X_68);
X_71:=CONST(BARSLAST(X_53));
X_72:=CONST(BARSLAST(X_55));
X_73:=CONST(BARSLAST(X_57));
X_74:=CONST(BARSLAST(X_59));
X_75:=CONST(BARSLAST(X_61));
X_76:=REF(LOW,BARSLAST(X_53));
X_77:=REF(LOW,BARSLAST(X_55));
X_78:=REF(HIGH,BARSLAST(X_57));
X_79:=REF(HIGH,BARSLAST(X_59));
X_80:=REF(LOW,BARSLAST(X_61));
X_81:=X_71< X_73;
X_82:=X_72-X_73;
X_83:=X_73-X_71;
X_84:=IF(CURRBARSCOUNT<=CONST(X_72)+1 AND CURRBARSCOUNT>=CONST(X_73)+1,16,0);
X_85:=IF(X_84 AND CLOSE>=REF(CLOSE,1)*1.096,3,0);
SS5:COUNT(X_85=3,CONST(X_72)+1),NODRAW;
SS6:BARSLAST(X_85=3)+1,NODRAW;
SS7:BARSSINCEN(X_85=3,CONST(X_72)+1)+1,NODRAW;
DRAWTEXT(SS7,0,CON2STR(SS7,0));
X_86:CURRBARSCOUNT=CONST(SS7);
X_86*15;
STICKLINE(X_86>0,42,60,2,1),COLORYELLOW;
STICKLINE(X_86>0,16,30,16,1),COLORYELLOW;
STICKLINE(X_86>0,18,21,14,0),COLORRED;
STICKLINE(X_86>0,25,28,14,0),COLORRED;
STICKLINE(X_86>0,23,23,16,1),COLORYELLOW;
STICKLINE(X_86>0,32,40,10,0),COLORYELLOW;
STICKLINE(X_86>0,47,49,5,1),COLORRED;
STICKLINE(X_86>0,51,53,5,1),COLORRED;
STICKLINE(X_86>0,55,57,5,1),COLORRED;
DRAWICON(X_86>0,40,29);
DRAWTEXT(X_86>0,12,'装钱'),COLORRED;
X_87:=STRCAT(CON2STR((REF(CLOSE,SS7-1)/REF(CLOSE,SS7)-1)*100,2),20);
DRAWTEXT_FIX(X_86,0.04,0.01,0,STRCAT(STRCAT(STRCAT(3204,CON2STR(SS7,0)),3205),X_87)),COLORRED;
箱高:REFDATE(HHV(HIGH,6000),DATE),NODRAW;
箱低:REFDATE(LLV(LOW,6000),DATE),NODRAW;
X_88:=STRCAT(CON2STR((REF(LOW,SS7-1)-箱低)/(箱高-箱低)*100,2),20);
X_89:=STRCAT(CON2STR((REF(HIGH,CONST(X_73))-箱低)/(箱高-箱低)*100,2),20);
X_90:=STRCAT(CON2STR((REF(CLOSE,0)-箱低)/(箱高-箱低)*100,2),20);
X_91:=STRCAT(CON2STR((REF(LOW,CONST(X_71))-箱低)/(箱高-箱低)*100,2),20);
CS:REF(LOW,CONST(X_71)),NODRAW;
X_92:=IF(CURRBARSCOUNT=CONST(X_71),1,0);
X_93:=IF(CLOSE>REF(CLOSE,1),1,0);
X_94:=IF(X_92>0,1,0);
IF(X_94=1,15,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK4;
DRAWTEXT(X_94=1,12,'庄'),COLORRED;
DRAWICON(X_94=1,38,9);
X_95:=IF(CURRBARSCOUNT< CONST(X_71)+1,1,0);
X_96:=IF(ISLASTBAR OR CURRBARSCOUNT=2 AND X_95>0 AND CLOSE>REF(CLOSE,1)*1.06,1,0);
X_97:=X_96;
IF(X_97=1,58,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK4;
DRAWICON(X_97=1,38,29);
辅助参考1:68,COLORBLACK;
辅助参考2:4,COLORBLACK;
地平线:(-5),COLORBLACK;
未来函数检测结果如下:
该公式包含未来函数:BACKSET
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
X_1赋值:3
X_2赋值:X_1日前的最高价=2*X_1+1日内最高价最高值
X_3赋值:X_2的X_1过滤
X_4赋值:BACKSET(X_3,X_1+1)
X_5赋值:X_4的X_1过滤
X_6赋值:X_1日前的最低价=2*X_1+1日内最低价最低值
X_7赋值:X_6的X_1过滤
X_8赋值:BACKSET(X_7,X_1+1)
X_9赋值:X_8的X_1过滤
X_10:=(REF(2*X_1日内最低价最低值,1)+REF(2*X_1日内最高价最高值,1))/2
X_11:=(最高价+最低价)/2
X_12:=X_5 AND NOT(X_9 AND X_10>=X_11) OR ISLASTBAR OR 收盘价的有效数据周期数=1
X_13:=X_9 AND NOT(X_5 AND X_10< X_11)
X_14:=X_5 AND NOT(X_9 AND X_10>=X_11)
X_15:=REF(上次X_12距今天数,1)+1
如果X_13返回最低价否则返回10000
X_17:=X_16>1日前的X_16
X_18:=BACKSET(X_17,2)
X_19:=X_18>1日前的X_18
X_20:=X_19 OR ISLASTBAR OR 收盘价的有效数据周期数=1
X_21:=REF(上次X_20距今天数,1)+1
如果X_14返回最高价否则返回0
X_23:=X_22>1日前的X_22
X_24:=BACKSET(X_23,2)
X_25:=X_24>1日前的X_24
X_26:=BACKSET(ISLASTBAR,MIN(上次X_25距今天数,BARSLAST(X_19))+1)
X_27:=X_26>1日前的X_26
X_28:=最高价< REF(最高价,REF(上次X_25距今天数,1)+1)
X_29:=REF(最高价,REF(上次X_25距今天数,1)+1)>REF(最高价,REF(上次X_25距今天数,1)+2+REF(上次X_25距今天数,REF(上次X_25距今天数,1)+2))
X_30:=X_28 AND X_29 AND X_25
X_31:=BACKSET(X_30,REF(上次X_25距今天数,1)+2)
X_32:=X_31>1日前的X_31
X_33:=最低价>REF(最低价,REF(上次X_19距今天数,1)+1)
X_34:=REF(最低价,REF(上次X_19距今天数,1)+1)< REF(最低价,REF(上次X_19距今天数,1)+2+REF(上次X_19距今天数,REF(上次X_19距今天数,1)+2))
X_35:=X_33 AND X_34 AND X_19
X_36:=BACKSET(X_35,REF(上次X_19距今天数,1)+2)
X_37:=X_36>1日前的X_36
X_38:=X_32 OR ISLASTBAR OR 收盘价的有效数据周期数=1
X_39:=REF(上次X_38距今天数,1)+1
X_40:=BACKSET(X_38 AND 统计X_39日满足X_37的天数>0,LLVBARS(IF(X_37,最低价,POW(10,20)),X_39))
X_41:=X_40>1日前的X_40
X_42:=BACKSET(X_41,2)
X_43:=X_42>1日前的X_42
X_44:=X_43 OR ISLASTBAR OR 收盘价的有效数据周期数=1
X_45:=REF(上次X_44距今天数,1)+1
X_46:=BACKSET(X_44 AND 统计X_45日满足X_32的天数>0,HHVBARS(IF(X_32,最高价,-POW(10,20)),X_45))
X_47:=X_46>1日前的X_46
X_48:=BACKSET(X_47,2)
X_49:=X_48>1日前的X_48
X_50:=BACKSET(ISLASTBAR,MIN(上次X_49距今天数,BARSLAST(X_43))+1)
X_51:=X_50>1日前的X_50
X_52:=BACKSET(ISLASTBAR,上次X_19距今天数+1)
X_53:=X_52>1日前的X_52
X_54:=BACKSET(X_53,REF(上次X_19距今天数,1)+2)
X_55:=X_54>1日前的X_54
X_56:=BACKSET(ISLASTBAR,上次X_25距今天数+1)
X_57:=X_56>1日前的X_56
X_58:=BACKSET(X_57,REF(上次X_25距今天数,1)+2)
X_59:=X_58>1日前的X_58
X_60:=BACKSET(X_55,REF(上次X_19距今天数,1)+2)
X_61:=X_60>1日前的X_60
X_62:=BACKSET(X_59,REF(上次X_25距今天数,1)+2)
X_63:=X_62>1日前的X_62
X_64:=REF(最低价,上次X_53距今天数)
X_65:=REF(最低价,上次X_55距今天数)
X_66:=REF(最高价,上次X_57距今天数)
X_67:=REF(最高价,上次X_59距今天数)
X_68:=REF(最低价,上次X_53距今天数)
X_69:=REF(最高价,上次X_57距今天数)
X_70:=X_68+0.5*(X_69-X_68)
X_71:=CONST(上次X_53距今天数)
X_72:=CONST(上次X_55距今天数)
X_73:=CONST(上次X_57距今天数)
X_74:=CONST(上次X_59距今天数)
X_75:=CONST(上次X_61距今天数)
X_76:=REF(最低价,上次X_53距今天数)
X_77:=REF(最低价,上次X_55距今天数)
X_78:=REF(最高价,上次X_57距今天数)
X_79:=REF(最高价,上次X_59距今天数)
X_80:=REF(最低价,上次X_61距今天数)
X_81:=X_71< X_73
X_82:=X_72-X_73
X_83:=X_73-X_71
X_84:=IF( 到最后交易的周期<=CONST(X_72)+1 AND 到最后交易的周期>=CONST(X_73)+1,16,0)
X_85:=IF(X_84 AND 收盘价>=1日前的收盘价*1.096,3,0)
输出SS5:COUNT(X_85=3,CONST(X_72)+1),NODRAW
输出SS6:上次X_85=3距今天数+1,NODRAW
输出SS7:BARSSINCEN(X_85=3,CONST(X_72)+1)+1,NODRAW
DRAWTEXT(SS7,0,CON2STR(SS7,0))
X_86: 到最后交易的周期=CONST(SS7)
X_86*15
当满足条件X_86>0时,在42和60之间画柱状线
当满足条件X_86>0时,在16和30之间画柱状线
当满足条件X_86>0时,在18和21之间画柱状线
当满足条件X_86>0时,在25和28之间画柱状线
当满足条件X_86>0时,在23和23之间画柱状线
当满足条件X_86>0时,在32和40之间画柱状线
当满足条件X_86>0时,在47和49之间画柱状线
当满足条件X_86>0时,在51和53之间画柱状线
当满足条件X_86>0时,在55和57之间画柱状线
当满足条件X_86>0时,在40和29之间画图标
当满足条件X_86>0时,在12和'装钱'位置书写文字
X_87:=STRCAT(CON2STR((SS7-1日前的收盘价/SS7日前的收盘价-1)*100,2),20)
DRAWTEXT_FIX(X_86,0.04,0.01,0,STRCAT(STRCAT(STRCAT(3204,CON2STR(SS7,0)),3205),X_87)),画红色
输出箱高:REFDATE(6000日内最高价最高值,DATE),NODRAW
输出箱低:REFDATE(6000日内最低价最低值,DATE),NODRAW
X_88:=STRCAT(CON2STR((SS7-1日前的最低价-箱低)/(箱高-箱低)*100,2),20)
X_89:=STRCAT(CON2STR((REF(最高价,CONST(X_73))-箱低)/(箱高-箱低)*100,2),20)
X_90:=STRCAT(CON2STR((0日前的收盘价-箱低)/(箱高-箱低)*100,2),20)
X_91:=STRCAT(CON2STR((REF(最低价,CONST(X_71))-箱低)/(箱高-箱低)*100,2),20)
输出CS:REF(最低价,CONST(X_71)),NODRAW
X_92:=IF( 到最后交易的周期=CONST(X_71),1,0)
X_93:=IF(收盘价>1日前的收盘价,1,0)
如果X_92>0返回1否则返回0
如果X_94=1返回15否则返回DRAWNULL
当满足条件X_94=1时,在12和'庄'位置书写文字
当满足条件X_94=1时,在38和9之间画图标
X_95:=IF( 到最后交易的周期< CONST(X_71)+1,1,0)
X_96:=IF(ISLASTBAR OR 到最后交易的周期=2 AND X_95>0 AND 收盘价>1日前的收盘价*1.06,1,0)
X_97:=X_96
如果X_97=1返回58否则返回DRAWNULL
当满足条件X_97=1时,在38和29之间画图标
输出辅助参考1:68,COLORBLACK
输出辅助参考2:4,COLORBLACK
输出地平线:(-5),COLORBLACK