2023彩色改编MACD 顶底背离抓金叉《通达信 副图 选股 源码 ...

[复制链接]
查看37932 | 回复2 | 2023-2-27 13:15 | 显示全部楼层 |阅读模式
叶梵宸指标论坛免责声明
叶梵宸指标公式网(www.yefanchen.com)提醒您:本版块指标由市场整理提供 本指标不提供安装指导与使用方法 源码指标自行复制下载后 自行研究 股市是具有不确定性和不可预测性的,请正常对待和使用指标公式!如存在原创侵权问题 联系本平台客服 谢谢配合
63fc3c2316bbc.png
副图公式源码 :支持手机/电脑
DIFF:EMA(CLOSE,5) - EMA(CLOSE,34),COLORFF00FF;

DEA:EMA(DIFF,5),COLORLIBLUE;

MACD:=2*(DIFF-DEA);

ZERO:0,COLORLIBLUE;

GUP:=MAX(C,O);

STICKLINE(MACD>0 AND MACD>=REF(MACD,1),0,MACD,2,0),COLOR0000FF;

STICKLINE(MACD>0 AND MACD<REF(MACD,1),0,MACD,2,0),COLORFFFF00;

STICKLINE(MACD<0 AND MACD>=REF(MACD,1),0,MACD,2,0),COLORFF00FF;

STICKLINE(MACD<0 AND MACD<REF(MACD,1),0,MACD,2,0),COLOR00FF00;

L4:=LLV(GUP,4);

JL:=(HHV(DIFF,55)-LLV(DIFF,55))/5;

GT:=DEA>REF(DEA,1) AND REF(DEA,1)<REF(DEA,2);

GUP1:=BARSLAST(REF(GT,1));

底背离:=REF(L4,GUP1+1)>CLOSE AND DIFF>REF(DIFF,GUP1+1) AND GT;

DRAWTEXT(底背离,REF(DEA,GUP1)*1.18,' 底背'),COLORFF00FF;

H4:=HHV(GUP,4);

GT2:=DEA<REF(DEA,1) AND REF(DEA,1)>REF(DEA,2);

GUP2:=BARSLAST(REF(GT2,1));

顶背离:= REF(H4,GUP2+1)<H4 AND DIFF<REF(DIFF,GUP2+1) AND GT2;

DRAWTEXT(顶背离,REF(DEA,GUP2)*1.18,' 顶背'),COLORGREEN;

GUP0:=DIFF<0 AND DEA<0;

GUP11:=GUP0>REF(GUP0,1);

GUP3:=BARSLAST(GUP11);

GUP4:=COUNT(DEA>0 AND DIFF >0,GUP3)=0;

GUP5:=CROSS(DIFF ,DEA);

GUP6:=BARSLAST(GUP5);

GUP7:=REF(GUP6,GUP6+1)+GUP6;

GUP8:=(DIFF+DEA)/2;

GUP9:=(HIGH+LOW)/2;

GUP10:=GUP5 AND GUP7<GUP3 AND GUP4 AND GUP8>REF(GUP8,GUP7) AND GUP9<REF(GUP9,GUP7) AND MACD>0;

DRAWTEXT(GUP10,DIFF*0.95,'↑金叉'),COLORYELLOW;

DRAWICON(CROSS(DIFF,DEA),DEA,1);

DRAWICON(CROSS(DEA,DIFF),DIFF,2);




选股公式源码


{选股公式一:金叉}

DIFF:=EMA(CLOSE,5) - EMA(CLOSE,34),COLORFF00FF;

DEA:=EMA(DIFF,5),COLORLIBLUE;

MACD:=2*(DIFF-DEA);

GUP0:=DIFF<0 AND DEA<0;

GUP11:=GUP0>REF(GUP0,1);

GUP3:=BARSLAST(GUP11);

GUP4:=COUNT(DEA>0 AND DIFF >0,GUP3)=0;

GUP5:=CROSS(DIFF ,DEA);

GUP6:=BARSLAST(GUP5);

GUP7:=REF(GUP6,GUP6+1)+GUP6;

GUP8:=(DIFF+DEA)/2;

GUP9:=(HIGH+LOW)/2;

GUP10:=GUP5 AND GUP7<GUP3 AND GUP4 AND GUP8>REF(GUP8,GUP7) AND GUP9<REF(GUP9,GUP7) AND MACD>0;

金叉:GUP10;

{选股公式二:底背}

DIFF:=EMA(CLOSE,5) - EMA(CLOSE,34),COLORFF00FF;

DEA:=EMA(DIFF,5),COLORLIBLUE;

GUP:=MAX(C,O);

L4:=LLV(GUP,4);

JL:=(HHV(DIFF,55)-LLV(DIFF,55))/5;

GT:=DEA>REF(DEA,1) AND REF(DEA,1)<REF(DEA,2);

GUP1:=BARSLAST(REF(GT,1));

底背离:=REF(L4,GUP1+1)>CLOSE AND DIFF>REF(DIFF,GUP1+1) AND GT;

底背:底背离;



{选股公式三:红箭头}

DIFF:=EMA(CLOSE,5) - EMA(CLOSE,34),COLORFF00FF;

DEA:=EMA(DIFF,5),COLORLIBLUE;

红箭头:CROSS(DIFF,DEA);

漂泊浪子 | 2023-4-2 19:48 | 显示全部楼层
学习了
回复

使用道具 举报

漂泊浪子 | 2023-4-2 19:48 | 显示全部楼层
学习了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则