通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
均线变色指标公式源码
M1:=18;N:=3;
MA2:=MA(C,M1);
MAVOL18:=MA(V,M1);
价向上:=IF(COUNT(MA2>=REF(MA2,1),N)=n,1,0);
量向上:=IF(COUNT(MAVOL18>=REF(MAVOL18,1),N)=n,1,0);
价向下:=IF(COUNT(MA2<REF(MA2,1),N)=n,1,0);
量向下:=IF(COUNT(MAVOL18<REF(MAVOL18,1),N)=n,1,0);
多头:IF((价向上+量向上)>1,1,0);
空头:IF((价向下+量向下)>1,1,0);
价下1:IF((量向上+价向下)>1,1,0);
量下2:IF((量向下+价向上)>1,1,0);
DRAWTEXTABS(5,4,'MA1上穿控盘成本可以看多,活跃度出现黄柱小心,副图-奥斯卡金叉对应主图粉K线是买点)'),linethick2,ColorFFFF00;
F:=100*(C-REF(C,1))/REF(C,1);
今小昨:=IF(C<REF(O,1) AND f<0,1,0);
p1:=今小昨;
今小前:=IF(C<REF(O,2) AND f<0,1,0);
p2:=今小前;
stickline(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,open,CLOSE,6,0),COLORMAGENTA;
stickline(P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0,open,CLOSE,3,0),COLORBLUE;
阻力线:EMA(EMA(C,37),35),COLORFF00FF,LINETHICK2;
控盘成本30: COST(4),COLOR00FF00;
MA1:MA(CLOSE,5);
MA112:MA(CLOSE,112);
MA243:MA(CLOSE,243),COLORYELLOW;
生命线:MA(CLOSE,26),COLORRED,LINETHICK2;STICKLINE(C>=生命线 AND C>=O,C,O,7,0),COLORRED;STICKLINE(C>=生命线 AND C>=O,H,L,0,0),COLORRED;
MA64:=MA(CLOSE,64);
PARTLINE(MA64,(MA64-REF(MA64,1))>0,RGB(255,0,0),
(MA64-REF(MA64,1))<0,RGB(0,255,0),
1,RGB(0,0,255));
MA256:=MA(CLOSE,256);
PARTLINE(MA256,MA256-REF(MA256,1)>0,RGB(255,0,0),
MA256-REF(MA256,1)<0,RGB(0,255,0),
1,RGB(0,0,255));
M均:(MA64+MA256)/2,coloryellow,LINETHICK1;
变色双均线指标
a1:ema((ema(close,1)+ema(close,3)+ema(close,5))/3,3),colorred;
a2:ema((ema(close,3)+ema(close,5)+ema( close,7))/3,3),colorred;
a3:ema((ema(close,5)+ema(close,7)+ema( close,9))/3,3),colorred;
a4:ema((ema(close,7)+ema(close,9)+ema( close,11))/3,3),colorred;
a5:ema((ema(close,9)+ema(close,11)+ema( close,13))/3,3),colorred;
a6:ema((ema(close,11)+ema(close,13)+ema( close,15))/3,3),colorred;
a7:ema((ema(close,13)+ema(close,15)+ema( close,17))/3,3),colorred;
a8:ema((ema(close,15)+ema(close,17)+ema( close,19))/3,3),colorred;
a9:ema((ema(close,17)+ema(close,19)+ema( close,21))/3,3),coloryellow;
a10:ema((ema(close,19)+ema(close,21)+ema( close,23))/3,3),coloryellow;
a11:ema((ema(close,21)+ema(close,23)+ema( close,25))/3,3),coloryellow;
A:ema((EMA(close,29)+EMA(close,31)+EMA(close,33))/3,3),coloryellow;
B:=REF(A,1);
drawtext(a>b,(a+b)/2,'★'), COLORff00ff;
drawtext(a<=b,(a+b)/2,'☆'), COLORgreen;
{STICKLINE(A>B,A,B,8,0),COLORff00ff;
STICKLINE(A<=B,A,B,8,1),COLORff0000;}
a15:a-(a1-a*0.997),colorFF1010;
a16:a-(a2-a),colorff2010;
a17:a-(a3-a),colorff3010;
a18:a-(a4-a),colorff4010;
a19:a-(a5-a),colorff5010;
a20:a-(a6-a),colorff6010;
a21:a-(a7-a),colorff7010;
a22:a-(a8-a),colorff8010;
a23:a-(a9-a),colorff9010;
a24:a-(a10-a),colorffc010;
a25:a-(a11-a*0.997),colorffe010;
STICKLINE(open>=close ,O,C,9,0 ),COLORaaaaaa;
STICKLINE(open>=close ,O,C,6,0 ),COLORbbbbbb;
STICKLINE(open>=close ,O,C,2.4,0 ),COLORcccccc;
STICKLINE(open>=close ,O,C,1.1,0 ),COLORdddddd;
STICKLINE(close>open,O,C,9,0 ),COLOr6666cc;
STICKLINE(close>open,O,C,6 ,0 ),COLOR7777dd;
STICKLINE(close>open,O,C,2.4 ,0 ),COLOR8888ee;
STICKLINE(close>open,O,C,1.1 ,0 ),COLOR9999ff;
STICKLINE(close>open,open,low,0.5,0 ),COLOR1199ff;
STICKLINE(close>open,close,HIGH,0.5 ,0 ),COLOR1199ff;
STICKLINE(open>=close,close,low,0.5 ,0 ),COLORcccccc;
STICKLINE(open>=close,open,HIGH,0.5 ,0 ),COLORcccccc;
var31:=hhvbars(zig(3, 19)>ref(zig(3,19),1) and ref(zig(3,19), 1)<ref(zig(3,19), 2),0);
stickline(var31=2,l*0.95,l*0.98,8,0),color0000ff;
drawtext(var31=2,l*0.95,'3天'),coloryellow;
stickline(var31=4,h*1.05,h*1.02,8,0),color9966ff;
drawtext(var31=4,h*1.06,'5天'),coloryellow;
stickline(var31=7,l*0.95,l*0.98,8,0),color00ffff;
drawtext(var31=7,l*0.95,'8天'),coloryellow;
stickline(var31=12,h*1.05,h*1.02,8,0),colorff33ff;
drawtext(var31=12,h*1.06,'13天'),coloryellow;
stickline(var31=20,l*0.95,l*0.98,8,0),color0066ff;
drawtext(var31=20,l*0.95,'21天'),coloryellow;
stickline(var31=33,h*1.05,h*1.02,8,0),colorffff00;
drawtext(var31=33,h*1.06,'34天'),coloryellow;
stickline(var31=54,l*0.95,l*0.98,8,0),color006600;
drawtext(var31=54,l*0.95,'55天'),coloryellow;
stickline(var31=88,h*1.05,h*1.02,8,0),color00ff00;
drawtext(var31=88,h*1.06,'89天'),coloryellow;
stickline(var31=143,l*0.95,l*0.98,8,0),colorccffff;
drawtext(var31=143,l*0.95,'144天'),coloryellow;
stickline(var31=232 ,h*1.05,h*1.02,8,0),colorff0033;
drawtext(var31=232,h*1.06,'233天'),coloryellow;
stickline(var31=376,l*0.95,l*0.98,8,0),colorff9966;
drawtext(var31=376,l*0.95,'377天'),coloryellow;
A3 :(EMA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,15))/3,colorff00ff;
a4 :(EMA(CLOSE,20)+MA(CLOSE,25)+MA(CLOSE,30))/3,color00ff00;
A5 :(EMA(CLOSE,40)+MA(CLOSE,50)+MA(CLOSE,60))/3,coloryellow;
a6 :(EMA(CLOSE,80)+MA(CLOSE,85)+MA(CLOSE,90))/3,colorff9900;
A7 :(EMA(CLOSE,120)+MA(CLOSE,130)+MA(CLOSE,150))/3,color0000ff;
a8 :(EMA(CLOSE,160)+MA(CLOSE,170)+MA(CLOSE,180))/3,coloryellow;
A9 :(EMA(CLOSE,200)+MA(CLOSE,225)+MA(CLOSE,250))/3,color00ff00;
V1:EMA(CLOSE,5),Color00FFFF;
V2:EMA((EMA(CLOSE,29))*(1.01),10),ColorFF00FF;
DRAWICON(CROSS(V1,V2),V2,1),Color00FF00;
V3:EMA(CLOSE,10),ColorFFFFFF;
V4:EMA((EMA(CLOSE,60))*(0.99),10),ColorFFFF00;
DRAWICON(CROSS(V3,V4),V2,1),Color0000FF;
VF1:=MA(CLOSE,60)-MA(CLOSE,5)/3.2;
DRAWTEXT(IF(CLOSE<VF1 AND VOL/240>MA(VOL,5)/240 AND CLOSE>=REF(CLOSE,1)*1.08 AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW,'☆'),colorred;
VarA:=(CLOSE-REF(OPEN,29))/REF(OPEN,29)*100;
VarB:=EMA(0.667*REF(VarA,1)+0.333*VarA,5);
DRAWTEXT(IF(VOL>=1.3*MA(VOL,5) AND COUNT(VarA>=VarB and VarA<-17,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW,'★注意买入');
Varr1:=SMA(MAX(CLOSE-ref(c,1),0),12,1)/SMA(ABS(CLOSE-ref(c,1)),15,1)*100;
DRAWICON(CROSS(82,Varr1),HIGH,2);
DRAWTEXT(CROSS(82,Varr1),high,'快卖↓'),coloryellow;
Var1:=(HIGH+LOW+OPEN+2*CLOSE)/5;
Var2:=REF(Var1,1);
Var3:=SMA(MAX(Var1-Var2,0),10,1)/SMA(ABS(Var1-Var2),10,1)*100;
HY3:=IF(COUNT(Var3<20,5)>=1 AND COUNT(Var1=LLV(Var1,10),10)>=1 AND CLOSE>=OPEN*1.038 AND VOL>MA(VOL,5)*1.2,1,0);
DRAWTEXT(hy3,low,'▲买入'),colorred;
评论(0)