beyond202104 发表于 2023-8-28 16:40:12

支撑压力线(通达信公式 副图 源码 测试图)


支撑压力线
本公式可以添加到任意自用主图中,作为辅助看盘之用,自动划线公式,使用了未来函数,介意的不要下载!!!公式可以自动画出近期和中期支撑线和压力线,盘感会更好! 公式用法:1.回踩支撑线不破,可以逢低介入;2.遇压力线冲高回落,可以逢高减磅;3.突破压力线,压力线就会变成支撑线;
4.跌破支撑线,支撑线就会变成压力线。

{虚拟涨停K}KXZT:=IF(CURRBARSCOUNT=1 AND PERIOD=5 AND NOT(C>1500 OR DYNAINFO(7)=0) AND C>=O,REF(CLOSE,1)*1.1,DRAWNULL),NODRAW;STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,KXZT,MAX(OPEN,CLOSE),-1,-1),COLOR00C0C0;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);{虚拟跌停K}KXDT:=IF(CURRBARSCOUNT=1 AND PERIOD=5 AND NOT(C>1500) AND C<O,REF(CLOSE,1)*0.9,DRAWNULL),NODRAW; STICKLINE(CURRBARSCOUNT=1 AND PERIOD=5,KXDT,MIN(OPEN,CLOSE),-1,-1),COLORLIBLUE;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);{近期划线-紫色}XA_1:=REF(HIGH,3)=HHV(HIGH,2*3+1);XA_2:=FILTER(XA_1,3);XA_3:=BACKSET(XA_2,3+1);XA_4:=FILTER(XA_3,3);XA_5:=REF(LOW,3)=LLV(LOW,2*3+1);XA_6:=FILTER(XA_5,3);XA_7:=BACKSET(XA_6,3+1);XA_8:=FILTER(XA_7,3);XA_9:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;XA_10:=(HIGH+LOW)/2;XA_11:=XA_4 AND NOT(XA_8 AND XA_9>=XA_10) OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;XA_12:=XA_8 AND NOT(XA_4 AND XA_9<XA_10);XA_13:=XA_4 AND NOT(XA_8 AND XA_9>=XA_10);XA_14:=REF(BARSLAST(XA_11),1)+1;XA_15:=BACKSET(XA_11 AND COUNT(XA_12,XA_14)>0,LLVBARS(IF(XA_12,LOW,10000),XA_14));XA_16:=XA_15>REF(XA_15,1);XA_17:=BACKSET(XA_16,2);XA_18:=XA_17>REF(XA_17,1);XA_19:=XA_18 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;XA_20:=REF(BARSLAST(XA_19),1)+1;XA_21:=BACKSET(XA_19 AND COUNT(XA_13,XA_20)>0,HHVBARS(IF(XA_13,HIGH,0),XA_20));XA_22:=XA_21>REF(XA_21,1);XA_23:=BACKSET(XA_22,2);XA_24:=XA_23>REF(XA_23,1);XA_25:=BACKSET(ISLASTBAR,MIN(BARSLAST(XA_24),BARSLAST(XA_18))+1);XA_26:=XA_25>REF(XA_25,1);DRAWLINE(XA_26,IF(XA_24,HIGH,LOW),ISLASTBAR,IF(BARSLAST(XA_24)>BARSLAST(XA_18),HIGH,LOW),0),DOTLINE,COLORWHITE;XA_27:=HIGH<REF(HIGH,REF(BARSLAST(XA_24),1)+1);XA_28:=REF(HIGH,REF(BARSLAST(XA_24),1)+1)>REF(HIGH,REF(BARSLAST(XA_24),1)+2+REF(BARSLAST(XA_24),REF(BARSLAST(XA_24),1)+2));XA_29:=XA_27 AND XA_28 AND XA_24;XA_30:=BACKSET(XA_29,REF(BARSLAST(XA_24),1)+2);XA_31:=XA_30>REF(XA_30,1);XA_32:=LOW>REF(LOW,REF(BARSLAST(XA_18),1)+1);XA_33:=REF(LOW,REF(BARSLAST(XA_18),1)+1)<REF(LOW,REF(BARSLAST(XA_18),1)+2+REF(BARSLAST(XA_18),REF(BARSLAST(XA_18),1)+2));XA_34:=XA_32 AND XA_33 AND XA_18;XA_35:=BACKSET(XA_34,REF(BARSLAST(XA_18),1)+2);XA_36:=XA_35>REF(XA_35,1);XA_37:=XA_31 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;XA_38:=REF(BARSLAST(XA_37),1)+1;XA_39:=BACKSET(XA_37 AND COUNT(XA_36,XA_38)>0,LLVBARS(IF(XA_36,LOW,POW(10,20)),XA_38));XA_40:=XA_39>REF(XA_39,1);XA_41:=BACKSET(XA_40,2);XA_42:=XA_41>REF(XA_41,1);XA_43:=XA_42 OR ISLASTBAR OR BARSCOUNT(CLOSE)=1;XA_44:=REF(BARSLAST(XA_43),1)+1;XA_45:=BACKSET(XA_43 AND COUNT(XA_31,XA_44)>0,HHVBARS(IF(XA_31,HIGH,-POW(10,20)),XA_44));XA_46:=XA_45>REF(XA_45,1);XA_47:=BACKSET(XA_46,2);XA_48:=XA_47>REF(XA_47,1);XA_49:=BACKSET(ISLASTBAR,MIN(BARSLAST(XA_48),BARSLAST(XA_42))+1);XA_50:=XA_49>REF(XA_49,1);XA_51:=BACKSET(ISLASTBAR,BARSLAST(XA_18)+1);XA_52:=XA_51>REF(XA_51,1);XA_53:=BACKSET(XA_52,REF(BARSLAST(XA_18),1)+2);XA_54:=XA_53>REF(XA_53,1);DRAWLINE(XA_54,LOW,XA_52,LOW,1),COLORMAGENTA;XA_55:=BACKSET(ISLASTBAR,BARSLAST(XA_24)+1);XA_56:=XA_55>REF(XA_55,1);XA_57:=BACKSET(XA_56,REF(BARSLAST(XA_24),1)+2);XA_58:=XA_57>REF(XA_57,1);DRAWLINE(XA_58,HIGH,XA_56,HIGH,1),COLORMAGENTA;


aimessage 发表于 2023-9-1 09:25:33

感谢楼主分享好资源

红谢周已好 发表于 2023-11-20 16:31:23

内容真的很不错

露了创 发表于 2024-3-1 08:09:42

有道理。。。
页: [1]
查看完整版本: 支撑压力线(通达信公式 副图 源码 测试图)