小番茄主图指标 通达信公式(附图)

[复制链接]
查看51 | 回复0 | 2021-8-20 18:37:11 | 显示全部楼层 |阅读模式

P1:=5;
P2:=4;
M5:MA(C,5);
M10:MA(C,10)COLOR0080FF;
M20:=MA(C,20);
MA250:MA(CLOSE,250),COLOR808080;
MA120:MA(CLOSE,120),COLOR808080;RSV:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
QR:=(H+L+2*C)/4;
A1:=COST(1.91);
A2:=COST(3.82);
A3:=COST(5);
A4:=COST(6.18);
A5:=COST(8.09);
A7:=C-REF(C,1);
A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);SHORT:=7; LONG:=19;
TFXXS:=INTPART(K1)+INTPART(D1);
TGL:=(TFXXS-REF(TFXXS,1));
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
VAR21:=SMA(ABS(HIGH-VAR1),13,1)/SMA(MIN(HIGH-VAR1,0),10,1);
VAR31:=EMA(VAR21,10);
VAR41:=HHV(HIGH,33);
VAR51:=EMA(IF(HIGH>=VAR41,VAR31,0),3);
VAR78:=C/EXPMA(C,5);RMA:=EMA(CLOSE,SHORT);
NMA:=EMA(CLOSE,LONG);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),0);
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(RMA,NMA))+1),HHV(H,BARSLAST(CROSS(RMA,NMA))+1),L=LLV(L,BARSLAST(CROSS(NMA,RMA))+1),LLV(L,BARSLAST(CROSS(NMA,RMA))+1),0);
小番茄买进:=(LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2))) AND REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
COSTT:=(A1+A2+A3+A4+A5)/5;
COSTT1:=C/COSTT;
VARD1:=(2*INDEXC+INDEXH+INDEXL)/4;
VARD2:=LLV(INDEXL,21);
VARD3:=HHV(INDEXH,8);
MIJI:=EMA((VARD1-VARD2)/(VARD3-VARD2)*100,9);
MIJI1:=MIJI-VAR78;
MIJI2:=MIJI1-REF(MIJI1,1);
MIJI3:=MIJI-REF(MIJI,1);
DAPAN:=COSTT1-(MIJI3+0.618*MIJI2)/16.18;
X1:=(FINANCE(11)-FINANCE(15))/FINANCE(10)*1.2;
X2:=(FINANCE(31)+FINANCE(17))/FINANCE(10)*1.4;
X3:=FINANCE(23)/FINANCE(10)*3.3;
X4:=FINANCE(19)/FINANCE(15)*0.6;
X5:=FINANCE(20)/FINANCE(15)*0.999;
YAOGU:=X1+X2+X3+X4+X5;
XJF:=CON2STR(FINANCE(25)/FINANCE(15),3);
YZZ:=CON2STR((FINANCE(19)-FINANCE(22)-FINANCE(27))/FINANCE(19),2);
VARR1:=LLV(LOW,P1);
VARR2:=HHV(HIGH,P1);
K:=EMA((CLOSE-VARR1)/(VARR2-VARR1)*100,P2),COLORGREEN,LINETHICK1;
D:=EMA(0.667*REF(K,1)+0.333*K,2),COLORRED,LINETHICK1;
DRAWTEXT_FIX(ISLASTBAR AND TGL>=0 AND TGL>REF(TGL,1),0.99,0.01,1,'资金状况:流入加快'),COLOR0202FF;
DRAWTEXT_FIX(ISLASTBAR AND TGL>=0 AND TGL<=REF(TGL,1),0.99,0.01,1,'资金状况:流入减慢'),COLOR1876E9;
DRAWTEXT_FIX(ISLASTBAR AND TGL<0 AND TGL>REF(TGL,1),0.99,0.01,1,'资金状况:流出减慢'),COLOR13B79A;
DRAWTEXT_FIX(ISLASTBAR AND TGL<0 AND TGL<=REF(TGL,1),0.99,0.01,1,'资金状况:流出加快'),COLOR00CA00;
DRAWTEXT_FIX(ISLASTBAR AND VAR5>REF(VAR5,1),0.99,0.15,1,'典型吸筹行为'),COLOR1876E9;
DRAWTEXT_FIX(ISLASTBAR AND VAR5<REF(VAR5,1),0.99,0.15,1,'典型洗盘行为'),COLORC08000;
DRAWTEXT_FIX(ISLASTBAR AND VAR5=REF(VAR5,1),0.99,0.15,1,'无特殊行为'),COLORC0C0C0;
DRAWTEXT_FIX(ISLASTBAR AND VAR51>REF(VAR51,1),0.99,0.08,1,'主力正在出货'),COLOR00CA00;
DRAWTEXT_FIX(ISLASTBAR AND VAR51=REF(VAR51,1),0.99,0.08,1,'主力无大动作'),COLORC0C0C0;
DRAWTEXT_FIX(ISLASTBAR AND DAPAN<COSTT1,0.99,0.22,1,'受大盘拉动'),COLOR0202FF;
DRAWTEXT_FIX(ISLASTBAR AND DAPAN>=COSTT1,0.99,0.22,1,'受大盘压制'),COLOR00CA00;
DRAWTEXT_FIX(YAOGU<=0,0.99,0.99,1,'拉升潜力:难于登天'),COLOR00FF00;
DRAWTEXT_FIX(YAOGU>0 AND YAOGU<=1.2,0.99,0.99,1,'拉升潜力:难度较大'),COLOR3A8B5C;
DRAWTEXT_FIX(YAOGU>1.2 AND YAOGU<=2.6,0.99,0.99,1,'拉升潜力:尚可一试'),COLOR4747B8;
DRAWTEXT_FIX(YAOGU>2.6 AND YAOGU<=5.8,0.99,0.99,1,'拉升潜力:较为容易'),COLOR2424DB;
DRAWTEXT_FIX(YAOGU>5.8,0.99,0.99,1,'拉升潜力:轻而易举'),COLOR0000FF;
DRAWTEXT_FIX(XJF>=1618,0.99,0.90,1,'过于保守'),COLOR4747B8;
DRAWTEXT_FIX(XJF>=618 AND XJF<1618,0.99,0.90,1,'保守求稳'),COLOR4747B8;
DRAWTEXT_FIX(XJF>=100 AND XJF<618,0.99,0.90,1,'收支平衡'),,COLOR0000FF;
DRAWTEXT_FIX(XJF<100,0.99,0.90,1,'负债过多'),COLOR00FF00;
DRAWTEXT_FIX(YZZ<85,0.99,0.82,1,'资产质地差'),COLOR00FF00;
DRAWICON(小番茄买进,H,25);C2:=REF(C,1);
跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);
STICKLINE(跌停,O,C,0.5,0),COLOR28D04F;
STICKLINE(跌停,H,L,0.5,0),COLOR28D04F;
STICKLINE(跌停,H,L,0.5,0),COLOR28D04F;
STICKLINE(小番茄买进=1,L,L*1.003,1.71*H,1)COLOR00FFFF;
DRAWTEXT(小番茄买进,L*0.98,'买'),COLORYELLOW;
STICKLINE(小番茄买进=1,C,O,2,0),COLORAA00AA;
STICKLINE(小番茄买进=1,H,L,0,0),COLORAA00AA;

14P0363J630-511A.jpg

14P0363J630-511A.jpg

 

回复

使用道具 举报

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

本版积分规则