股票论坛

 找回密码
 免费注册
搜索
热搜: 活动 交友 discuz
查看: 2426|回复: 1
打印 上一主题 下一主题

请教,画线能不偏移吗?

[复制链接]

指标研习组

Rank: 11Rank: 11Rank: 11Rank: 11

听众
3
跳转到指定楼层
楼主
发表于 2015-8-12 19:58 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
10爱心果
以下画线总有点偏移
请求老师给个画线不偏移的完美代码?

DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2;
DEA:EMA(DIF,9),COLORWHITE,LINETHICK2;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
底背:RAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK4;
DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
顶背:RAWLINE(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4;

最佳答案

查看完整内容

DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2; DEA:EMA(DIF,9),COLORWHITE,LINETHICK2; A1:=BARSLAST(REF(CROSS(DIF,DEA),1)); 底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA); STICKLINE(底背离,0,0.03,6,0),COLOR00FF00; 底背:RAWLINE(REFX(A1=0,1),DEA,底背离,DEA,0),COLORRED,LINETHICK4; DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF; A2:=BARSLAST(REF(CROSS(DEA,DIF),1)); 顶 ...

刺使

Rank: 6Rank: 6

听众
3
沙发
发表于 2015-8-12 19:58 | 只看该作者
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORRED,LINETHICK2;
DEA:EMA(DIF,9),COLORWHITE,LINETHICK2;
A1:=BARSLAST(REF(CROSS(DIF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) AND CROSS(DIF,DEA);
STICKLINE(底背离,0,0.03,6,0),COLOR00FF00;
底背:RAWLINE(REFX(A1=0,1),DEA,底背离,DEA,0),COLORRED,LINETHICK4;
DRAWTEXT(底背离,0.12,' 底背离'),COLORFF00FF;
A2:=BARSLAST(REF(CROSS(DEA,DIF),1));
顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF AND CROSS(DEA,DIF);
顶背:RAWLINE(REFX(A2=0,1),DEA,顶背离,DEA,0),COLORGREEN,LINETHICK4;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|站点首页|手机版|小黑屋|帮助中心|桂ICP备14001964号

GMT+8, 2024-11-24 08:51 , Processed in 0.145683 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表