请老师把MACD的箭头改在金叉死叉位置,其他位置不要箭头 [博易POBO]
咨询内容:
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9),LINETHICK1,COLORFFFF00; {QDIF:IF(DEA,DIF,0),COLORRED,LINETHICK2;}
QDIF:DIFF,COLORRED,LINETHICK2; D:=BACKSET(DIFF<REF(DIFF,1),2);
{RDIF:IF(D ,DIF,0),COLOR33FF33,LINETHICK2;}
PARTLINE(D,DIFF),COLOR33FF33,LINETHICK2;
MACD:(DIFF-DEA)*2;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORRED;
STICKLINE(MACD>=0 AND MACD<=REF(MACD,1),0,MACD,0,0),COLORGREEN;
STICKLINE(MACD<=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORFF00FF;
STICKLINE(MACD<=0 AND MACD<=REF(MACD,1),0,MACD,0,0),COLOR00FFFF;
多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND (REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));
空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));
DRAWICON(多转空,MACD*1.002,5);
DRAWICON(空转多,MACD*0.998,4);
{DRAWGBK(1,COLORRGB(0,0,30),COLORRGB(0,0,100),1);}
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
DRAWTEXT(IF(B1>0,1,0),DEA,'底背离');
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(IF(D1>0,1,0),DEA,'顶背离'); <!-- 咨询内容:
DEA:EMA(DIFF,9),LINETHICK1,COLORFFFF00; {QDIF:IF(DEA,DIF,0),COLORRED,LINETHICK2;}
QDIF:DIFF,COLORRED,LINETHICK2; D:=BACKSET(DIFF<REF(DIFF,1),2);
{RDIF:IF(D ,DIF,0),COLOR33FF33,LINETHICK2;}
PARTLINE(D,DIFF),COLOR33FF33,LINETHICK2;
MACD:(DIFF-DEA)*2;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORRED;
STICKLINE(MACD>=0 AND MACD<=REF(MACD,1),0,MACD,0,0),COLORGREEN;
STICKLINE(MACD<=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORFF00FF;
STICKLINE(MACD<=0 AND MACD<=REF(MACD,1),0,MACD,0,0),COLOR00FFFF;
多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND (REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));
空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));
DRAWICON(CROSS(DIFF,DEA),DIFF,5);
DRAWICON(CROSS(DEA,DIFF),DIFF,4);
{DRAWGBK(1,COLORRGB(0,0,30),COLORRGB(0,0,100),1);}
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
DRAWTEXT(IF(B1>0,1,0),DEA,'底背离');
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(IF(D1>0,1,0),DEA,'顶背离'); 中间这两句的参数4和5换一下
DRAWICON(CROSS(DIFF,DEA),DIFF,4);
DRAWICON(CROSS(DEA,DIFF),DIFF,5); 来源 程序化久久网
请老师把MACD的箭头改在金叉死叉位置,其他位置不要箭头
请老师把MACD的箭头改在金叉死叉位置,其他位置不要箭头,谢谢DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9),LINETHICK1,COLORFFFF00; {QDIF:IF(DEA,DIF,0),COLORRED,LINETHICK2;}
QDIF:DIFF,COLORRED,LINETHICK2; D:=BACKSET(DIFF<REF(DIFF,1),2);
{RDIF:IF(D ,DIF,0),COLOR33FF33,LINETHICK2;}
PARTLINE(D,DIFF),COLOR33FF33,LINETHICK2;
MACD:(DIFF-DEA)*2;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORRED;
STICKLINE(MACD>=0 AND MACD<=REF(MACD,1),0,MACD,0,0),COLORGREEN;
STICKLINE(MACD<=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORFF00FF;
STICKLINE(MACD<=0 AND MACD<=REF(MACD,1),0,MACD,0,0),COLOR00FFFF;
多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND (REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));
空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));
DRAWICON(多转空,MACD*1.002,5);
DRAWICON(空转多,MACD*0.998,4);
{DRAWGBK(1,COLORRGB(0,0,30),COLORRGB(0,0,100),1);}
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
DRAWTEXT(IF(B1>0,1,0),DEA,'底背离');
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(IF(D1>0,1,0),DEA,'顶背离'); <!-- 咨询内容:
附件 :
-->
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);DEA:EMA(DIFF,9),LINETHICK1,COLORFFFF00; {QDIF:IF(DEA,DIF,0),COLORRED,LINETHICK2;}
QDIF:DIFF,COLORRED,LINETHICK2; D:=BACKSET(DIFF<REF(DIFF,1),2);
{RDIF:IF(D ,DIF,0),COLOR33FF33,LINETHICK2;}
PARTLINE(D,DIFF),COLOR33FF33,LINETHICK2;
MACD:(DIFF-DEA)*2;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORRED;
STICKLINE(MACD>=0 AND MACD<=REF(MACD,1),0,MACD,0,0),COLORGREEN;
STICKLINE(MACD<=0 AND MACD>=REF(MACD,1),0,MACD,0,0),COLORFF00FF;
STICKLINE(MACD<=0 AND MACD<=REF(MACD,1),0,MACD,0,0),COLOR00FFFF;
多转空:=((((LLV(MACD,4)>0) AND (MACD<REF(MACD,1))) AND (REF(MACD,1)>REF(MACD,2))) AND (REF(MACD,2)>REF(MACD,3)));
空转多:=((((HHV(MACD,4)<0) AND (MACD>REF(MACD,1))) AND (REF(MACD,1)<REF(MACD,2))) AND (REF(MACD,2)<REF(MACD,3)));
DRAWICON(CROSS(DIFF,DEA),DIFF,5);
DRAWICON(CROSS(DEA,DIFF),DIFF,4);
{DRAWGBK(1,COLORRGB(0,0,30),COLORRGB(0,0,100),1);}
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
DRAWTEXT(IF(B1>0,1,0),DEA,'底背离');
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(IF(D1>0,1,0),DEA,'顶背离'); 中间这两句的参数4和5换一下
DRAWICON(CROSS(DIFF,DEA),DIFF,4);
DRAWICON(CROSS(DEA,DIFF),DIFF,5); 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容