CR带状能量线指标 通达信公式(附图)

[复制链接]
查看166 | 回复0 | 2021-8-20 19:43:10 | 显示全部楼层 |阅读模式

DRAWGBK(C>0, RGB(1,0,1),RGB(1,0,1),0,'0',0);
NN:=26;M1:=10;M2:=20;M3:=40;M4:=62;
MID:=REF(HIGH+LOW,1)/2;
CR:SUM(MAX(0,HIGH-MID),NN)/SUM(MAX(0,MID-LOW),NN)*100,NODRAW,COLORWHITE;
STICKLINE(C>0,REFDATE(LLV(CR,120),DATE),90,28,-1)COLORLICYAN;
STICKLINE(C>0,REFDATE(LLV(CR,120),DATE),40,28,-1)COLORYELLOW;
DRAWTEXT(ISLASTBAR,90,' ██'),COLORBLACK;
DRAWTEXT(ISLASTBAR,90,' 90')COLORCYAN;
MA1:REF(MA(CR,M1),M1/2.5+1)NODRAW,COLORYELLOW;
MA2:REF(MA(CR,M2),M2/2.5+1)NODRAW,COLORMAGENTA;
MA3:REF(MA(CR,M3),M3/2.5+1)NODRAW,COLORGREEN;
MA4:REF(MA(CR,M4),M4/2.5+1)NODRAW,COLORCYAN;
DRAWBAND(MA3,RGB(80,16,0),MA4,RGB(80,64,64));
DRAWBAND(MA1,RGB(150,50,50),MA2,RGB(0,50,150));
NOTEXT:SUM(MAX(0,HIGH-MID),NN)/SUM(MAX(0,MID-LOW),NN)*100,COLORWHITE,LINETHICK2;
DRAWTEXT(ISLASTBAR,CR,' ←CR'),COLORWHITE;
STICKLINE(CROSS(CR,MA1),REFDATE(HHV(CR,120),DATE),REFDATE(LLV(CR,120),DATE),0,-1)COLORYELLOW;
AA1:=CR>MA1 AND CR>MA2 AND CR>MA3 AND CR>MA4;
AA2:=AA1 AND AA1!=REF(AA1,1);
STICKLINE(AA2,REFDATE(HHV(CR.CR,120),DATE),CR,0,-1)COLORRED;
{}
DRAWTEXT_FIX(1,0.40,0.00,0,'黄虚线--CR上穿MA1(可能有行情);红虚线--CR同时大于4线(强势);'),COLORWHITE;

 

回复

使用道具 举报

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

本版积分规则