粉红色线右面有大阳主图公式公式、代码源码[通达信公式]
相关标签:
原理解析:
源码:
V2:=IF(CURRBARSCOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);
HSL:=100*VOL/(CONST(FINANCE(7))/100);
HS:=IF(BETWEEN(HSL,0,1000000),HSL,VOL);
STICKLINE(V2>=0.9 AND C>O,C,O,3,0),COLORAA00AA;
STICKLINE(V2>=0.9 AND C>O,C,O,2,0),COLORAA00CC;
STICKLINE(V2>=0.9 AND C>O,C,O,1,0),COLORAA00DD;
STICKLINE(V2>=0.9 AND C>O,H,L,0,0),COLOR0000FF;
N:=5;
XB1:=TROUGH(2,N,1),COLORGRAY;
CB1:=CONST(TROUGHBARS(2,N,1));
B1:=IF(CURRBARSCOUNT<CB1+3,CONST(XB1),DRAWNULL),COLORGRAY;
STICKLINE(1,B1,B1,3,1),COLORGRAY;
XB2:=TROUGH(2,N,2),COLORGRAY;
CB2:=CONST(TROUGHBARS(2,N,2));
B2:=IF(CURRBARSCOUNT<CB2+3 AND CURRBARSCOUNT>CB1-1,CONST(XB2),DRAWNULL),COLORGRAY;
STICKLINE(1,B2,B2,3,1),COLORGRAY;
XB3:=TROUGH(2,N,3),COLORGRAY;
CB3:=CONST(TROUGHBARS(2,N,3));
B3:=IF(CURRBARSCOUNT<CB3+3 AND CURRBARSCOUNT>CB2-1,CONST(XB3),DRAWNULL),COLORGRAY;
STICKLINE(1,B3,B3,3,1),COLORGRAY;
XB4:=TROUGH(2,N,4),COLORGRAY;
CB4:=CONST(TROUGHBARS(2,N,4));
B4:=IF(CURRBARSCOUNT<CB4+3 AND CURRBARSCOUNT>CB3-1,CONST(XB4),DRAWNULL),COLORGRAY;
STICKLINE(1,B4,B4,3,1),COLORGRAY;
XB5:=TROUGH(2,N,5),COLORGRAY;
CB5:=CONST(TROUGHBARS(2,N,5));
B5:=IF(CURRBARSCOUNT<CB5+3 AND CURRBARSCOUNT>CB4-1,CONST(XB5),DRAWNULL),COLORGRAY;
STICKLINE(1,B5,B5,3,1),COLORGRAY;
XB6:=TROUGH(2,N,6),COLORGRAY;
CB6:=CONST(TROUGHBARS(2,N,6));
B6:=IF(CURRBARSCOUNT<CB6+3 AND CURRBARSCOUNT>CB5-1,CONST(XB6),DRAWNULL),COLORGRAY;
STICKLINE(1,B6,B6,3,1),COLORGRAY;
XT1:=PEAK(1,N,1),COLORGRAY;
CT1:=CONST(PEAKBARS(1,N,1));
T1:=IF(CURRBARSCOUNT<CT1+3,CONST(XT1),DRAWNULL),COLORLIRED;
STICKLINE(1,T1,T1,3,1),COLORLIRED;
XT2:=PEAK(1,N,2),COLORGRAY;
CT2:=CONST(PEAKBARS(1,N,2));
T2:=IF(CURRBARSCOUNT<CT2+3 AND CURRBARSCOUNT>CT1-1,CONST(XT2),DRAWNULL),COLORLIRED;
STICKLINE(1,T2,T2,3,1),COLORLIRED;
XT3:=PEAK(1,N,3),COLORGRAY;
CT3:=CONST(PEAKBARS(1,N,3));
T3:=IF(CURRBARSCOUNT<CT3+3 AND CURRBARSCOUNT>CT2-1,CONST(XT3),DRAWNULL),COLORLIRED;
STICKLINE(1,T3,T3,3,1),COLORLIRED;
XT4:=PEAK(1,N,4),COLORGRAY;
CT4:=CONST(PEAKBARS(1,N,4));
T4:=IF(CURRBARSCOUNT<CT4+3 AND CURRBARSCOUNT>CT3-1,CONST(XT4),DRAWNULL),COLORLIRED;
STICKLINE(1,T4,T4,3,1),COLORLIRED;
XT5:=PEAK(1,N,5),COLORGRAY;
CT5:=CONST(PEAKBARS(1,N,5));
T5:=IF(CURRBARSCOUNT<CT5+3 AND CURRBARSCOUNT>CT4-1,CONST(XT5),DRAWNULL),COLORLIRED;
STICKLINE(1,T5,T1,3,1),COLORLIRED;
XT6:=PEAK(1,N,6),COLORGRAY;
CT6:=CONST(PEAKBARS(1,N,6));
T6:=IF(CURRBARSCOUNT<CT6+3 AND CURRBARSCOUNT>CT5-1,CONST(XT6),DRAWNULL),COLORLIRED;
STICKLINE(1,T6,T6,3,1),COLORLIRED;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容