老师,这个指标能修改成只显示最后一次的支撑和压力吗?另外把买卖提示提高和降低一些,改成红绿颜色的字体,谢谢老师。 [博易POBO]
咨询内容:
LX:=LLV(LOW,3);
H1:=IFELSE(HX<REF(HX,1) AND HX<REF(HX,2) AND HX<REF(HX,4) AND LX<REF(LX,1) AND LX<REF(LX,3) AND LX<REF(LX,5) AND OPEN>CLOSE AND (HHV(OPEN,0)-CLOSE)>0,REF(HX,4),0);
L1:=IFELSE(LX>REF(LX,1) AND LX>REF(LX,3) AND LX>REF(LX,5) AND HX>REF(HX,1) AND HX>REF(HX,2) AND HX>REF(HX,4) AND OPEN<CLOSE AND (CLOSE-LLV(OPEN,0))>0,REF(LX,4),0);
H2:=VALUEWHEN(H1>0,H1);
L2:=VALUEWHEN(L1>0,L1);
K1:=IFELSE(CLOSE>H2,-3,IFELSE(CLOSE<L2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
G:=IFELSE(K2=1,H2,L2);
TMP:=K2;
DRAWLINE(TMP=1 AND REF(TMP,1)=1,G,TMP=1 AND REF(TMP,1)=1,REF(G,1),COLORCYAN),LINETHICK2;
DRAWLINE(TMP=-3 AND REF(TMP,1)=-3,G,TMP=-3 AND REF(TMP,1)=-3,REF(G,1),COLORYELLOW),LINETHICK2;
DRAWSL(K2=1,G,0,1,0),COLORCYAN,LINETHICK2;
DRAWSL(K2=-3,G,0,1,0),COLORYELLOW,LINETHICK2;
DRAWTEXT(CROSS(TMP,0),HX,'卖↓');
DRAWTEXT(CROSS(0,TMP),LX,'买↑');
MA55:=MA(CLOSE,55);
DRAWTEXT(CROSS(TMP,0) AND CLOSE<=MA55,HX,'卖↓');
DRAWTEXT(CROSS(0,TMP) AND CLOSE>=MA55,LX,'买↑');
LX:=LLV(LOW,3);
H1:=IFELSE(HX<REF(HX,1) AND HX<REF(HX,2) AND HX<REF(HX,4) AND LX<REF(LX,1) AND LX<REF(LX,3) AND LX<REF(LX,5) AND OPEN>CLOSE AND (HHV(OPEN,0)-CLOSE)>0,REF(HX,4),0);
L1:=IFELSE(LX>REF(LX,1) AND LX>REF(LX,3) AND LX>REF(LX,5) AND HX>REF(HX,1) AND HX>REF(HX,2) AND HX>REF(HX,4) AND OPEN<CLOSE AND (CLOSE-LLV(OPEN,0))>0,REF(LX,4),0);
H2:=VALUEWHEN(H1>0,H1);
L2:=VALUEWHEN(L1>0,L1);
K1:=IFELSE(CLOSE>H2,-3,IFELSE(CLOSE<L2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
G:=IFELSE(K2=1,H2,L2);
TMP:=K2;
DRAWLINE(ISLASTBAR AND TMP=1 AND REF(TMP,1)=1,G,TMP=1 AND REF(TMP,1)=1,REF(G,1),COLORCYAN),LINETHICK2;
DRAWLINE(ISLASTBAR AND TMP=-3 AND REF(TMP,1)=-3,G,TMP=-3 AND REF(TMP,1)=-3,REF(G,1),COLORYELLOW),LINETHICK2;
DRAWSL(ISLASTBAR AND K2=1,G,0,5,2),COLORCYAN,LINETHICK2;
DRAWSL(ISLASTBAR AND K2=-3,G,0,5,2),COLORYELLOW,LINETHICK2;
DRAWTEXT(FILTERX(CROSS(TMP,0),BARPOS),HX,'卖↓',50),COLOR40FF00;
DRAWTEXT(FILTERX(CROSS(0,TMP),BARPOS),LX,'买↑',-50),COLOR0000FF;
MA55:=MA(CLOSE,55);
DRAWTEXT(FILTERX(CROSS(TMP,0) AND CLOSE<=MA55,BARPOS),HX,'卖↓',50),COLOR40FF00;
DRAWTEXT(FILTERX(CROSS(0,TMP) AND CLOSE>=MA55,BARPOS),LX,'买↑',-50),COLOR0000FF; 先谢谢老师的辛苦,我的要求是只要图中红色箭头的最后一个支撑横线,前面蓝箭头的都不要,出现新的支撑横线后前面的自动消失,若支撑突破后出现压力横线,最近的一个压力横线出现后以前的自动消失,只显示最后的一个压力横线。图为今天的甲醇15分和2小时的。感谢老师。 来源 程序化久久网
老师,这个指标能修改成只显示最后一次的支撑和压力吗?另外把买卖提示提高和降低一些,改成红绿颜色的字体,谢谢老师。
HX:=HHV(HIGH,3);LX:=LLV(LOW,3);
H1:=IFELSE(HX<REF(HX,1) AND HX<REF(HX,2) AND HX<REF(HX,4) AND LX<REF(LX,1) AND LX<REF(LX,3) AND LX<REF(LX,5) AND OPEN>CLOSE AND (HHV(OPEN,0)-CLOSE)>0,REF(HX,4),0);
L1:=IFELSE(LX>REF(LX,1) AND LX>REF(LX,3) AND LX>REF(LX,5) AND HX>REF(HX,1) AND HX>REF(HX,2) AND HX>REF(HX,4) AND OPEN<CLOSE AND (CLOSE-LLV(OPEN,0))>0,REF(LX,4),0);
H2:=VALUEWHEN(H1>0,H1);
L2:=VALUEWHEN(L1>0,L1);
K1:=IFELSE(CLOSE>H2,-3,IFELSE(CLOSE<L2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
G:=IFELSE(K2=1,H2,L2);
TMP:=K2;
DRAWLINE(TMP=1 AND REF(TMP,1)=1,G,TMP=1 AND REF(TMP,1)=1,REF(G,1),COLORCYAN),LINETHICK2;
DRAWLINE(TMP=-3 AND REF(TMP,1)=-3,G,TMP=-3 AND REF(TMP,1)=-3,REF(G,1),COLORYELLOW),LINETHICK2;
DRAWSL(K2=1,G,0,1,0),COLORCYAN,LINETHICK2;
DRAWSL(K2=-3,G,0,1,0),COLORYELLOW,LINETHICK2;
DRAWTEXT(CROSS(TMP,0),HX,'卖↓');
DRAWTEXT(CROSS(0,TMP),LX,'买↑');
MA55:=MA(CLOSE,55);
DRAWTEXT(CROSS(TMP,0) AND CLOSE<=MA55,HX,'卖↓');
DRAWTEXT(CROSS(0,TMP) AND CLOSE>=MA55,LX,'买↑');
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: HX:=HHV(HIGH,3);LX:=LLV(LOW,3);
H1:=IFELSE(HX<REF(HX,1) AND HX<REF(HX,2) AND HX<REF(HX,4) AND LX<REF(LX,1) AND LX<REF(LX,3) AND LX<REF(LX,5) AND OPEN>CLOSE AND (HHV(OPEN,0)-CLOSE)>0,REF(HX,4),0);
L1:=IFELSE(LX>REF(LX,1) AND LX>REF(LX,3) AND LX>REF(LX,5) AND HX>REF(HX,1) AND HX>REF(HX,2) AND HX>REF(HX,4) AND OPEN<CLOSE AND (CLOSE-LLV(OPEN,0))>0,REF(LX,4),0);
H2:=VALUEWHEN(H1>0,H1);
L2:=VALUEWHEN(L1>0,L1);
K1:=IFELSE(CLOSE>H2,-3,IFELSE(CLOSE<L2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
G:=IFELSE(K2=1,H2,L2);
TMP:=K2;
DRAWLINE(ISLASTBAR AND TMP=1 AND REF(TMP,1)=1,G,TMP=1 AND REF(TMP,1)=1,REF(G,1),COLORCYAN),LINETHICK2;
DRAWLINE(ISLASTBAR AND TMP=-3 AND REF(TMP,1)=-3,G,TMP=-3 AND REF(TMP,1)=-3,REF(G,1),COLORYELLOW),LINETHICK2;
DRAWSL(ISLASTBAR AND K2=1,G,0,5,2),COLORCYAN,LINETHICK2;
DRAWSL(ISLASTBAR AND K2=-3,G,0,5,2),COLORYELLOW,LINETHICK2;
DRAWTEXT(FILTERX(CROSS(TMP,0),BARPOS),HX,'卖↓',50),COLOR40FF00;
DRAWTEXT(FILTERX(CROSS(0,TMP),BARPOS),LX,'买↑',-50),COLOR0000FF;
MA55:=MA(CLOSE,55);
DRAWTEXT(FILTERX(CROSS(TMP,0) AND CLOSE<=MA55,BARPOS),HX,'卖↓',50),COLOR40FF00;
DRAWTEXT(FILTERX(CROSS(0,TMP) AND CLOSE>=MA55,BARPOS),LX,'买↑',-50),COLOR0000FF; 先谢谢老师的辛苦,我的要求是只要图中红色箭头的最后一个支撑横线,前面蓝箭头的都不要,出现新的支撑横线后前面的自动消失,若支撑突破后出现压力横线,最近的一个压力横线出现后以前的自动消失,只显示最后的一个压力横线。图为今天的甲醇15分和2小时的。感谢老师。 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容