老师麻烦帮忙改下指标! [博易POBO]
咨询内容:
{在固定位置显示文字}
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;{这三句是MACD系统源码}
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;{定义低位金叉}
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;{低位金叉时MACD柱体黄色显示}
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;{低位金叉时显示白色字体,低位金叉}
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));{统计DEA大于0到现在金叉的周期}
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;{定义二次金叉}
STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;{二次金叉满足时,MACD粉色显示}
DRAWICON(二次金叉,DEA*0.9,1);{二次金叉满足时,下方显示箭头}
DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW;{二次金叉满足时,显示黄色字,二次金叉}
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));{上一次金叉距离现在的周期}
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);{定义底背离}
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;{底背离时,显示绿色柱体}
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;{底背离画,红色线段}
DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;{底背离时,显示粉色字,底背离}
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));{取得上次死叉距离现在的周期}
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);{定义顶背离}
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4; {顶背离画绿色线,属于未来函数}
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2;{三个条件满足时,显示三全项}
DRAWICON(CROSS(DIFF,DEA),0,1);{1号图标显示红箭头};
DRAWICON(CROSS(DEA,DIFF),0,2);{2号图标显示绿箭头};
DRAWICON(CROSS(DEA,DIFF),0,2);{2号图标显示绿箭头};
老师麻烦帮忙改下指标!
DRAWTEXT_FIX(1,0.05,0.0,0,'顶背离绿线跌,底背离红线涨'),COLOR00FFFF,LINETHICK1;{在固定位置显示文字}
DIFF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;{这三句是MACD系统源码}
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;{定义低位金叉}
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;{低位金叉时MACD柱体黄色显示}
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;{低位金叉时显示白色字体,低位金叉}
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));{统计DEA大于0到现在金叉的周期}
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;{定义二次金叉}
STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;{二次金叉满足时,MACD粉色显示}
DRAWICON(二次金叉,DEA*0.9,1);{二次金叉满足时,下方显示箭头}
DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW;{二次金叉满足时,显示黄色字,二次金叉}
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));{上一次金叉距离现在的周期}
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);{定义底背离}
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;{底背离时,显示绿色柱体}
底背:DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;{底背离画,红色线段}
DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;{底背离时,显示粉色字,底背离}
A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));{取得上次死叉距离现在的周期}
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);{定义顶背离}
顶背:DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4; {顶背离画绿色线,属于未来函数}
DRAWTEXT(低位金叉 AND 二次金叉 AND 底背离,0.25,'三全项'),COLOR0000FF,LINETHICK2;{三个条件满足时,显示三全项}
DRAWICON(CROSS(DIFF,DEA),0,1);{1号图标显示红箭头};
DRAWICON(CROSS(DEA,DIFF),0,2);{2号图标显示绿箭头};
DRAWICON(CROSS(DEA,DIFF),0,2);{2号图标显示绿箭头};
来源:程序化99网( WWW.CXH99.COM )
博易技术人员: 老师,这个能改嘛? 来源 程序化久久网
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容