通达信空调主图均衡加仓买线指标公式

[复制链接]
查看82 | 回复0 | 2021-8-19 16:21:14 | 显示全部楼层 |阅读模式

以下是通达信空调主图均衡加仓买线指标公式(无源码的请下载附件导入)

空调主图(均衡、加仓、买线)-指标公式源码

{N:5,30,13;参数N,短线选8,中线选13,长线选21;}
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA60:=MA(CLOSE,60);
MA120:=MA(CLOSE,120);
{彩带}
DRAWBAND(MA60,RGB(86,0,0),MA120,RGB(0,86,0));
DRAWBAND(MA5,RGB(128,0,128),MA10,RGB(20,92,100));
高山:HHV(MA(H,N),N),COLORRED,LINETHICK2;
流水:MA(H,N),COLORFFFFFF,LINETHICK2;
出水:=IF(C>HHV(MA(H,N),8) AND HHV(MA(H,N),8)>MA(H,N),1,0);
回踩:=IF((CROSS(MA(H,N),L) OR CROSS(MA(H,N)*1.01,C))AND BARSLAST(出水)<=5,1,0);
STICKLINE(出水,(C+O)/2,(C+O)/2,3,0),COLORFF00FF;
STICKLINE(出水,H,L,0,0),COLORFF00FF;
DRAWTEXT(回踩,L, '↑'),COLORFFFFFF;
HHV(流水,2),COLOR00FF00;
HHV(流水,3),COLOR00FF00;
HHV(流水,4),COLOR00FF00;
HHV(流水,5),COLOR00FF00;
HHV(流水,6),COLOR00FF00;
HHV(流水,7),COLOR00FF00;
HHV(流水,8),COLOR00FF00;
HHV(MA(H,N),N),COLORRED,LINETHICK2;
空:=EMA(C,5);
均衡:=EMA(空,5);
中轨:=HHV(MA(H,13),13);
趋势:=LLV(MA(H,13),1);
VAR1R:=(HIGH+LOW+OPEN+2*CLOSE)/5;
VAR2R:=REF(VAR1R,1);
VAR3R:=SMA(MAX(VAR1R-VAR2R,0),10,1)/SMA(ABS(VAR1R-VAR2R),10,1)*100;
VAR4R:=FILTER(IF(COUNT(VAR3R<20,5)>=1 AND COUNT(VAR1R=LLV(VAR1R,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0),5);
DRAWICON(VAR4R,LOW,1);
VAR5R:=FILTER(均衡>REF(均衡,1)AND 中轨<REF(中轨,1)AND C>REF(C,1),11);
DRAWTEXT(VAR5R,LOW*0.985,'加仓'),COLORYELLOW;
DRAWTEXT(VAR5R,LOW*0.995,'^' ),COLORYELLOW;
VAR6R:=REF(CLOSE,1);
VAR7R:=SMA(MAX(CLOSE-VAR6R,0),6,1)/SMA(ABS(CLOSE-VAR6R),6,1)*100;
DRAWTEXT(CROSS(84,VAR7R),H*1.035,'减仓'),COLOR00FF00 ;
DRAWTEXT(CROSS(84,VAR7R),H*1.015,'◇' ),COLOR00FF00;
买线:=EMA(C,2);
操盘线:(MA(C,30)+MA(C,72))/2,COLORYELLOW,LINETHICK2;
趋势线:EMA(EMA(EMA(EMA(CLOSE,2),2),5),5),LINETHICK2,COLORFFFF00;
{生命线:EMA(CLOSE,60),COLORRED,LINETHICK2;}
卖线:=EMA(SLOPE(C,21)*20+C,42);
BU:=CROSS(买线,卖线);
SEL:=CROSS(卖线,买线);
STICKLINE(买线>=卖线,LOW,HIGH,0,1),COLORRED;
STICKLINE(买线>=卖线,CLOSE,OPEN,3.2,1),COLORRED;
STICKLINE(买线<卖线,LOW,HIGH,0,1),COLORGREEN;
STICKLINE(买线<卖线,CLOSE,OPEN,3.2,1),COLORGREEN;

STICKLINE(BU,OPEN,CLOSE,3.2,0),COLORYELLOW;
STICKLINE(SEL,OPEN,CLOSE,3.2,0),COLORBLUE;

回复

使用道具 举报

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

本版积分规则