通达信指标公式源码概况:
指标类别: 通达信指标公式
授权方式: 免费版
指标评级: ★★★★★
指标分类: 策略
画线方法: 副图
一、通达信三色指标公式源码
{主趋势线:EMA(EMA(C,10),10),COLORBLUE,LINETHICK3;
B:=主趋势线<REF(主趋势线,1);
IF(B-1,主趋势线,DRAWNULL)COLORRED,LINETHICK3;}
主趋势线:EMA(EMA(C,10),10),COLORRED,LINETHICK3;
B:=主趋势线>REF(主趋势线,1);
IF(B-1,主趋势线,DRAWNULL)COLORBLUE,LINETHICK3;
{操盘线:EMA(EMA(C,5),5),COLORRED,LINETHICK2;
Y:=操盘线>REF(操盘线,1);
IF(Y-1,操盘线,DRAWNULL)COLORGREEN,LINETHICK2;}
AA:=EMA(C,5)>EMA(C,20);
BB:=EMA(C,5)<EMA(C,20);
CC:=EMA(C,5)>EMA(C,10);
CC1:=EMA(C,5)<EMA(C,10);
DD:=CLOSE<OPEN;
STICKLINE(AA,H,L,0,0),COLORRED;
STICKLINE(AA,O,C,3,1),COLORRED;
STICKLINE(AAANDDD,O,C,3,0),COLORRED;
STICKLINE(BB,H,L,0,0),COLORGREEN;
STICKLINE(BB,O,C,3,1),COLORGREEN;
STICKLINE(BBANDDD,O,C,3,0),COLORGREEN;
STICKLINE(BBANDCC,H,L,0,1),COLORWHITE;
STICKLINE(BBANDCC,O,C,3,1),COLORWHITE;
STICKLINE(BBANDCCANDDD,O,C,3,0),COLORWHITE;
STICKLINE(AAANDCC1,H,L,0,0),COLORWHITE;
STICKLINE(AAANDCC1,O,C,3,1),COLORWHITE;
STICKLINE(AAANDCC1ANDDD,O,C,3,0),COLORWHITE;
AAA:=CONST(HHV(C,90));
{DRAWTEXT(T1=1ANDCURRBARSCOUNT=58,AAA,'智能分析:目前处于红色买区,上涨趋势良好,多单持有。'),COLORRED,LINETHICK4;}
DRAWTEXT(CANDCURRBARSCOUNT=80,AAA,'红色K线做多,绿色K线做空,白色K线观望。'),COLORYELLOW;
主趋势线:EMA(EMA(C,10),10),COLORRED,LINETHICK3;
B:=主趋势线>REF(主趋势线,1);
IF(B-1,主趋势线,DRAWNULL)COLORBLUE,LINETHICK3;
AA:=EMA(C,5)>EMA(C,20);
BB:=EMA(C,5)<EMA(C,20);
CC:=EMA(C,5)>EMA(C,10);
CC1:=EMA(C,5)<EMA(C,10);
DD:=CLOSE<OPEN;
STICKLINE(AA,H,L,0,0),COLORRED;
STICKLINE(AA,O,C,3,1),COLORRED;
STICKLINE(AAANDDD,O,C,3,0),COLORRED;
STICKLINE(BB,H,L,0,0),COLORGREEN;
STICKLINE(BB,O,C,3,1),COLORGREEN;
STICKLINE(BBANDDD,O,C,3,0),COLORGREEN;
STICKLINE(BBANDCC,H,L,0,1),COLORWHITE;
STICKLINE(BBANDCC,O,C,3,1),COLORWHITE;
STICKLINE(BBANDCCANDDD,O,C,3,0),COLORWHITE;
STICKLINE(AAANDCC1,H,L,0,0),COLORWHITE;
STICKLINE(AAANDCC1,O,C,3,1),COLORWHITE;
STICKLINE(AAANDCC1ANDDD,O,C,3,0),COLORWHITE;
AAA:=CONST(HHV(C,90));
DRAWTEXT(CANDCURRBARSCOUNT=80,AAA,'红色K线做多,绿色K线做空,白色K线观望。'),COLORYELLOW;
N:=9;M1:=3;M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:=3*K-2*D;
钝化:=IF(COUNT(K<20,3)=3,10,DRAWNULL)ANDIF(COUNT(K<20,1)=1,10,DRAWNULL);
红:=COUNT(钝化,3)>=2;
MA1:=EMA(CLOSE,8);
趋势线:=(5)*(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1))-(3)*(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1),3,1))-SMA(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1),3,1),2,1);
GUA1:=((CLOSE>=REF(CLOSE,1))AND(REF(CLOSE,1)>=REF(CLOSE,2))AND(REF(CLOSE,1)<=REF(CLOSE,3))AND(REF(CLOSE,2)<=REF(CLOSE,3))AND((REF(CLOSE,4)>REF(CLOSE,2))OR(REF(CLOSE,4)<=REF(CLOSE,2))AND(REF(CLOSE,5)>=REF(CLOSE,3)))OR(CLOSE>=REF(CLOSE,1))AND(REF(CLOSE,1)<=REF(CLOSE,2))
AND(CLOSE>=REF(CLOSE,2))AND((REF(CLOSE,3)>REF(CLOSE,1))OR(REF(CLOSE,3)<=REF(CLOSE,1))AND(REF(CLOSE,4)>=REF(CLOSE,2))));
GUB2:=((CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10)))*(100);
GUB3:=EMA(GUB2,7);
GUB4:=EMA(GUB3,10);
GUB5:=(3)*(GUB3)-(2)*(GUB4);
GUB6:=EMA(GUB5,5);
底部:=IF((趋势线<=5),58,0),COLORFF00FF;
串:=EMA(GUB6,1);
黄:=串ANDIF(REF((COUNT((串<=REF(串,1)),5)=5),1)AND(串>REF(串,1)),10,0);
P1:=3;
P2:=3;
RSSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
KS:=SMA(RSSV,3,1),COLORYELLOW;
DS:=SMA(KS,3,1),COLOR00DD00;
蓝:=FILTER(CROSS(KS,DS)ANDKS<20,4);
出彩:=红AND黄AND蓝;
STICKLINE(出彩,0,75,2,0),COLORWHITE;
STICKLINE(出彩,52,73,1.2,0),COLORRED;
STICKLINE(出彩,27,48,1.2,0),COLORYELLOW;
STICKLINE(出彩,2,23,1.2,0),COLORBLUE;
二、通达信最强三色战法指标公式
{1}
W20:=LWINNER(20,C);
WC:=WINNER(C);
{2}
LC:=REF(CLOSE,1);
RSI5:=(SMA(MAX(CLOSE-LC,0),3,1))/(SMA(ABS(CLOSE-LC),3,1))*100;
WR10:=100*(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3));
活跃度:=RSI5-WR10,LINETHICK0,COLORFFFF00;
SC:=100*(CLOSE-MA(CLOSE,20)),LINETHICK2,COLORRED;
MAO:=EMA(SC,6),LINETHICK2,COLORGREEN;
{3}
A:=C/COST(5);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,9,1);
J:=3*K-2*D,COLORMAGENTA;
X1:=REF(W20,1)<=0.03ORREF(WC,1)<=0.03;
X2:=COUNT(A<=0.95,5)>=1;
X3:=HHV(C,10)/LLV(C,10)>=1.2;
X4:=J<25;
X5:=MACD.MACD>REF(MACD.MACD,1)ANDMACD.MACD<0;
X6:=COUNT((CLOSE<REF(C,1)*0.91ANDH=L),10)<1;
X7:=COUNT((C/REF(C,1)-1)<-0.095,10)<1;
X8:=CROSS(SC,MAO);
X9:=活跃度>0;
XG:X1ANDX2ANDX3ANDX4ANDX5ANDX6ANDX7ANDX8ANDX9;
高:=REF(HHV(H,150),3);
近期顶:=REFDATE(高,DATE);
最顶:=REFDATE(近期顶,DATE);
出:=最顶=HAND((C-L)<(O-C)OR(O-L)<(C-O));
低:=REF(LLV(L,150),3);
近期底:=REFDATE(低,DATE);
最底:=REFDATE(近期底,DATE);
进:最底=LAND((C+L)<(O+C)OR(O+L)<(C+O));
短高H:=(20*H+19*REF(H,1)+18*REF(H,2)+17*REF(H,3)+16*REF(H,4)+15*REF(H,5)+14*REF(H,6)
+13*REF(H,7)+12*REF(H,8)+11*REF(H,9)+10*REF(H,10)+9*REF(H,11)+8*REF(H,12)
+7*REF(H,13)+6*REF(H,14)+5*REF(H,15)+4*REF(H,16)+3*REF(H,17)+2*REF(H,18)+
REF(H,20))/210,COLORBLUE,LINETHICK1;
短低L:=(20*L+19*REF(L,1)+18*REF(L,2)+17*REF(L,3)+16*REF(L,4)+15*REF(L,5)+14*REF(L,6)
+13*REF(L,7)+12*REF(L,8)+11*REF(L,9)+10*REF(L,10)+9*REF(L,11)+8*REF(L,12)
+7*REF(L,13)+6*REF(L,14)+5*REF(L,15)+4*REF(L,16)+3*REF(L,17)+2*REF(L,18)+
REF(L,20))/210,COLORBLUE,LINETHICK1;
D90H:=EMA(短高H,90)-(EMA(短高H,90)-EMA(短低L,90))*0.2,COLORRED,LINETHICK1;
D90L:=EMA(短低L,90)+(EMA(短高H,90)-EMA(短低L,90))*0.2,COLORRED,LINETHICK1;
高0:=(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1+XMA(XMA(H,25),25),LINETHICK1,COLORWHITE;
低0:=XMA(XMA(L,25),25)-(XMA(XMA(H,25),25)-XMA(XMA(L,25),25))*1,LINETHICK1,COLORWHITE;
多头定位:=(高0+低0)/2>(D90H+D90L)/2;
空头定位:=(高0+低0)/2<(D90H+D90L)/2;
波段顶0:=(XMA(XMA(H,120),120)-XMA(XMA(L,120),120))*4+XMA(XMA(H,120),120),LINETHICK1,COLORRED;
波段底0:=XMA(XMA(L,120),120)-(XMA(XMA(H,120),120)-XMA(XMA(L,120),120))*4,LINETHICK1,COLORGREEN;
STICKLINE(多头定位=1,波段顶0,波段底0,5,0),COLOR001050;
STICKLINE(空头定位=1,波段顶0,波段底0,5,0),COLOR404050;
中中中:=((XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40),40))/4+(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40),40))/4)/2,LINETHICK0,COLORGREEN;
EMA中中中:=EMA(中中中,10),LINETHICK0,COLORWHITE;
A:=(3*C+L+O+H)/6;
B:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)
+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)
+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+
REF(A,20))/210,COLORRED,LINETHICK1;
D:=MA(B,10),COLORRED,LINETHICK2;
D14:=MA(B,14),COLORRED,LINETHICK2;
D21:=MA(B,21),COLORRED,LINETHICK2;
A1:=MA((3*C+L+O+H)/6,28);
B1:=(20*A1+19*REF(A1,1)+18*REF(A1,2)+17*REF(A1,3)+16*REF(A1,4)+15*REF(A1,5)+14*REF(A1,6)
+13*REF(A1,7)+12*REF(A1,8)+11*REF(A1,9)+10*REF(A1,10)+9*REF(A1,11)+8*REF(A1,12)
+7*REF(A1,13)+6*REF(A1,14)+5*REF(A1,15)+4*REF(A1,16)+3*REF(A1,17)+2*REF(A1,18)+
REF(A1,12))/210,COLORGREEN,LINETHICK1;
D1:=MA(B1,14),COLORGREEN,LINETHICK2;
DRAWBAND(B1,RGB(255,0,0),D1,RGB(255,255,0));
DRAWBAND(D14,RGB(255,0,0),D21,RGB(255,255,0));
DRAWBAND(B,RGB(255,0,0),D,RGB(255,255,0));
中中顶:=(XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40),40))/4*2-(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40),40))/4,LINETHICK2,COLORGREEN;
中中底:=(XMA(XMA(L,15),15)+XMA(XMA(L,20),20)+XMA(XMA(L,30),30)+XMA(XMA(L,40),40))/4*2-(XMA(XMA(H,15),15)+XMA(XMA(H,20),20)+XMA(XMA(H,30),30)+XMA(XMA(H,40),40))/4,LINETHICK2,COLORGREEN;
短中顶:=(XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA(XMA(H,14),14)+XMA(XMA(H,4),4))/5+((XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA(XMA(H,14),14)+XMA(XMA(H,4),4))/5-(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L,14),14)+XMA(XMA(L,4),4))/5)/2,LINETHICK0,COLORWHITE;
短中底:=(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L,14),14))/4-((XMA(XMA(H,5),5)+XMA(XMA(H,8),8)+XMA(XMA(H,11),11)+XMA(XMA(H,14),14)+XMA(XMA(H,4),4))/5-(XMA(XMA(L,5),5)+XMA(XMA(L,8),8)+XMA(XMA(L,11),11)+XMA(XMA(L,14),14)+XMA(XMA(L,4),4))/5)/2,LINETHICK0,COLORWHITE;
中顶:=(XMA(XMA(H,30),30)+XMA(XMA(H,40),40)+XMA(XMA(H,50),50)+XMA(XMA(H,60),60))/4*2.03-(XMA(XMA(L,30),30)+XMA(XMA(L,40),40)+XMA(XMA(L,50),50)+XMA(XMA(L,60),60))/4,LINETHICK2,COLORRED;
中底:=(XMA(XMA(L,30),30)+XMA(XMA(L,40),40)+XMA(XMA(L,50),50)+XMA(XMA(L,60),60))/4*1.97-(XMA(XMA(H,30),30)+XMA(XMA(H,40),40)+XMA(XMA(H,50),50)+XMA(XMA(H,60),60))/4,LINETHICK2,COLORRED;
长顶:=(XMA(XMA(H,90),90)+XMA(XMA(H,120),120)+XMA(XMA(H,150),150))/3*2.08-(XMA(XMA(L,90),90)+XMA(XMA(L,120),120)+XMA(XMA(L,150),150))/3,LINETHICK2,COLORYELLOW;
长底:=(XMA(XMA(L,90),90)+XMA(XMA(L,120),120)+XMA(XMA(L,150),150))/3*1.92-(XMA(XMA(H,90),90)+XMA(XMA(H,120),120)+XMA(XMA(H,150),150))/3,LINETHICK2,COLORYELLOW;
波段顶:(XMA(XMA(H,120),120)-XMA(XMA(L,120),120))*4+XMA(XMA(H,120),120),LINETHICK2,COLORYELLOW;
波段底:XMA(XMA(L,120),120)-(XMA(XMA(H,120),120)-XMA(XMA(L,120),120))*4,LINETHICK2,COLORYELLOW;
AF长:=EMA((CLOSE+HIGH+LOW)/3,18);
BF长:=REF(AF长,1);
AF中:=EMA((CLOSE+HIGH+LOW)/3,10);
BF中:=REF(AF中,1);
AF5:=EMA((CLOSE+HIGH+LOW)/3,6);
BF5:=REF(AF5,1);
AF3:=EMA((CLOSE+HIGH+LOW)/3,3);
BF3:=REF(AF3,1);
买入定位:=AF长>BF长ORAF中>BF中ORAF5>BF5ORAF3>BF3;
卖出定位:=AF长<BF长ORAF中<BF中ORAF5<BF5;
顶底定位:=AF长<BF长ORAF中<BF中ORAF5<BF5ORAF3<BF3;
STICKLINE(买入定位=1,LOW,HIGH,0.0,1),COLORRED;
STICKLINE(买入定位=1,CLOSE,OPEN,2,1),COLORRED;
STICKLINE(AF中<BF中,LOW,HIGH,0.0,0),COLORGREEN;
STICKLINE(AF中<BF中,CLOSE,OPEN,2,1),COLORGREEN;
STICKLINE(卖出定位=1AND中中顶>中顶,LOW,HIGH,0.0,1),COLORGREEN;
STICKLINE(卖出定位=1AND中中顶>中顶,CLOSE,OPEN,2,1),COLORGREEN;
STICKLINE(顶底定位=1ANDH>中中顶ANDH>中顶,CLOSE,OPEN,2,1),COLORGREEN;
STICKLINE(顶底定位=1ANDH>中中顶ANDH>中顶,LOW,HIGH,0.0,1),COLORGREEN;
加仓定位1:=卖出定位=1AND中中顶>中顶;
加仓定位2:=顶底定位=1ANDH>中中顶ANDH>中顶;
DRAWTEXT(中中中<EMA中中中ANDCROSS(AF中,BF中)AND短中底<中中底AND短中底<中底,L*0.97,'战神推荐'),COLORFF00FF;
DRAWTEXT(中中中>=EMA中中中ANDCROSS(AF中,BF中)AND短中底<中中底,L*0.97,'强烈推荐'),COLORFF00FF;
DRAWTEXT(CROSS(BF3,AF3)ANDH>中中顶ANDH>中顶,H*1.03,'【逃顶】'),COLORGREEN;
DRAWTEXT(加仓定位1=0AND加仓定位2=0ANDCROSS(AF中,BF中)AND中中中>=EMA中中中,L*0.995,'加'),COLORYELLOW;
DRAWTEXT(CROSS(AF长,BF长)AND中底<长底,L*0.97,'【抄底】'),COLORRED;
DRAWTEXT(CROSS(AF长,BF长)AND中底<长底AND中底>长底,L*0.97,'中底'),COLORYELLOW;
STICKLINE(AF中>BF中AND短中底<中底AND短中底<中底,CLOSE,OPEN,2,0),COLORRED;
DRAWTEXT(AF3>BF3AND短中底<中中底ANDH<中中底,L*0.985,'投机'),COLORWHITE;
STICKLINE(AF3>BF3AND短中底<中中底ANDH<中中底,CLOSE,OPEN,2,0),COLORRED;
STICKLINE(中中中>=EMA中中中ANDCROSS(AF中,BF中)ANDAF中<中中中ANDAF中<(中顶+中底)/2ANDH<短中顶,CLOSE,OPEN,3,0),COLORRED;
DRAWTEXT(中中中>=EMA中中中ANDCROSS(AF中,BF中)ANDAF中<中中中ANDAF中<(中顶+中底)/2ANDH<短中顶,L*0.97,'【买】'),COLORRED;
DRAWTEXT(CROSS(BF中,AF中)AND中中中<EMA中中中,H*1.01,'卖'),COLORGREEN;
DRAWICON(AF中<中中中ANDAF中<(中顶+中底)/2ANDH<短中顶ANDCROSS(AF中,BF中)AND中中中<EMA中中中,L*0.99,1);
DRAWTEXT(CROSS((高0+低0)/2,(D90H+D90L)/2),波段底0*0.965,'【空转多】'),COLORRED;
DRAWTEXT(CROSS((D90H+D90L)/2,(高0+低0)/2),波段顶0*1.04,'【多转空】'),COLORWHITE;
DX:DRAWLINE(HIGH>=HHV(HIGH,12),HIGH,LOW<=LLV(LOW,12),HHV(HIGH,4),1),LINETHICK2,COLORMAGENTA;
KX:DRAWLINE(LOW<=LLV(LOW,12),LOW,HIGH>=HHV(HIGH,12),LLV(LOW,4),1),LINETHICK2,COLORWHITE;
DRAWTEXT(ISLASTBAR,波段底,'底'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,波段顶,'顶'),COLORYELLOW;
{主趋势线:EMA(EMA(C,10),10),COLORBLUE,LINETHICK3;
B:=主趋势线<REF(主趋势线,1);
IF(B-1,主趋势线,DRAWNULL)COLORRED,LINETHICK3;}
主趋势线:EMA(EMA(C,10),10),COLORRED,LINETHICK3;
B:=主趋势线>REF(主趋势线,1);
IF(B-1,主趋势线,DRAWNULL)COLORBLUE,LINETHICK3;
{操盘线:EMA(EMA(C,5),5),COLORRED,LINETHICK2;
Y:=操盘线>REF(操盘线,1);
IF(Y-1,操盘线,DRAWNULL)COLORGREEN,LINETHICK2;}
AA:=EMA(C,5)>EMA(C,20);
BB:=EMA(C,5)<EMA(C,20);
CC:=EMA(C,5)>EMA(C,10);
CC1:=EMA(C,5)<EMA(C,10);
DD:=CLOSE<OPEN;
STICKLINE(AA,H,L,0,0),COLORRED;
STICKLINE(AA,O,C,3,1),COLORRED;
STICKLINE(AAANDDD,O,C,3,0),COLORRED;
STICKLINE(BB,H,L,0,0),COLORGREEN;
STICKLINE(BB,O,C,3,1),COLORGREEN;
STICKLINE(BBANDDD,O,C,3,0),COLORGREEN;
STICKLINE(BBANDCC,H,L,0,1),COLORWHITE;
STICKLINE(BBANDCC,O,C,3,1),COLORWHITE;
STICKLINE(BBANDCCANDDD,O,C,3,0),COLORWHITE;
STICKLINE(AAANDCC1,H,L,0,0),COLORWHITE;
STICKLINE(AAANDCC1,O,C,3,1),COLORWHITE;
STICKLINE(AAANDCC1ANDDD,O,C,3,0),COLORWHITE;
AAA:=CONST(HHV(C,90));
{DRAWTEXT(T1=1ANDCURRBARSCOUNT=58,AAA,'智能分析:目前处于红色买区,上涨趋势良好,多单持有。'),COLORRED,LINETHICK4;}
DRAWTEXT(CANDCURRBARSCOUNT=80,AAA,'红色K线做多,绿色K线做空,白色K线观望。'),COLORYELLOW;
[源码注释]通达信公式动态翻译结果
VAR1U赋值:(收盘价*2+最高价+最低价)/4
SKU赋值:VAR1U的13日指数移动平均-VAR1U的73日指数移动平均
SDU赋值:SKU的4日指数移动平均
输出总攻:(SKU上穿SDUANDSKU<=-0.26)ANDC>1日前的收盘价ANDC<1日前的收盘价*1.04ANDREF(收阴线,1)ANDVOL/1日前的成交量(手)<0.92的5日过滤
推荐阅读:通达信三色K线主图指标公式
N:=30;
DRAWGBK(C>0,RGB(80,60,60),RGB(50,100,200),0,'',0);
BOLL2:MA(CLOSE,N/1.5),LINETHICK2,COLORAA00AA;
UB2:BOLL2+2*STD(CLOSE,N/1.5),LINETHICK1,COLOR00FF00;
LB2:BOLL2-2*STD(CLOSE,N/1.5),LINETHICK1,COLOR00FF00;
BOLL:MA(CLOSE,N/3),LINETHICK1,COLOR00DDFF;
UB:BOLL+2*STD(CLOSE,N/3),LINETHICK1,DOTLINE,COLORFF0000;
LB:BOLL-2*STD(CLOSE,N/3),LINETHICK1,DOTLINE,COLORFF0000;
ZMA5:MA.MA1#DAY,COLOR0000FF,NODRAW;
STICKLINE(H>=MA(C,20)+2*STD(C,20)ANDH/BOLL2>=1.1,H*1.005,L*0.995,5,1),COLOR00FF00;
STICKLINE(L<MA(C,20)-2*STD(C,20),H*1.005,L*0.995,5,1),COLOR00FFFF;
STICKLINE(H>=MA(C,10)+2*STD(C,10)ANDH/BOLL2>=1.1,H,L,4.5,0),COLOR00AA00;
STICKLINE(L<MA(C,10)-2*STD(C,10),H,L,4.5,0),COLOR000033;
STICKLINE(C<O,H,L,0.02,0),COLOR999000;
STICKLINE(C>=O,H,L,0.02,0),COLOR000088;
STICKLINE(C<O,C,O,3.2,0),COLOR777000;
STICKLINE(C<O,C,O,2.1,0),COLOR888000;
STICKLINE(C<O,C,O,1,0),COLOR999000;
STICKLINE(C>=O,C,O,3.2,0),COLOR000066;
STICKLINE(C>=O,C,O,2.1,0),COLOR000077;
STICKLINE(C>=O,C,O,1,0),COLOR000088;
STICKLINE((C*3+O*2+H+L)/7>=COST((COST(98)-COST(2))/(COST(98)+COST(2))*100)ANDC<O,H,L,0.02,0),COLORFFE600;
STICKLINE((C*3+O*2+H+L)/7>=COST((COST(98)-COST(2))/(COST(98)+COST(2))*100)ANDC>=O,H,L,0.02,0),COLOR0000FF;
STICKLINE((C*3+O*2+H+L)/7>=COST((COST(98)-COST(2))/(COST(98)+COST(2))*100)ANDC<O,C,O,3.2,0),COLORDDC400;
STICKLINE((C*3+O*2+H+L)/7>=COST((COST(98)-COST(2))/(COST(98)+COST(2))*100)ANDC<O,C,O,2.1,0),COLOREED500;
STICKLINE((C*3+O*2+H+L)/7>=COST((COST(98)-COST(2))/(COST(98)+COST(2))*100)ANDC<O,C,O,1,0),COLORFFE600;
STICKLINE((C*3+O*2+H+L)/7>=COST((COST(98)-COST(2))/(COST(98)+COST(2))*100)ANDC>=O,C,O,3.2,0),COLOR0000DD;
STICKLINE((C*3+O*2+H+L)/7>=COST((COST(98)-COST(2))/(COST(98)+COST(2))*100)ANDC>=O,C,O,2.1,0),COLOR0000EE;
STICKLINE((C*3+O*2+H+L)/7>=COST((COST(98)-COST(2))/(COST(98)+COST(2))*100)ANDC>=O,C,O,1,0),COLOR0000FF;
主升:=(C*3+O*2+H+L)/7>=(MA(C,60)+MA(C,60)+2*STD(C,60))/2;
STICKLINE(C<OAND主升,H,L,0.02,0),COLORFFFFFF;
STICKLINE(C>=OAND主升,H,L,0.02,0),COLORFF00FF;
STICKLINE(C<OAND主升,C,O,3.2,0),COLORBBBBBB;
STICKLINE(C<OAND主升,C,O,2.1,0),COLORCCCCCC;
STICKLINE(C<OAND主升,C,O,1,0),COLORDDDDDD;
STICKLINE(C>=OAND主升,C,O,3.2,0),COLORBB00BB;
STICKLINE(C>=OAND主升,C,O,2.1,0),COLORCC00CC;
STICKLINE(C>=OAND主升,C,O,1,0),COLORDD00DD;
STICKLINE((REF(C,1)-C)/REF(C,1)>=0.095ANDC=OANDH=L,C,O,4,0),COLORFFF000;
STICKLINE((C-REF(C,1))/REF(C,1)>=0.095ANDC=OANDH=L,C,O,4,0),COLOR00FFFF;
{BOLL3:MA(CLOSE,N),LINETHICK2,COLOR000088;
UB3:BOLL3+2*STD(CLOSE,N),LINETHICK2,COLORFFF000;
LB3:BOLL3-2*STD(CLOSE,N),LINETHICK2,COLORFFF000;}
IF(PERIOD<5,ZMA5,DRAWNULL),COLOR0000FF,LINETHICK1;
BOLL2,LINETHICK2,COLORAA00AA;
UB2,LINETHICK1,COLOR00FF00;
LB2,LINETHICK1,COLOR00FF00;
BOLL,LINETHICK1,COLOR00DDFF;
UB,LINETHICK1,DOTLINE,COLORFF0000;
LB,LINETHICK1,DOTLINE,COLORFF0000;
超跌:=ZMA5/L>1.19;
DRAWICON(PERIOD<5ANDZMA5/L>=1.18,H*1.015,26);
DRAWICON(PERIOD<5ANDH/ZMA5>=1.18,H*1.015,15);
DRAWICON(PERIOD<5ANDH/MIN(UB,UB2)>=1.025,L*0.96,6);
DRAWICON(PERIOD<5ANDMAX(LB,LB2)/L>=1.02,L*0.96,5);
input:N(21,1,240);
主:=WINNER(CLOSE/1.1);
var1:=主-ref(主,1);
散:=1-WINNER(CLOSE*1.1);
var2:=ref(散,1)-散;
var3:=sum((var1+var2),2);
NN:EMA(sum(var3,N),N/2),Color00FFFF;
PARTLINE(NN,(NN>REF(NN,1))-1,rgb(0,255,0),1,rgb(255,0,0)),LINETHICK3,LAYER1;
STICKLINE(var3<0and散>0.009,0,var3,6,0),Color00FF00;
STICKLINE(var3<0and散<0.009,0,-var3,6,0),COLORRED;
STICKLINE(var3>0and散<0.23,0,var3,8,0),COLORRED;
STICKLINE(var3>0and散>0.23and散<0.6999,0,var3,6,1),ColorFF44FF;
STICKLINE(var3>0and散>0.7,0,-var3,6,0),Color00FFFF;
N:=9;M1:=3;M2:=3;
RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K:=SMA(RSV,M1,1);
D:=SMA(K,M2,1);
J:=3*K-2*D;
钝化:=IF(COUNT(K<20,3)=3,10,DRAWNULL)ANDIF(COUNT(K<20,1)=1,10,DRAWNULL);
红:=COUNT(钝化,3)>=2;
MA1:=EMA(CLOSE,8);
趋势线:=(5)*(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1))-(3)*(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1),3,1))-SMA(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1),3,1),2,1);
GUA1:=((CLOSE>=REF(CLOSE,1))AND(REF(CLOSE,1)>=REF(CLOSE,2))AND(REF(CLOSE,1)<=REF(CLOSE,3))AND(REF(CLOSE,2)<=REF(CLOSE,3))AND((REF(CLOSE,4)>REF(CLOSE,2))OR(REF(CLOSE,4)<=REF(CLOSE,2))AND(REF(CLOSE,5)>=REF(CLOSE,3)))OR(CLOSE>=REF(CLOSE,1))AND(REF(CLOSE,1)<=REF(CLOSE,2))
AND(CLOSE>=REF(CLOSE,2))AND((REF(CLOSE,3)>REF(CLOSE,1))OR(REF(CLOSE,3)<=REF(CLOSE,1))AND(REF(CLOSE,4)>=REF(CLOSE,2))));
GUB2:=((CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10)))*(100);
GUB3:=EMA(GUB2,7);
GUB4:=EMA(GUB3,10);
GUB5:=(3)*(GUB3)-(2)*(GUB4);
GUB6:=EMA(GUB5,5);
底部:=IF((趋势线<=5),58,0),COLORFF00FF;
串:=EMA(GUB6,1);
黄:=串ANDIF(REF((COUNT((串<=REF(串,1)),5)=5),1)AND(串>REF(串,1)),10,0);
P1:=3;
P2:=3;
RSSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
KS:=SMA(RSSV,3,1),COLORYELLOW;
DS:=SMA(KS,3,1),COLOR00DD00;
蓝:=FILTER(CROSS(KS,DS)ANDKS<20,4);
出彩:=红AND黄AND蓝;
STICKLINE(出彩,0,75,2,0),COLORWHITE;
STICKLINE(出彩,52,73,1.2,0),COLORRED;
STICKLINE(出彩,27,48,1.2,0),COLORYELLOW;
STICKLINE(出彩,2,23,1.2,0),COLORBLUE;
N:=99;
BOLL1:=MA(CLOSE,N);
CMSS:=1.96*SQRT(MA(POW((CLOSE-BOLL1),2),N));
BOLL:BOLL1,COLORFFFFFF;
UB:BOLL1+CMSS,COLOR00FFFF;
LB:BOLL1-CMSS,COLORFF00FF;
每日公式解答:
股票公式编写要求:
1、昨日未涨停;2、流值低于100亿;3、开盘涨幅大于1%,小于6%;4、上市时间大于60天。
股票公式编写结果:
XG: IF(NAMELIKE('ST') OR NAMELIKE('*ST'),REF(C,1)<ZTPRICE(REF(C,2),0.05), IF(CODELIKE('688') OR (CODELIKE('300')),REF(C,1)<ZTPRICE(REF(C,2),0.2), REF(C,1)<ZTPRICE(REF(C,2),0.1))) && BETWEEN(REF(O,0)/REF(C,1),1.01,1.06) && BARSCOUNT(V>0)>60 && FINANCE(40)<10000000000;
评论(0)