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

日内期货波段指标 股票期货适用 通达信 主图 波段 无未来函数 买




通达信指标公式源码日内期货波段指标

G:=IF(HIGH=HHV(HIGH,3),1,0);

D:=IF(LOW=LLV(LOW,3),1,0);

S:=IF(REF(G,2)=1 AND REF(G,1)=0 AND G=0,REF(HIGH,2),REF(HIGH,2+(BARSLAST(REF(G,2)=1 AND REF(G,1)=0 AND G=0))));

X:=IF(REF(D,2)=1 AND REF(D,1)=0 AND D=0,REF(LOW,2),REF(LOW,2+(BARSLAST(REF(D,2)=1 AND REF(D,1)=0 AND D=0))));

K1:=IF(HIGH>=MA(CLOSE,1),S,REF(S,BARSLAST(HIGH>MA(CLOSE,1))));

K2:=IF(LOW<=MA(CLOSE,5),X,REF(X,BARSLAST(LOW<=MA(CLOSE,5))));

C1:=REF(CLOSE,1)<=K1 AND CLOSE>K1;

C2:=REF(CLOSE,1)>=K2 AND CLOSE<K2;

K3:=BARSLAST(C1);

K4:=BARSLAST(C2);

持仓线:IF(K3<K4,K2,DRAWNULL),LINETHICK2,COLORYELLOW;

持币线:IF(K3>K4,K1,DRAWNULL),LINETHICK2,COLORWHITE;

STICKLINE(K3<K4,C,O,3,0),COLOR0000AA;

STICKLINE(K3<K4,C,O,2.5,0),COLOR0000BB ;

STICKLINE(K3<K4,C,O,1.5,0),COLOR0000CC ;

STICKLINE(K3<K4,C,O,1,0),COLOR0000EE;

STICKLINE(K3<K4,H,L,0,0),COLOR0000FF;

STICKLINE(K3>K4,C,O,3,0),COLOR7B7B00;

STICKLINE(K3>K4,C,O,2.5,0),COLOR909000;

STICKLINE(K3>K4,C,O,1.5,0),COLORA8A800;

STICKLINE(K3>K4,C,O,1,0),COLORCECE00;

STICKLINE(K3>K4,H,L,0,0),COLORFFFF00;

DRAWICON(CROSS(K4,K3),(LOW*0.99),5);

DRAWTEXT(CROSS(K4,K3),(LOW*0.99),' ←买入'),COLORYELLOW;


123457466 发表于 2023-10-16 11:15:09

无量天尊!

清新绿茶园 发表于 2024-3-9 14:50:03

已收藏!

ewqdfqw 发表于 2024-4-8 10:00:40

相当不错,感谢无私分享精神!
页: [1]
查看完整版本: 日内期货波段指标 股票期货适用 通达信 主图 波段 无未来函数 买