手机版 官方微博
官方微信
扫描关注:理想财富微信公众号
理想论坛App
扫描下载理想论坛App
RSS

请老师帮助文华MACD修改

[其 他]
设置
1415 1 理想281473 Lv.1 发表于 · 2020-6-23 14:40 举报 显示全部楼层 复制 正序浏览 |
跳转到指定楼层
这个指标是我在理想下载的不是原创的,但是我发现指标中的表情会有未来,但是其他的数据好像没有未来,不知道是什么原因,如果大神看见的话麻烦瞧一下能不能改成没有未来的表情,十分感谢!

DIF1:=EMA(CLOSE,12) - EMA(CLOSE,27),LINETHICK1;
DEA1:=EMA(DIF1,9),LINETHICK1;
MACD1:=2*(DIF1-DEA1),STICK;
MACD2:=EMA(MACD1,3);
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,3.0,0),COLOR1D0123;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,2.5,0),COLOR390147;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1.8,0),COLOR57026C;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,1.3,0),COLOR770394;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.8,0),COLOR8F02B3;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.3,0),COLORA203C9;
STICKLINE(MACD1>MACD2 AND MACD1>0,0,MACD1,0.03,0),COLORDB53FD;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,3.0,0),COLOR555555;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,2.5,0),COLOR777777;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1.8,0),COLOR999999;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,1.3,0),COLORBBBBBB;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.8,0),COLORDDDDDD;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.3,0),COLORFFFFFF;
STICKLINE(MACD1>MACD2 AND MACD1<0,0,MACD1,0.03,0),COLORFAFAFA;
STICKLINE(MACD1<MACD2,0,MACD1,3.0,0),COLOR310000;
STICKLINE(MACD1<MACD2,0,MACD1,2.5,0),COLOR6A0000;
STICKLINE(MACD1<MACD2,0,MACD1,1.8,0),COLOR820000;
STICKLINE(MACD1<MACD2,0,MACD1,1.3,0),COLORA60000;
STICKLINE(MACD1<MACD2,0,MACD1,0.8,0),COLORD20000;
STICKLINE(MACD1<MACD2,0,MACD1,0.3,0),COLORF20000;
STICKLINE(MACD1<MACD2,0,MACD1,0.03,0),COLORFF2424;
STICKLINE(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;
DIF:DIF1,COLOR0000FF;
DEA:DEA1,COLORYELLOW;
MACD:MACD1,NODRAW,COLORMAGENTA;
金1:CROSS(DIF1,DEA1) AND DIF1<-0.1;
JCCOUNT:=COUNT(CROSS(DIF1,DEA1),BARSLAST(DEA1>=0));
二金:=CROSS(DIF1,DEA1) AND DEA1<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二金,0,0.5,6,0),COLOR040E86;
STICKLINE(二金,0,0.5,4,0),COLOR061AC4;
STICKLINE(二金,0,0.5,2,0),COLOR090FF9;
STICKLINE(二金,0,0.5,0.3,0),COLOR45ACF8;
STICKLINE(二金,0,0.5,0.1,0),COLORBBE1F9;
DRAWICON(二金,DEA1*0.9,1) ;
DRAWTEXT(二金,0.4,' 二金'),COLORYELLOW;
强度:IF(DIF1>=DEA1,DIF1,NULL),COLORRED,LINETHICK2;
A1:=BARSLAST(REF(CROSS(DIF1,DEA1),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF1>REF(DIF1,A1+1) AND CROSS(DIF1,DEA1);
STICKLINE(底背离,0,0.25,6,0),COLOR264101;
STICKLINE(底背离,0,0.25,4,0),COLOR008000;
STICKLINE(底背离,0,0.25,2,0),COLOR00FF80;
STICKLINE(底背离,0,0.25,0.3,0),COLOR00FFFF;
DRAWLINE(A1=0,DEA1,底背离,DEA1,0),COLORYELLOW,LINETHICK5;
DRAWTEXT(底背离,0.1,' 底背'),COLORYELLOW;
A2:=BARSLAST(REF(CROSS(DEA1,DIF1),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF1,A2+1)>DIF1 AND CROSS(DEA1,DIF1);
DRAWLINE(A2=0,DEA1,顶背离,DEA1,0),COLORCYAN,LINETHICK4;
DRAWTEXT(顶背离,0.1,'顶背'),COLORGREEN;
OBV:=DIF;      
P:=5;
AA1:=REF(OBV,P)=HHV(OBV,2*P+1);
B1:=FILTER(AA1,P);
C1:=BACKSET(B1,P+1);
D1:=FILTER(C1,P);
AA2:=REF(OBV,P)=LLV(OBV,2*P+1);
B2:=FILTER(AA2,P);
C2:=BACKSET(B2,P+1);
D2:=FILTER(C2,P);
上:REF(OBV,BARSLAST(D1)),COLORFF00FF,NODRAW;
下:REF(OBV,BARSLAST(D2)),COLOR00FF00,NODRAW;
向上:CROSS(OBV,上*1.01),NODRAW;
相对能量:(OBV-下)/(上-下)*100,COLORYELLOW,NODRAW;
R11:=BACKSET(ISLASTBAR,BARSLAST(D1)+1);
S11:=R11>REF(R11,1);
DRAWLINE(D1,OBV,S11,OBV,1),COLOR0080FF;
T11:=BACKSET(ISLASTBAR,BARSLAST(D2)+1);
U11:=T11>REF(T11,1);
DRAWLINE(D2,OBV,U11,OBV,1),COLORFF0000;
STICKLINE(C>0,下,下,1,0),COLOR00FF00;
STICKLINE(C>0,上,上,1,0),COLORFF00FF;
DRAWTEXT(CROSS(OBV,上*1.01),上,'上'),COLORYELLOW;
DRAWTEXT(CROSS(下*0.99,OBV),下,'下'),COLORYELLOW;
DRAWICON(D1,OBV,39);
DRAWICON(D2,OBV,38);
DRAWTEXT(金1 AND 二金 AND 底背离,0.25,'金手指'),COLORYELLOW,LINETHICK2;
SHORT:=6;
LONG:=9;
MID:=3;
DIF11:=EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),LINETHICK1,COLOR0000FF;
DEA11:=EMA(DIF11,MID);
向下:=IF(DIF11<REF(DIF,1),DIF11,NULL),COLORGREEN,LINETHICK2;
强势区:=IF((EVERY(向下>=REF(向下,1),1)),-0.2,0),COLOR0000FF,LINETHICK3;
买入信号:IF(((CROSS(-0.01,强势区)) AND DIF<0),0.3,0),STICK,COLORGREEN,LINETHICK3;

举报

扔鸡蛋(0) 回复

雨石100
Lv.3
发表于 2020-6-26 22:54 复制 查看全部楼层
BACKSET,drawline这个未来函数基本无解。想想其他的思路实现。

举报

点亮(0) 扔鸡蛋(0) 回复

您需要登录后才可以回帖 登录

本版积分规则 《理想财富服务协议》《免责声明》

论坛问题
微信扫一扫,添加好友咨询
驿站问题
微信扫一扫,添加好友咨询
广告投放
微信扫一扫,添加好友咨询
回顶部 到页底
快速回复 返回顶部 返回列表