您现在的位置:程序化交易>> 股票公式>> 通达信>> 通达信公式>>正文内容

撑压主图指标公式公式、源码[通达信公式]

相关标签:通达信ox主图公式源码 、 通达信kd指标公式源码 、 通达信bs主图指标公式 、 通达信撑压划线源码 、 通达信暴涨主图源码 、 通达信布林线主图源码 、 通达信生命线主图源码 、 通达信分时主图源码 、 通达信主图买卖源码 、 通达信财神主图源码 、 通达信主图boll源码 、 通达信双响炮主图源码 、 通达信箱体主图源码 、 通达信好主图源码 、 通达信变色主图源码 、

 

DRAWTEXT(INBLOCK(1) AND ISLASTBAR,HIGH,2);
HJ_1:=STRCAT(STRCAT(STRCAT(HYBLOCK,3),DYBLOCK),4);
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(HJ_1,GNBLOCK)),COLOR00C0C0;
HJ_2:=BACKSET(LOWRANGE(LOW)>=5,4);
HJ_3:=BACKSET(HJ_2=0 AND REF(HJ_2,1)=1,2);
HJ_4:=IF(HJ_3=1 AND REF(HJ_3,1)=0,(-1),0);
HJ_5:=BACKSET(TOPRANGE(HIGH)>=5,4);
HJ_6:=BACKSET(HJ_5=0 AND REF(HJ_5,1)=1,2);
HJ_7:=IF(HJ_6=1 AND REF(HJ_6,1)=0,1,0);
HJ_8:=REF(BARSLAST(HJ_7=1),1)+1;
HJ_9:=REF(BARSLAST(HJ_4=(-1)),1)+1;
HJ_10:=LOWRANGE(LOW);
HJ_11:=TOPRANGE(HIGH);
HJ_12:=IF(HJ_4=(-1) AND NOT(HJ_7=1),(-1),IF(NOT(HJ_4=(-1)) AND HJ_7=1,1,IF(HJ_4=(-1) AND HJ_7=1,IF(HJ_8>HJ_9,1,(-1)),0)));
HJ_13:=IF(HJ_4=(-1) AND REF(HJ_8,1)>REF(HJ_9,1) AND LLV(LOW,HJ_8+1)<REF(LLV(LOW,HJ_8+1),1),(-1),0);
HJ_14:=IF(HJ_4=(-1) AND REF(HJ_8,1)<REF(HJ_9,1) AND HJ_8>=4,(-1),0);
HJ_15:=HJ_8<4;
HJ_16:=HJ_4=(-1) AND REF(HJ_8,1)<REF(HJ_9,1);
HJ_17:=LOW<REF(LOW,HJ_9) OR HJ_10>REF(HJ_11,HJ_8);
HJ_18:=HJ_15 AND HJ_16 AND HJ_17;
HJ_19:=IF(HJ_13=(-1) OR HJ_14=(-1) OR HJ_18 AND HJ_12=(-1),(-1),0);
HJ_20:=IF(HJ_7=1 AND REF(HJ_9,1)>REF(HJ_8,1) AND HHV(HIGH,HJ_9+1)>REF(HHV(HIGH,HJ_9+1),1),1,0);
HJ_21:=IF(HJ_7=1 AND REF(HJ_9,1)<REF(HJ_8,1) AND HJ_9>=4,1,0);
HJ_22:=HJ_9<4 OR REF(HJ_19,HJ_9)=0;
HJ_23:=HJ_7=1 AND REF(HJ_9,1)<REF(HJ_8,1);
HJ_24:=HIGH>REF(HIGH,HJ_8) OR HJ_11>REF(HJ_10,HJ_9);
HJ_25:=HJ_22 AND HJ_23 AND HJ_24;
HJ_26:=IF(HJ_20=1 OR HJ_21=1 OR HJ_25 AND HJ_12=1,1,0);
HJ_27:=REF(BARSLAST(HJ_26=1),1)+1;
HJ_28:=REF(BARSLAST(HJ_19=(-1)),1)+1;
HJ_29:=IF(HJ_19=(-1) AND REF(HJ_27,1)>REF(HJ_28,1) AND LLV(LOW,HJ_27+1)<REF(LLV(LOW,HJ_27+1),1),(-1),0);
HJ_30:=IF(HJ_19=(-1) AND REF(HJ_27,1)<REF(HJ_28,1) AND HJ_27>=4,(-1),0);
HJ_31:=HJ_27<4 OR REF(HJ_26,HJ_27)=0;
HJ_32:=HJ_19=(-1) AND REF(HJ_27,1)<REF(HJ_28,1);
HJ_33:=LOW<REF(LOW,HJ_28) OR HJ_10>REF(HJ_11,HJ_27);
HJ_34:=HJ_31 AND HJ_32 AND HJ_33;
HJ_35:=IF(HJ_29=(-1) OR HJ_30=(-1) OR HJ_34,(-1),0);
HJ_36:=IF(HJ_26=1 AND REF(HJ_28,1)>REF(HJ_27,1) AND HHV(HIGH,HJ_28+1)>REF(HHV(HIGH,HJ_28+1),1),1,0);
HJ_37:=IF(HJ_26=1 AND REF(HJ_28,1)<REF(HJ_27,1) AND HJ_28>=4,1,0);
HJ_38:=HJ_28<4 OR REF(HJ_19,HJ_28)=0;
HJ_39:=HJ_26=1 AND REF(HJ_28,1)<REF(HJ_27,1);
HJ_40:=HIGH>REF(HIGH,HJ_27) OR HJ_11>REF(HJ_10,HJ_28);
HJ_41:=HJ_38 AND HJ_39 AND HJ_40;
HJ_42:=IF(HJ_36=1 OR HJ_37=1 OR HJ_41,1,0);
HJ_43:=REF(BARSLAST(HJ_42=1),1)+1;
HJ_44:=REF(BARSLAST(HJ_35=(-1)),1)+1;
HJ_45:=IF(HJ_35=(-1) AND REF(HJ_43,1)>REF(HJ_44,1) AND LLV(LOW,HJ_43+1)<REF(LLV(LOW,HJ_43+1),1),(-1),0);
HJ_46:=IF(HJ_35=(-1) AND REF(HJ_43,1)<REF(HJ_44,1) AND HJ_43>=4,(-1),0);
HJ_47:=HJ_43<4 OR REF(HJ_42,HJ_43)=0;
HJ_48:=HJ_35=(-1) AND REF(HJ_43,1)<REF(HJ_44,1);
HJ_49:=LOW<REF(LOW,HJ_44) OR HJ_10>REF(HJ_11,HJ_43);
HJ_50:=HJ_47 AND HJ_48 AND HJ_49;
HJ_51:=IF(HJ_45=(-1) OR HJ_46=(-1) OR HJ_50,(-1),0);
HJ_52:=IF(HJ_42=1 AND REF(HJ_44,1)>REF(HJ_43,1) AND HHV(HIGH,HJ_44+1)>REF(HHV(HIGH,HJ_44+1),1),1,0);
HJ_53:=IF(HJ_42=1 AND REF(HJ_44,1)<REF(HJ_43,1) AND HJ_44>=4,1,0);
HJ_54:=HJ_44<4 OR REF(HJ_35,HJ_44)=0;
HJ_55:=HJ_42=1 AND REF(HJ_44,1)<REF(HJ_43,1);
HJ_56:=HIGH>REF(HIGH,HJ_43) OR HJ_11>REF(HJ_10,HJ_44);
HJ_57:=HJ_54 AND HJ_55 AND HJ_56;
HJ_58:=IF(HJ_52=1 OR HJ_53=1 OR HJ_57,1,0);
HJ_59:=REF(BARSLAST(HJ_58=1),1)+1;
HJ_60:=REF(BARSLAST(HJ_51=(-1)),1)+1;
HJ_61:=REF(BARSLAST(HJ_58=1),BARSLAST(HJ_58=1)+1)+BARSLAST(HJ_58=1)+1;
HJ_62:=REF(BARSLAST(HJ_51=(-1)),BARSLAST(HJ_51=(-1))+1)+BARSLAST(HJ_51=(-1))+1;
HJ_63:=BACKSET(HJ_51=(-1) AND HJ_59<HJ_60,HJ_59+1);
HJ_64:=BACKSET(HJ_51=(-1) AND HJ_59>HJ_60,HJ_62+1);
HJ_65:=BACKSET(HJ_58=1 AND HJ_59>HJ_60,HJ_60+1);
HJ_66:=BACKSET(HJ_58=1 AND HJ_59<HJ_60,HJ_61+1);
HJ_67:=BACKSET(HJ_59>HJ_60 AND HJ_60>=4 AND HIGH>=HHV(HIGH,HJ_60) AND LOW>LLV(LOW,HJ_60+1) AND TOPRANGE(HIGH)>=5,HJ_60+1);
HJ_68:=BACKSET(HJ_59<HJ_60 AND HJ_59>=4 AND LOW<=LLV(LOW,HJ_59) AND HIGH<HHV(HIGH,HJ_59+1) AND LOWRANGE(LOW)>=5,HJ_59+1);
HJ_69:=IF(HJ_51=(-1) AND (HJ_63+HJ_65=2 OR HJ_64+HJ_65=2 OR HJ_63+HJ_66=2 OR HJ_63+HJ_67=2 OR HJ_64+HJ_67=2),(-1),0);
HJ_70:=IF(HJ_58=1 AND (HJ_63+HJ_65=2 OR HJ_64+HJ_65=2 OR HJ_63+HJ_66=2 OR HJ_65+HJ_68=2 OR HJ_66+HJ_68=2),1,0);
NOTEXT1:DRAWLINE(HJ_70=1,HIGH,HJ_69=(-1),LOW,0),COLORGRAY;
NOTEXT2:DRAWLINE(HJ_69=(-1),LOW,HJ_70=1,HIGH,0),COLORGRAY;
NOTEXT极点:IF(HJ_69=(-1),LOW,IF(HJ_70=1,HIGH,DRAWNULL)),CIRCLEDOT,COLOR00CCCC;
HJ_71:=REF(BARSLAST(HJ_69=(-1)),1)+1;
HJ_72:=REF(BARSLAST(HJ_69=(-1)),BARSLAST(HJ_69=(-1))+1)+BARSLAST(HJ_69=(-1))+1;
HJ_73:=REF(BARSLAST(HJ_69=(-1)),HJ_72+1)+HJ_72+1;
HJ_74:=REF(BARSLAST(HJ_70=1),1)+1;
HJ_75:=REF(BARSLAST(HJ_70=1),BARSLAST(HJ_70=1)+1)+BARSLAST(HJ_70=1)+1;
HJ_76:=REF(BARSLAST(HJ_70=1),HJ_75+1)+HJ_75+1;
HJ_77:=ATAN((REF(LOW,HJ_71)-REF(LOW,HJ_72))/REF(LOW,HJ_72)/(HJ_72-HJ_71)*100)/3.141593*180;
HJ_78:=ATAN((REF(LOW,HJ_72)-REF(LOW,HJ_73))/REF(LOW,HJ_73)/(HJ_73-HJ_72)*100)/3.141593*180;
HJ_79:=ATAN((REF(HIGH,HJ_74)-REF(HIGH,HJ_75))/REF(HIGH,HJ_75)/(HJ_75-HJ_74)*100)/3.141593*180;
HJ_80:=ATAN((REF(HIGH,HJ_75)-REF(HIGH,HJ_76))/REF(HIGH,HJ_76)/(HJ_76-HJ_75)*100)/3.141593*180;
HJ_81:=HJ_69=(-1) AND BACKSET(ISLASTBAR,HJ_72+1);
HJ_82:=HJ_69=(-1) AND BACKSET(ISLASTBAR,HJ_71+1);
HJ_83:=HJ_70=1 AND BACKSET(ISLASTBAR,HJ_75+1);
HJ_84:=HJ_70=1 AND BACKSET(ISLASTBAR,HJ_74+1);
压力:REF(HIGH,HJ_75)*(1+TAN(HJ_79*3.141593/180)/100*HJ_75),NODRAW,COLORGREEN;
支撑:REF(LOW,HJ_72)*(1+TAN(HJ_77*3.141593/180)/100*HJ_72),NODRAW,COLORRED;
HJ_85:=REF(HIGH,HJ_76)*(1+TAN(HJ_80*3.141593/180)/100*HJ_76);
HJ_86:=REF(LOW,HJ_73)*(1+TAN(HJ_78*3.141593/180)/100*HJ_73);
NOTEXT撑:DRAWLINE(HJ_81,LOW,HJ_82,LOW,1),COLORRED;
NOTEXT压:DRAWLINE(HJ_83,HIGH,HJ_84,HIGH,1),COLORGREEN;
HJ_87:=HJ_71<HJ_74 AND COUNT(HJ_71>=4 AND HIGH>=HHV(HIGH,HJ_71) AND LOW>LLV(LOW,HJ_71+1) AND TOPRANGE(HIGH)>=5,HJ_71)>=1 OR REF(HJ_71<HJ_74 AND COUNT(HJ_58=1,HJ_71)>=1,1);
HJ_88:=HJ_71>HJ_74 AND COUNT(HJ_74>=4 AND LOW<=LLV(LOW,HJ_74) AND HIGH<HHV(HIGH,HJ_74+1) AND LOWRANGE(LOW)>=5,HJ_74)>=1 OR REF(HJ_71>HJ_74 AND COUNT(HJ_51=(-1),HJ_74)>=1,1);
HJ_89:=HJ_77>=0 AND CLOSE>REF(HIGH,HJ_74) AND REF(COUNT(CROSS(CLOSE,REF(HIGH,HJ_74)) OR CLOSE>REF(HIGH,HJ_74),HJ_74)<1,1);
HJ_90:=IF(HJ_71<HJ_74,IF(HJ_87,HJ_89,0),0);
DRAWICON(HJ_90,LOW*0.97,28);
NOTEXT三角顶:DRAWLINE(HJ_84,HIGH,HJ_90,REF(HIGH,HJ_74),0),DOTLINE,COLORGREEN;
HJ_91:=HJ_77>=0 AND HJ_79<0 AND 支撑<压力 AND CLOSE>压力 AND REF(COUNT(CROSS(CLOSE,压力) OR CLOSE>压力,HJ_71)<1,1);
HJ_92:=HJ_78>=0 AND HJ_79<0 AND HJ_86<压力 AND CLOSE>压力 AND REF(COUNT(CROSS(CLOSE,压力) OR CLOSE>压力,HJ_71)<1,1);
HJ_93:=HJ_77>=0 AND HJ_79<0 AND 支撑<压力 AND CLOSE>压力 AND REF(COUNT(CROSS(CLOSE,压力) OR CLOSE>压力,HJ_74)<1,1);
HJ_94:=HJ_77>=0 AND HJ_80<0 AND 支撑<HJ_85 AND CLOSE>HJ_85 AND REF(COUNT(CROSS(CLOSE,HJ_85) OR CLOSE>HJ_85,HJ_74)<1,1);
HJ_95:=IF(HJ_71<HJ_74,IF(HJ_87,HJ_91,HJ_92),IF(HJ_88,HJ_93,HJ_94));
DRAWICON(HJ_95,LOW*0.95,29);
HJ_96:=HJ_77<0 AND HJ_77-HJ_79>(-10) AND HJ_79<0 AND HJ_79>(-45) AND CLOSE>压力 AND REF(COUNT(CROSS(CLOSE,压力) OR CLOSE>压力,HJ_71)<1,1);
HJ_97:=HJ_78<0 AND HJ_78-HJ_79>(-10) AND HJ_79<0 AND HJ_79>(-45) AND CLOSE>压力 AND REF(COUNT(CROSS(CLOSE,压力) OR CLOSE>压力,HJ_71)<1,1);
HJ_98:=HJ_77<0 AND HJ_77-HJ_79>(-10) AND HJ_79<0 AND HJ_79>(-45) AND CLOSE>压力 AND REF(COUNT(CROSS(CLOSE,压力) OR CLOSE>压力,HJ_74)<1,1);
HJ_99:=HJ_77<0 AND HJ_77-HJ_80>(-10) AND HJ_80<0 AND HJ_80>(-45) AND CLOSE>HJ_85 AND REF(COUNT(CROSS(CLOSE,HJ_85) OR CLOSE>HJ_85,HJ_74)<1,1);
HJ_100:=IF(HJ_71<HJ_74,IF(HJ_87,HJ_96,HJ_97),IF(HJ_88,HJ_98,HJ_99));
DRAWICON(HJ_100,LOW*0.93,30);
NOTEXT预画线1:DRAWLINE(HJ_70=1,HIGH,NOT(HJ_69=(-1)) AND HJ_74<HJ_71 AND LOW<=LLV(LOW,HJ_74) AND BACKSET(ISLASTBAR,HJ_74+1) AND BACKSET(ISLASTBAR,HJ_71+1) AND BACKSET(ISLASTBAR,BARSLAST(LOW<=LLV(LOW,HJ_74))+1),LOW,0),DOTLINE,COLORGRAY;
NOTEXT预画线2:DRAWLINE(HJ_69=(-1),LOW,NOT(HJ_70=1) AND HJ_74>HJ_71 AND HIGH>=HHV(HIGH,HJ_71) AND BACKSET(ISLASTBAR,HJ_74+1) AND BACKSET(ISLASTBAR,HJ_71+1) AND BACKSET(ISLASTBAR,BARSLAST(HIGH>=HHV(HIGH,HJ_71))+1),HIGH,0),DOTLINE,COLORGRAY;{-----------------------------------}DRAWTEXT_FIX(C>O,0.01,0.9,0,' WWW.CXH99.COM '),COLORRED;
DRAWTEXT_FIX(C>O,1,1,0,'程序化交易模型'),COLORRED;


 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,谢谢您!)

怎么收费,代编流程等详情请点击阅读,或QQ微信联系我们!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容