您现在的位置:程序化交易>> 股票公式>> 大智慧>> 大智慧公式>>正文内容

几个不错的大智慧主图指标公式公式(公式、源码)[大智慧公式]

相关标签:

 

{大智慧精确主图}

{N:10 1 60 1}

A1:= PDAY1>PDAY2 AND PDAY2>PDAY3 AND PDAY3>PDAY4 AND PDAY4>PDAY5 AND PDAY5<5;
A2:= COUNT(CROSS(R10,R5),PDAY2)=1;
AA:=IF(A1 AND A2 AND MA(C,5)>=MA(C,10) AND MA(C,10)>MA(C,60),10,0);
BB:=FILTER( A1 AND A2 AND MA(C,5)>=MA(C,10) AND MA(C,10)>MA(C,60),5);
有戏:=IF(AA AND BB,1,0);
DRAWICON(AA AND BB ,LOW*0.99,1),ALIGN1;
A0:=AMOUNT/VOL/100;
A3:=(EMA(A0,3)>EMA(A0,7) AND EMA(A0,7)>EMA(A0,13) AND EMA(A0,13)>EMA(A0,21));
DRAWTEXT(A3,MA(C,60),'*'),ALIGN1,colorred;
GJ:=(C+H+L+O)/4;
明阻:=L+(GJ-L)+(C-L);
明支:=L+(C-GJ);
阻:REF(明阻 , 1),LINETHICK0,PRECIS2,COLORRED;
支:REF(明支 , 1),LINETHICK0,PRECIS2,COLORFF00FF;
STICKLINE(DISPSTATUS=2AND C>=阻,阻*1.001,阻*0.999,15,0),COLOR0000FF;
STICKLINE(DISPSTATUS=2AND C<阻,阻*1.001,阻*0.999,15,0),COLOR00FF00;
STICKLINE(DISPSTATUS=2AND C>=支,支*1.001,支*0.999,15,0),COLORFF00FF;
STICKLINE(DISPSTATUS=2AND C<支,支*1.001,支*0.999,15,0),COLORFF8800;
MTM:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
ZX:=100*EMA(EMA(MTM,12),12)/EMA(EMA(ABS(MTM),12),12);
CX:=100*EMA(EMA(MTM,26),26)/EMA(EMA(ABS(MTM),26),26);
DXGD:=LLV(DX,2)=LLV(DX,5) AND CROSS(DX,MA(DX,2));
ZXGD:=LLV(ZX,2)=LLV(ZX,5) AND CROSS(ZX,MA(ZX,2)) AND DX>ZX;
短买:=IF(DXGD AND BETWEEN(DX,0,60) AND ZX>0,1,0);
中买:=IF(ZXGD AND BETWEEN(DX,0,50) AND BETWEEN(CX,0,50),1,0);
DTPL:=DX>ZX AND ZX>CX AND CX>0;
QSXS:=DX>REF(DX,1) AND ZX>REF(ZX,1);
TSJC:=CROSS(DX,CX) AND CROSS(ZX,CX);
优选:=IF(CROSS(DTPL,0.8) AND (TSJC OR COUNT(QSXS,3)=3) AND CX<40,1,0);
短卖:=IF(CROSS(ZX,DX),1,0);
中卖:=IF(CROSS(CX,ZX) AND DX<ZX,1,0);
买:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2)),1,0);
卖:=IF(HHV(DX,2)=HHV(DX,7) AND COUNT(DX>50,2) AND CROSS(MA(DX,2),DX),1,0);
DRAWTEXT(短买,low*0.99,'△'),COLORe91daf,ALIGN1;
DRAWTEXT(中买,low*0.99,'▲'),COLORe91daf,ALIGN1;
DRAWTEXT(短卖,high*1.02,'▽'),COLORff0000,ALIGN1;
DRAWTEXT(中卖,high*1.02,'▼'),COLORff0000,ALIGN1;
DRAWTEXT(filter(买=1,5),low-0.03,''),COLORe91adf,ALIGN1;
DRAWTEXT(filter(卖=1,5),high*1.015,''),COLORff0000,ALIGN1;
DRAWICON(优选,low-0.03,7);
RSV:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
K1:=SMA(RSV,3,1);
D1:=SMA(K1,3,1);
J1:=3*K1-2*D1;
BDGD1:=HHV(J1,2)=HHV(J1,8) AND J1>80;
BDDD:=LLV(J1,2)=LLV(J1,8);
J1向下拐头:=IF(CROSS(REF(J1-0.01,1),J1) AND REF(BDGD1,1),1,0);
DRAWTEXT(j1向下拐头 ,high*1.015,'J'),COLORFFFFFF;
J1向上拐头:=IF(CROSS(J1,REF(J1+0.01,1)) AND BDDD AND J1<20,1,0);
DRAWTEXT(j1向上拐头,low*0.993,'J'),COLOR00ffFF;
WR2:=100*(HHV(HIGH,6)-CLOSE)/(HHV(HIGH,6)-LLV(LOW,6));
DDSJ:=BARSLAST((1-C/REF(C,1))*100>=2);
XD:=C<REF(C,1);
DF:=(HHV(H,5)/C-1)*100>=5;
跌6:=COUNT(XD,6)>=5 AND XD AND DF AND DDSJ<=1;
跌9:=WR2>80;
底:=跌6 AND 跌9;
TYP := (HIGH + LOW + CLOSE)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
A:=REF(C,1);
RSI:=SMA(MAX(C-A,0),6,1)/SMA(ABS(C-A),6,1)*100;
A11:=(C/MA(C,5)-1)*100<-10;
A21:=(C/MA(C,13)-1)*100<-10;
A31:=(C/MA(C,34)-1)*100<-15;
A41:=RSI<18;
A51:=CCI<-120;
A61:=COUNT(ABS(C/REF(C,1)-1)*100>=6,30)>=1;
底部:=A11 AND A21 AND A31 AND A41 AND A51 AND A61;
DRAWTEXT(底部,low*0.99,'底'),COLOR00FF00;
DRAWTEXT(底>0,low-0.03,'D'),COLORFFFFFF,ALIGN1;
BDGD:=C=HHV(C,N);
GDSJ:=BARSLAST(BDGD);
前高1:=IF(GDSJ>0,REF(C,GDSJ),REF(C,GDSJ));
TP1:=CROSS(C,REF(前高1,1));
突破1:=TP1 AND COUNT(TP1,5)=1;
STICKLINE(突破1,(O+C)/2*1.01,(O+C)/2*1.01,15,0),COLOR00ff00;
主筹估算:=EMA(WINNER(c)*70,3);
散筹估算:=EMA((WINNER((c)*1.1)-WINNER((c)*0.9))*70,3);
筹码锁定:=散筹估算-主筹估算 ;
动态底部:=EMA(IF(L<= LLV(l,60),SMA(ABS(L-REF(L,1)),60,1)/SMA(MAX(L-REF(l,1),0),99,1),0)*5,3);
涨:=CROSS(主筹估算,筹码锁定);
强:=CROSS(主筹估算,散筹估算);
STICKLINE(涨,O,C,4,1),COLORYELLOW;
STICKLINE(涨,O,H,0,0),COLORYELLOW;
STICKLINE(涨,L,C,0,0),COLORYELLOW;
STICKLINE(强, O,C,4,1),colormagenta;
STICKLINE(强,O,H,0,0),colormagenta;
STICKLINE(强,L,C,0,0),colormagenta;
STICKLINE(筹码锁定<-50,O,C,4,1),COLORred;
STICKLINE(筹码锁定<-50,O,H,0,0),COLORred;
STICKLINE(筹码锁定<-50,L,C,0,0),COLORred;
买入:=STRFIND(Extrastring('评级'),'买入',1)>0;
增持:=STRFIND(Extrastring('评级'),'增持',1)>0;
持有:=STRFIND(Extrastring('评级'),'持有',1)>0;
DRAWTEXTREL(400,970,'评级:'+Extrastring('评级')),colora9a9a9;
{DRAWTEXTABS(5,360,'板块:'+BKNAME),colora9a9a9;}
流通:=FINANCE2(37)/10000;
市盈率:=DYNAINFO(39);
F:=COST(5 );J:=COST(95 );
M:=COST(15 );X:=COST(85 );
F1:=(J-F)/(F+J)*100;M1:=(X-M)/(X+M)*100;
集中度90:=F1;
集中度70:=M1;
获利盘:=WINNER(CLOSE)*100;
套牢盘:=100*(1-WINNER(C));
收益:=FINANCE2(3);
浮筹比:=(winner(c*1.1)-winner(c*0.9))/winner(hhv(h,0))*100;
DRAWTEXTABS(5,65,'浮筹比:'+浮筹比+'% '),LINETHICK1,Colora9a9a9;
DRAWTEXTABS(110,20,'流通:'+流通+' '),LINETHICK1,Colora9a9a9;
DRAWTEXTABS(5,80,'市盈率:'+市盈率+' '),LINETHICK1,Colora9a9a9;
DRAWTEXTABS(5,5,'集中度90:'+集中度90+' '),LINETHICK1,Color00FF00;
DRAWTEXTABS(5,20,'集中度70:'+集中度70+' '),LINETHICK1,ColorYELLOW;
DRAWTEXTABS(5,35,'获利盘:'+获利盘+'% '),LINETHICK1,Colora9a9a9;
DRAWTEXTABS(5,50,'套牢盘:'+套牢盘+'% '),LINETHICK1,Colora9a9a9;
DRAWTEXTABS(110,5,'收益:'+收益+'元 '),LINETHICK1,COLORa9a9a9;

二、绝好主图

{N:20 1 500 1}

{P:12 1 30 1}

DRAWGBK(C,STRIP(RGB(10,160,0),RGB(25,15,0),1));
阻挡线:SMA(HIGH,21,2)*1.035,POINTDOT,colorFFFFFF,PRECIS2;
下档线:SMA(LOW,21,2)*0.96,POINTDOT,PRECIS2;
上:=ema(MA(HIGH,3)*1.05,30); {原句 上:=FFT(MA(HIGH,3)*1.05,30);分析家无FFT,故改}
趋势:=ema(MA(LOW,3)*0.96,30); {原句 趋势:=FFT(MA(LOW,3)*0.96,30);分析家无FFT,故改}
短期支撑:LLV(CLOSE,N),PRECIS2,color6803C7;
中:=ema(MA(OPEN,3)*0.99,30); {原句 中:=FFT(MA(OPEN,3)*0.99,30);分析家无FFT,故改}
趋势线:=SMA(LOW,8,1);
VAR1:=(OPEN+LOW+HIGH+CLOSE)/4;
VAR2:=((CLOSE-REF(CLOSE,1))/REF(CLOSE,1))*100;
VAR3:=((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18)))*100;
VAR4:=SMA(VAR3,9,1);
VAR5:=SMA(VAR4,3,1);
J:=3*VAR4-2*VAR5;
A2:=EMA(VAR4,3);
A3:=EMA(A2,3);
A4:=EMA(A3,3);
A5:=EMA(A4,3);
AA:=EMA(A5,6);
中期大底:LLV(LOW,30),colorCDFFBB,PRECIS2;
VAR9:=HHVBARS(HIGH,50);
VAR11:=((CLOSE-REF(OPEN,VAR9))/REF(OPEN,VAR9))*100;
DRAWTEXT((CROSS(A4,AA) AND (VAR11<(0- 23))),(LOW-0.3),''),colorFF0000;
STICKLINE((CROSS(A4,AA) AND (VAR11<(0-23))),中期大底,(中期大底-0.27),4,0),colorFFFFFF;
CG:=MA(CLOSE,19);
CD:=MA(CLOSE,2);
MA20:=MA(CLOSE,20);
MA120:=MA(CLOSE,120);
支撑:=EMA(VAR1,5);
压力一:HHV(LOW,20),PRECIS2,Color00FFFF;
压力:HHV(支撑,60),colorD8CFBB,PRECIS2;
短期底部:LLV(HIGH,30),PRECIS2,Color00FF00;
DRAWTEXT(FILTER(((((((CLOSE>CG) AND (HIGH<上)) AND (CLOSE <上)) AND ((趋势线-REF(趋势线,3))>0)) AND ((趋势-REF(趋势,1))>=0)) AND CROSS(CD,CG)),5),(LOW-0.02),'大底成'),color4D84FF;
DRAWTEXT(FILTER(((CROSS(趋势,中期大底) AND (LOW<=中)) AND ((趋势-REF(趋势,1))>0)),3),(中期大底-0.08),'←分时拉升'),colorFF00FF;
DRAWTEXT(FILTER((CROSS(中,短期底部) AND ((趋势-REF(趋势,1))>0)),4),(中期大底-0.16),'←分时狂牛'),color430CC0;
aaa1:=ema(c,2);
bba1:=ema(aaa1,2);
aa:=ma(bba1,3);
aaa2:=ema((h+c+o)/3,18);
dd3:=aa>=aaa2 and c>aaa2;
dd4:=aa<aaa2 ;
dd5:=aa>aaa2 ;
STICKLINE((dd4 or dd5) and o<=c ,h,l,0.5,0),Color00cc99;
STICKLINE((dd4 or dd5) and o<=c ,c,o,7,0),Color00cc99;
STICKLINE((dd4 or dd5) and o>=c ,h,l,0.5,0),Color3F8C3A;
STICKLINE((dd4 or dd5) and o>=c ,c,o,7,0),Color3F8C3A;
STICKLINE((dd3 or c>aaa2) and o<=c,c,o,7,0),Colorred;
STICKLINE((dd3 or c>aaa2) and o<=c,h,l,0.5,0),Colorred;
STICKLINE((dd3 or c>aaa2) and o>=c,c,o,7,0),Colorff33ff;
STICKLINE((dd3 or c>aaa2) and o>=c,h,l,0.5,0),Colorff33ff;
STICKLINE(MA(C,13)>O and C>MA(C,13) and O<c,O,C,8,0),coloryellow;
STICKLINE(MA(C,13)>O and C>MA(C,13),H,L,0.8,1),coloryellow;
上一:=(SMA(HIGH,21,2)*1.05);
DRAWTEXT((((((CLOSE<REF(CLOSE,1)) AND ((上-REF(上,1))<0)) AND (CLOSE<REF(CLOSE,1))) AND (HIGH>上一)) AND (CLOSE<上一)),(HIGH+0.13),'←分时短线'),colorFFFFFF;

VARQ:=MA(CLOSE,152);
VARW:=MA(CLOSE,194.16);
VARE:=(VARW+(2*STD(CLOSE,170)));
VARR:=(VARQ+(2*STD(CLOSE,170)));
VART:=IF((DATE>1080822),0,1);
VAR61:=EMA(HHV(HIGH,500),21);
VAR71:=EMA(HHV(HIGH,250),21);
VAR81:=EMA(HHV(HIGH,90),21);
VAR91:=EMA(LLV(LOW,500),21);
VARA1:=EMA(LLV(LOW,250),21);
VARB1:=EMA(LLV(LOW,90),21);
VARC1:=EMA(((VAR91*0.96+VARA1*0.96+VARB1*0.96+VAR61*0.558+VAR71*0.558+VAR81*0.558)/6),21);
VARD1:=EMA(((VAR91*1.25+VARA1*1.23+VARB1*1.20+VAR61*0.550+VAR71*0.550+VAR81*0.650)/6),21);
VARE1:=EMA(((VAR91*1.30+VARA1*1.30+VARB1*1.30+VAR61*0.680+VAR71*0.680+VAR81*0.680)/6),21);
VARF1:=EMA((((VARC1*3+VARD1*2+VARE1)/6)* 1.738),21);

VAR101:=REF(LOW,1);
VAR111:=((SMA(ABS((LOW-VAR101)),3,1)/SMA(MAX((LOW-VAR101),0),3,1))*100);
VAR121:=EMA(IF(((CLOSE*1.35)<=VARF1),(VAR111*10),(VAR111/10)),3);
VAR131:=LLV(LOW,30);
VAR141:=HHV(VAR121,30);
VAR151:=IF(MA(CLOSE,58),1,0);
VAR161:=(EMA(IF((LOW<=VAR131),((VAR121+(VAR141*2))/2),0),3)/618)*VAR151;
VAR171:=((IF((VAR161>50),50,VAR161)/20)*15)*VART;
主力吸筹:VAR171>中期大底,colorFF00FF,linethick0;
STICKLINE(VAR171>中期大底,中期大底,(中期大底-0.05),1,0),colorFF00FF;
DRAWTEXT(FILTER((((((LOW<=趋势) AND (CLOSE>趋势)) AND (VAR171>0)) AND ((趋势-REF(趋势,1))>0)) AND (CLOSE>OPEN)),5),(LOW-0.04),'←分时黑马'),color8CF800;

B1:=(HIGH+LOW+CLOSE)/3;
B6:=HHV(B1,4*15);
B7:=LLV(B1,4*15);
B8:=B6-B7;
飞龙顶底线:=MA(((B1-B7)/B8),2)*80;
DRAWTEXT(FILTER(((((飞龙顶底线<=1) AND (VAR171>0)) AND (LOW<=趋势)) AND (CLOSE>趋势)),3),(LOW-0.04),'←分时短抄'),colorFFFF00;
DRAWTEXT(FILTER((((LOW <= 趋势) AND (CLOSE >= 趋势)) AND ((趋势 - REF(趋势,1))>0)),8),(中期大底 - 0.08),'←分时半仓'),color87D826;
DRAWTEXT((((CROSS(中,短期底部) AND (HIGH<压力一)) AND (HIGH<上)) AND ((趋势-REF(趋势,1))>0)),LOW,'←分时必杀'),colorFFFFFF;
均五:=MA(CLOSE,4);
X7:=EMA(EMA(EMA(HIGH,9),9),9);
海底:=X7*0.92;
海底二:=X7*0.933;
海底三:=X7*0.897;
天际:=X7*1.05;
中线:=SMA(LOW,5,1);
中轨道:=MA(CLOSE,2);
DRAWTEXT(FILTER(((((HIGH>压力) AND (CLOSE<压力)) AND ((趋势-REF(趋势,1))<0)) AND (CLOSE<OPEN)),5),(HIGH+0.12),'●逃'),colorFFFF00;
MA12:=MA(CLOSE,P);
MA42:=MA(CLOSE,42);
DRAWTEXT((((CROSS(中轨道,均五) AND (LOW<=海底)) AND ((均五-REF(均五,1))>0)) AND (CLOSE>=海底二)),LOW,' 底部'),Color00FFFF;
DRAWTEXT(((((CROSS(中轨道,海底) AND VAR171) AND (LOW<=海底)) AND ((MA20-REF(MA20,1))>0)) AND (CLOSE>海底)),(LOW-0.06),'小底不急'),colorBCF0AF;
DRAWTEXT(((((CROSS(中轨道,海底三) AND (CLOSE>OPEN)) AND ((CLOSE-REF(CLOSE,4))>0)) AND (LOW<=海底三)) AND (CLOSE>海底三)),LOW,'底二'),colorFF0000;
MA30:=MA(CLOSE,30);

V1:=HHVBARS(HIGH,100);
V2:=CROSS(MA(CLOSE,10),MA(CLOSE,30));
V3:=(V1>60 AND V2)*100;
DRAWTEXT((((((V3 AND (HIGH<上)) AND (CLOSE<压力)) AND (CLOSE>OPEN)) AND ((上-REF(上,1))>0)) AND ((趋势-REF(趋势,1))>0)),(LOW-0.04),'←量价齐升'),color8B0CFF;
DRAWTEXT(((((V3 AND (HIGH<趋势)) AND (HIGH<天际)) AND ((支撑-REF(支撑,1))>0)) AND ((MA20-REF(MA20,1))>0)),(LOW-0.03),'分时波段介入'),color5BA8FF;
DRAWTEXT(((CROSS(趋势,MA12) AND (CLOSE>OPEN)) AND ((趋势-REF(趋势,1))>0)),LOW,'分时果断'),colorFF0000;
DRAWTEXT(FILTER(((((((((CROSS(支撑,MA12) AND ((MA12-REF(MA12,1))>0)) AND (HIGH<上)) AND (OPEN<压力一)) AND ((CLOSE-REF(CLOSE,1))>0)) AND ((MA42-REF(MA42,1))>0)) AND (支撑<压力)) AND (支撑>MA12)) AND ((趋势-REF(趋势,1))>0)),6),(LOW-0.02),'←分时回抽'),color4DFFFF;
DRAWTEXT((((LOW<=趋势) AND (CLOSE>=支撑)) AND ((MA120-REF(MA120,1))>0)),(LOW-0.35),'抄底'),colorFF0000;
DRAWTEXT(FILTER(((((((LOW<=短期底部) AND ((上-REF(上,1))>0)) AND ((上-REF(上,1))>0)) AND (CLOSE>OPEN)) AND (趋势线<=短期底部)) AND (CLOSE>=短期底部)),5),(LOW-0.03),'←分时望月'),colorA99FFF;

VAR22:=(CLOSE+HIGH+LOW)/3;
VAR33:=EMA(VAR22,10);
VAR44:=REF(VAR33,1);
FILLRGN(VAR33,VAR44,VAR33 > VAR44),Color0000FF;
FILLRGN(VAR44,VAR33,VAR33 < VAR44),Color00FF00;
DRAWTEXT(FILTER((((LOW<=中期大底) AND ((趋势-REF(趋势,1))>0)) AND VAR171),5),(LOW-0.03),'←●买点出现');
DRAWTEXT(((((LOW<=下档线) AND (LOW<=短期支撑)) AND (短期支撑<=下档线)) AND ((MA20-REF(MA20,1))> 0)),LOW,'←绝佳买点'),colorFF0000;
DRAWTEXT(((((CROSS(VAR33,MA20) AND (LOW<=VAR33)) AND (CLOSE>= VAR33)) AND ((趋势-REF(趋势,2))>0)) AND ((VAR33-REF(VAR33,1))>0)),LOW,'←回头望月'),colorFFFFFF;
DRAWTEXT(FILTER((((HIGH>压力) AND (CLOSE<压力)) AND (HIGH>阻挡线)),8),HIGH,'←减仓'),colorB0FA00;

cpbd:=f10find('☆[操盘必读]☆',1);
zxzb:=f10find('◆ 最新指标',cpbd+1);
zxsjsj:=f10find('◇万国测评制作',cpbd+1);
hydw:=f10find('◆ 行业地位 ◆',1000);
gxsj:=f10find('◇万国测评制作:',hydw);
zjsj:=f10text(gxsj,36);
hydw1:=f10find('所属行业:',hydw+1);
hydw3:=f10find('证监会行业:',hydw1+1);
hydw2:=f10find('截止日期:',hydw3+1);
IF hydw1>0 and hydw3>0 and hydw2>0THEN
BEGIN
zjh:=f10text(hydw3,hydw2-hydw3);
hydw4:=f10find('共',hydw3+1);
js:=strtonum(f10text(hydw4+2,3));
sj:=f10text(hydw2,19);
mgsy:=f10find('每股收益 排名',hydw2+1);
mgsy1:=f10find('净资产收 排名',mgsy+1);
gpszh:=f10find(STKLABEL,mgsy);
f10str:=f10text(gpszh,73);
dm:=strleft(f10str,15);
每股收益排:strtonum(strright(f10str,3)),linethick0,PRECIS2,colorgray;
gpszh1:=f10find(STKLABEL,mgsy1);
f10str1:=f10text(gpszh1,73);
净利润排:strtonum(f10text(gpszh1+56,3)),linethick0,PRECIS2,colorgray;
主营收入排:strtonum(f10text(gpszh+56,3)),linethick0,precis2,colorgray;
净资产收益排:strtonum(strright(f10str1,3)),linethick0,precis2,colorgray;
综合排名值:每股收益排+净利润排+主营收入排+净资产收益排,linethick0,precis2,colorff00a0;
zytb:=f10find('主营收入同比增长',cpbd+1);
主营收入同比:strtonum(f10text(zytb+20,10)),linethick0,PRECIS2,colorgray;
jll:=f10find('净利润同比增长',zytb+1);
净利润同比:strtonum(f10text(jll+20,10)),linethick0,PRECIS2,colorgray;
jzc:=f10find('净资产收益率',jll+1);
净资产收益率:strtonum(f10text(jzc+20,10)),linethick0,precis2,colorgray;
zxsj:=f10text(zxzb,zxsjsj-5-zxzb);
gxsjy:=f10text(zxsjsj,34);
{--------图解模版---------}
DRAWTEXTABS(20,40,zxsj+''+gxsjy),ColorFFFFFF;
DRAWTEXTABS(20,60,'主营收入同比增长 '+主营收入同比+' %'+'净利润同比增长'+净利润同比+' %'+' 净资产收益率 '+净资产收益率+' %'),ColorFFFFFF;
DRAWTEXTABS(20,80,sj+''+zjsj),ColorFFFFFF;
DRAWTEXTABS(20,100,zjh),ColorFFFFFF;
DRAWTEXTABS(20,120,'每股收益在本行业内排第 '+每股收益排+' 位 '+'净利润金额在本行业内排第 '+净利润排+' 位'),ColorFFFFFF;
DRAWTEXTABS(20,140,'主营收入在本行业内排第 '+主营收入排+' 位 '+'净资产收益在本行业内排第 '+净资产收益排+' 位'),ColorFFFFFF;
DRAWTEXTABS(20,160,dm+' 在本行业综合排名分值:'+综合排名值),Color00FFF8,linethick2;
DRAWTEXTABS(20,180,'机构当前评级:'+EXTRASTRING('评级')),Color00FFF8,linethick2;

三、均线主图

{星期显示}
yy1:=WEEKDAY;
IF BARSTATUS=2 and (yy1=5) THEN BEGIN DRAWTEXTREL(10,950,'■星期五■'),LINETHICK2,Color0048EE;end;
IF BARSTATUS=2 and (yy1=4) THEN BEGIN DRAWTEXTREL(10,950,'■星期四■'),LINETHICK2,Color3056FF;end;
IF BARSTATUS=2 and (yy1=3) THEN BEGIN DRAWTEXTREL(10,950,'■星期三■'),LINETHICK2,Color7156FF;end;
IF BARSTATUS=2 and (yy1=2) THEN BEGIN DRAWTEXTREL(10,950,'■星期二■'),LINETHICK2,Color936AFF;end;
IF BARSTATUS=2 and (yy1=1) THEN BEGIN DRAWTEXTREL(10,950,'■星期一■'),LINETHICK2,ColorD4A3FF;end;
IF BARSTATUS=2 and (yy1=6) THEN BEGIN DRAWTEXTREL(10,950,'■星期六■'),LINETHICK2,Color05FF00;end;
IF BARSTATUS=2 and (yy1=0) THEN BEGIN DRAWTEXTREL(10,950,'■星期日■'),LINETHICK2,Color0000FF;end;

{均线语言 箱体空间}
if DISPSTATUS=2 then aaa:=BARPOS;
if DISPSTATUS=1 then bbb:=BARPOS;
ddd:=aaa-bbb;
ee:=hhv(h,ddd);
MSTATUS:=BARSTATUS=2;
MA5:MA(C,5),PRECIS2;
MA10:MA(C,10),PRECIS2;
MA30:MA(C,30),PRECIS2;
MA60:MA(C,60),PRECIS2,LINETHICK2;
MA125:MA(C,125),ColorFFFF00,PRECIS2,LINETHICK2;
MA250:MA(C,250),PRECIS2,LINETHICK2;
i:=1;
IF MSTATUS and (MA5 > MA10 and MA10 > MA30 and MA5 > MA30) THEN BEGIN DRAWTEXTABS(0,i*16,'短期均线多头排列。股价高位谨防筑顶。中低位当股价向上突破5、10、30日均线,均线呈多头排列是最佳买入时机。'+ma5+' > '+ma10+' > '+ma30+';'),COLORRED,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA5 < MA10 and MA10 < MA30 and MA5 < MA30) THEN BEGIN DRAWTEXTABS(0,i*16,'短期均线空头排列。股价高位谨防弃庄,卖盘涌出破位下跌。中低位当股价向下突破5、10、30日均线,均线呈空头排列时,注意观察股价所处箱体位置。'+ma5+' < '+ma10+' < '+ma30+';'),COLORGREEN,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA30 > MA60 and MA30 > MA125 and MA60 > MA125) THEN BEGIN DRAWTEXTABS(0,i*16,'中期均线多头排列。注意股价突然下跌,当股价回档至当前盘面30、60、125日任一均线获得支撑,关注均线助涨,次日股价放量向上突破,是中长期最佳买入时机。'+ma30+' > '+ma60+' > '+ma125+';'),COLORRED,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA30 < MA60 and MA30 < MA125 and MA60 < MA125) THEN BEGIN DRAWTEXTABS(0,i*16,'中期均线空头列排。30、60、125日中长期均线下行呈空头排列,注意箱体上下撑压或无量空跌。'+ma30+' < '+ma60+' < '+ma125+';'),COLORGREEN,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA60 > MA125 and MA125 > MA250 and MA60 > MA250) THEN BEGIN DRAWTEXTABS(0,i*16,'长期均线多头排列。即60,125,250日均线向上多头排列。注意:当股价处于箱体顶部,所有均线多头排列,股价反复震荡不能突破,可能顶部即将形成。'+ma60+' > '+ma125+' > '+ma250+';'),COLORRED,ALIGN0,LINETHICK1;
i:=i+1; END;
IF MSTATUS and (MA60 < MA125 and MA125 < MA250 and MA60 < MA250) THEN BEGIN DRAWTEXTABS(0,i*16,'长期均线空头排列。即60,125,250日均线向下空头排列。注意:当所有均线空头排列的时候,股价处于箱体的一个次高位,中位,或箱体下沿,可能是阶段底部的形成。 '+ma60+' < '+ma125+' < '+ma250+';'),COLORGREEN,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (CROSS(MA5,MA10)) THEN BEGIN DRAWTEXTABS(0,i*16,'短期5日10日均线金叉。注意观察股价在箱体的位置,30日和其他均线是否成为股价上涨的阻力,或股价在高位的运行方向,判断是反转上涨还是下跌中途的小反弹。'),COLORRED,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (CROSS(MA10,MA5)) THEN BEGIN DRAWTEXTABS(0,i*16,'短期5日10日均线死叉。当股价反弹遭遇30日和其他均线的阻力形成死叉,可能是股价下跌中途的小反弹。高位区死叉,必须逃顶或止损。'),COLORGREEN,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (CROSS(C,MA125)) THEN BEGIN DRAWTEXTABS(0,i*16,'今日股价上穿半年线。在半年线上方运行的个股被称为强势股。适合中小资金根据短线技术指标套利操作。'),COLORFF00FF,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (CROSS(MA125,C)) THEN BEGIN DRAWTEXTABS(0,i*16,'今日股价跌破半年线。在半年线下方运行的个股被称为弱势股。适合大资金进场吸筹操作。'),COLORGREEN,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (CROSS(C,MA250)) THEN BEGIN DRAWTEXTABS(0,i*16,'今日股价上穿年线。股票筑底后,股价经过反复震荡洗盘上穿年线,予以锁定跟踪。'),COLORFF00FF,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (CROSS(MA250,C)) THEN BEGIN DRAWTEXTABS(0,i*16,'今日股价跌破年线。跌破年线,证明深度调整格局可能形成。如果后市股价继续深跌,调整时间和空间难以预测。'),COLORGREEN,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (CROSS(C,MA60) and CROSS(C,MA125) and CROSS(C,MA250)) THEN BEGIN DRAWTEXTABS(0,i*16,'股价一阳穿三线。5、10、30日均线三线合一,股价一阳穿三线,向上反转,可能变盘反转在即。'),COLORRED,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA30 > REF(MA30,1)) THEN BEGIN DRAWTEXTABS(0,i*16,'30日均线趋势向上。注意:如果股价在低位中位30日均线之上,围绕另一条重要均线缩量横盘,随后5-10日均线金叉,所有均线向上呈多头排列,是中长期绩优牛股的摇篮。'),COLORRED,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA30 > REF(MA30,1) AND MA30 < REF(MA30,1)*1.001) THEN BEGIN DRAWTEXTABS(0,i*16,'30日均线趋势走平。需观察5日和10日均线方向,如30日均线发出趋势向下信号,5日10日均线形成死叉,注意减仓或出货。'),COLORFFCC66,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA30 < REF(MA30,1)) THEN BEGIN DRAWTEXTABS(0,i*16,'30日均线趋势向下。关注股价所处箱体位置,如股价当前上涨或下跌时,则需观察箱体阻力支撑位置。如果股价处于远离30日均线位置,一般情况下股价反弹空间有限。'),COLORGREEN,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA5 > REF(MA5,1)*1.015) THEN BEGIN DRAWTEXTABS(0,i*16,'5日均线强劲向上。需观察股价所处其他均线和箱体位置,如果收盘时股价突然跌破5日均线,则需观察箱体下方支撑,提防空头陷阱,股价转向。'),COLORRED,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA5 > REF(MA5,1) AND MA5 < REF(MA5,1)*1.005) THEN BEGIN DRAWTEXTABS(0,i*16,'5日均线方向不明。当股价连续跌破5日均线和箱体下沿,导致股价方向开始向下,绩优股应适当做空;股价在箱体内则需观察股价下方的重要均线位置,可否获得支撑。'),COLORYELLOW,ALIGN0,LINETHICK1;
i:=i+1;
END;
IF MSTATUS and (MA5 < REF(MA5,1)*0.985) THEN BEGIN DRAWTEXTABS(0,i*16,'5日均线快速向下,短线风险可能降临。需结合其他均线运行方向分析,如果股价在一个大箱体中,则需观察下方均线支撑,偌收盘前股价获得支撑,5-10均线金叉并数日向上,则可顺势而为做多。'),COLORGREEN,ALIGN0,LINETHICK1;
i:=i+1;
END;
if DISPSTATUS=2 then begin;
var100:='■所属行业板块:';
if inblock('电力')=1 then var100:=var100+'电力。';
if inblock('电力设备')=1 then var100:=var100+'电力设备。';
if inblock('电器')=1 then var100:=var100+'电器。';
if inblock('电子信息')=1 then var100:=var100+'电子信息。';
if inblock('房地产')=1 then var100:=var100+'房地产。';
if inblock('纺织服装')=1 then var100:=var100+'纺织服装。';
if inblock('钢铁')=1 then var100:=var100+'钢铁。';
if inblock('工程建筑')=1 then var100:=var100+'工程建筑。';
if inblock('供水供气')=1 then var100:=var100+'供水供气。';
if inblock('化工')=1 then var100:=var100+'化工。';
if inblock('化纤')=1 then var100:=var100+'化纤。';
if inblock('机械')=1 then var100:=var100+'机械。';
if inblock('计算机')=1 then var100:=var100+'计算机。';
if inblock('建材')=1 then var100:=var100+'建材。';
if inblock('交通工具')=1 then var100:=var100+'交通工具。';
if inblock('交通设施')=1 then var100:=var100+'交通设施。';
if inblock('教育传媒')=1 then var100:=var100+'教育传媒。';
if inblock('旅游酒店')=1 then var100:=var100+'旅游酒店。';
if inblock('煤炭石油')=1 then var100:=var100+'煤炭石油。';
if inblock('酿酒食品')=1 then var100:=var100+'酿酒食品。';
if inblock('农林牧渔')=1 then var100:=var100+'农林牧渔。';
if inblock('其他行业')=1 then var100:=var100+'其他行业。';
if inblock('汽车')=1 then var100:=var100+'汽车。';
if inblock('汽配')=1 then var100:=var100+'汽配。';
if inblock('券商')=1 then var100:=var100+'券商。';
if inblock('商业连锁')=1 then var100:=var100+'商业连锁。';
if inblock('石化')=1 then var100:=var100+'石化。';
if inblock('通信')=1 then var100:=var100+'通信。';
if inblock('外贸')=1 then var100:=var100+'外贸。';
if inblock('医药')=1 then var100:=var100+'医药。';
if inblock('仪电仪表')=1 then var100:=var100+'仪电仪表。';
if inblock('银行类')=1 then var100:=var100+'银行类。';
if inblock('有色金属')=1 then var100:=var100+'有色金属。';
if inblock('运输物流')=1 then var100:=var100+'运输物流。';
if inblock('造纸印刷')=1 then var100:=var100+'造纸印刷。';
if inblock('其他制造业')=1 then var100:=var100+'其他制造业。';
if inblock('安徽')=1 then var100:=var100+'所属地区:安徽。';
if inblock('北京')=1 then var100:=var100+'所属地区:北京。';
if inblock('福建')=1 then var100:=var100+'所属地区:福建。';
if inblock('甘肃')=1 then var100:=var100+'所属地区:甘肃。';
if inblock('广东')=1 then var100:=var100+'所属地区:广东。';
if inblock('广西')=1 then var100:=var100+'所属地区:广西。';
if inblock('贵州')=1 then var100:=var100+'所属地区:贵州。';
if inblock('海南')=1 then var100:=var100+'所属地区:海南。';
if inblock('河北')=1 then var100:=var100+'所属地区:河北。';
if inblock('河南')=1 then var100:=var100+'所属地区:河南。';
if inblock('黑龙江')=1 then var100:=var100+'所属地区:黑龙江。';
if inblock('湖北')=1 then var100:=var100+'所属地区:湖北。';
if inblock('湖南')=1 then var100:=var100+'所属地区:湖南。';
if inblock('吉林')=1 then var100:=var100+'所属地区:吉林。';
if inblock('江苏')=1 then var100:=var100+'所属地区:江苏。';
if inblock('江西')=1 then var100:=var100+'所属地区:江西。';
if inblock('辽宁')=1 then var100:=var100+'所属地区:辽宁。';
if inblock('内蒙古')=1 then var100:=var100+'所属地区:内蒙古。';
if inblock('宁夏')=1 then var100:=var100+'所属地区:宁夏。';
if inblock('青海')=1 then var100:=var100+'所属地区:青海。';
if inblock('山东')=1 then var100:=var100+'所属地区:山东。';
if inblock('山西')=1 then var100:=var100+'所属地区:山西。';
if inblock('陕西')=1 then var100:=var100+'所属地区:陕西。';
if inblock('上海')=1 then var100:=var100+'所属地区:上海。';
if inblock('深圳')=1 then var100:=var100+'所属地区:深圳。';
if inblock('四川')=1 then var100:=var100+'所属地区:四川。';
if inblock('天津')=1 then var100:=var100+'所属地区:天津。';
if inblock('西藏')=1 then var100:=var100+'所属地区:西藏。';
if inblock('新疆')=1 then var100:=var100+'所属地区:新疆。';
if inblock('云南')=1 then var100:=var100+'所属地区:云南。';
if inblock('浙江')=1 then var100:=var100+'所属地区:浙江。';
if inblock('重庆')=1 then var100:=var100+'所属地区:重庆。';
if inblock('3G')=1 then var100:=var100+' 3G概念→';
if inblock('CDM项目')=1 then var100:=var100+' CDM项目概念→';
if inblock('H股')=1 then var100:=var100+' H股概念→';
if inblock('QFII持股')=1 then var100:=var100+'QFII持股概念→';
if inblock('ST')=1 then var100:=var100+'ST概念→';
if inblock('S板')=1 then var100:=var100+'S板概念→';
if inblock('奥运')=1 then var100:=var100+'奥运概念→';
if inblock('参股金融')=1 then var100:=var100+'参股金融概念→';
if inblock('成渝特区')=1 then var100:=var100+'成渝特区概念→';
if inblock('出口退税')=1 then var100:=var100+'出口退税概念→';
if inblock('次新股')=1 then var100:=var100+'次新股概念→';
if inblock('大订单')=1 then var100:=var100+'大订单概念→';
if inblock('大盘')=1 then var100:=var100+'大盘概念→';
if inblock('中盘')=1 then var100:=var100+'中盘概念→';
if inblock('小盘')=1 then var100:=var100+'小盘概念→';
if inblock('低价')=1 then var100:=var100+'低价概念→';
if inblock('低市净率')=1 then var100:=var100+'低市净率→';
if inblock('中价')=1 then var100:=var100+'中价概念→';
if inblock('定向增发')=1 then var100:=var100+'定向增发概念→';
if inblock('封闭基金')=1 then var100:=var100+'封闭基金概念→';
if inblock('高价')=1 then var100:=var100+'高价概念→';
if inblock('公募增发')=1 then var100:=var100+'公募增发概念→';
if inblock('股权改革')=1 then var100:=var100+'股权改革概念→';
if inblock('股权激励')=1 then var100:=var100+'股权激励概念→';
if inblock('股权投资')=1 then var100:=var100+'股权投资概念→';
if inblock('航天军工')=1 then var100:=var100+'航天军工概念→';
if inblock('沪深300')=1 then var100:=var100+'沪深300概念→';
if inblock('基金重仓')=1 then var100:=var100+'基金重仓→';
if inblock('节能环保')=1 then var100:=var100+'节能环保概念→';
if inblock('可转债')=1 then var100:=var100+'可转债概念→';
if inblock('农业龙头')=1 then var100:=var100+'农业龙头概念→';
if inblock('清欠')=1 then var100:=var100+'清欠概念→';
if inblock('权证')=1 then var100:=var100+'权证概念→';
if inblock('券商重仓')=1 then var100:=var100+'券商重仓概念→';
if inblock('社保重仓')=1 then var100:=var100+'社保重仓概念→';
if inblock('深成40')=1 then var100:=var100+'深成40概念→';
if inblock('数字电视')=1 then var100:=var100+'数字电视概念→';
if inblock('税收优惠')=1 then var100:=var100+'税收优惠概念→';
if inblock('送转')=1 then var100:=var100+'送转概念→';
if inblock('外资并购')=1 then var100:=var100+'外资并购概念→';
if inblock('网络游戏')=1 then var100:=var100+'网络游戏概念→';
if inblock('稀缺资源')=1 then var100:=var100+'稀缺资源概念→';
if inblock('预亏预减')=1 then var100:=var100+'预亏预减概念→';
if inblock('预盈预增')=1 then var100:=var100+'预盈预增概念→';
if inblock('整体上市')=1 then var100:=var100+'整体上市概念→';
if inblock('低市盈利')=1 then var100:=var100+'低市盈利概念→';
if inblock('新能源')=1 then var100:=var100+'新能源概念→';
if inblock('新材料')=1 then var100:=var100+'新材料概念→';
if inblock('新上海')=1 then var100:=var100+'新上海概念→';
if inblock('注资承诺')=1 then var100:=var100+'注资承诺概念→';
if inblock('中小板指')=1 then var100:=var100+'中小板指概念→';
end;
DRAWTEXTABS(10,160,var100),Color00FF00;
均线60角度:=atan((MA(C,60)/ref(MA(C,60),3)-1)*100)*180/3.14159;
均线125角度:=atan((MA(C,125)/ref(MA(C,125),3)-1)*100)*180/3.14159;
均线250角度:=atan((MA(C,250)/ref(MA(C,250),3)-1)*100)*180/3.14159;
DRAWTEXTABS(10,140,'■60天均线角度:'+NUMTOSTRN(均线60角度,2)+''),ColorRED;
DRAWTEXTABS(160,140,'■125天均线角度:'+NUMTOSTRN(均线125角度,2)+''),ColorRED;
DRAWTEXTABS(315,140,'■250天均线角度:'+NUMTOSTRN(均线250角度,2)+''),ColorRED;
DRAWTEXTABS(10,180,'■当前机构评级:'+EXTRASTRING('评级')),LINETHICK1,Color00FF00;
DRAWTEXTABS(10,200,'------------------------------------------------------------------------------------'),LINETHICK1,Color80BEFF;
{箱体空间}
NN:= DISPSTATUS=2;
A1:=REF(HIGH,3)=HHV(HIGH,2*3+1);
B1:=FILTER(A1,3);
C1:=BACKSET(B1,3+1);
D1:=FILTER(C1,3);
A2:=REF(LOW,3)=LLV(LOW,2*3+1);
B2:=FILTER(A2,3);
C2:=BACKSET(B2,3+1);
D2:=FILTER(C2,3);
E1:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;
E2:=(HIGH+LOW)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
L1:=(D2 AND NOT(D1 AND E1=E2));
X1:=REF(BARSLAST(H1),1)+1;
F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR BARSTATUS OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H1,X2)>0,HHVBARS(IF(H1,HIGH,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
UU:=BACKSET(BARSTATUS,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
UU2:=BACKSET(BARSTATUS,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
前一低支撑:REF(L,BARSLAST(VV)),PRECIS2,COLOR99FF66,LINETHICK1,DOTLINE;
箱体下沿:REF(L,BARSLAST(XX)),ColorFFFF00,PRECIS2;
前一高压力:REF(H,BARSLAST(VV2)),PRECIS2,COLOR99FF66,LINETHICK1,DOTLINE;
箱体上沿:REF(H,BARSLAST(XX2)),PRECIS2,Color00FFFF;
DRAWTEXT(nn,前一低支撑,'前一低支撑: '+NUMTOSTRN(前一低支撑,2)+'元'),ALIGN2,Color00dd00,VALIGN0;
DRAWTEXT(nn,前一高压力,'前一高压力: '+NUMTOSTRN(前一高压力,2)+'元'),ALIGN2,Color00dd00,VALIGN2;
DRAWTEXT(nn,箱体下沿,'箱体下沿: '+NUMTOSTRN(箱体下沿,2)+'元'),ALIGN2,ColorFFFF00,LINETHICK1,VALIGN0;
DRAWTEXT(nn,箱体上沿,'箱体上沿: '+NUMTOSTRN(箱体上沿,2)+'元'),ALIGN2,Color00FFFF,LINETHICK1,VALIGN2;


四、拾金图(主图)

SSL:=EMA(CLOSE,3);
MMV:=EMA(((SLOPE(CLOSE,22) * 20) + CLOSE),55);
MM:=(IF(((DATATYPE > 5) AND (DATATYPE < 9)),MA(MMV,1),IF((DATATYPE = 5),MA(MMV,4),IF((DATATYPE = 4),MA(MMV,8),IF((DATATYPE = 3),MA(MMV,16),IF((DATATYPE = 2),MA(MMV,32),0))))) );
STICKLINE(((SSL > MM) ),SSL,MM,0.1,0),colorred;
SA:=(MM * 0.985);
SS:=(MA(CLOSE,5));
DD:=(MA(CLOSE,13));
GG:=(MA(CLOSE,21));
财神爷:IF(((SSL > MM)),MM,SA),LINETHICK2,colorFF00FF;
VAR2Y:=(((CLOSE - REF(CLOSE,1)) / REF(CLOSE,1)) * 100);
VAR3Y:=(((CLOSE - REF(OPEN,29)) / REF(OPEN,29)) * 100);
VAR4Y:=REF(CLOSE,1);
VAR5Y:=((SMA(MAX((CLOSE - VAR4Y),0),6,1) / SMA(ABS((CLOSE - VAR4Y)),6,1)) * 100);
VAR6Y:=((SMA(MAX((CLOSE - VAR4Y),0),12,1) / SMA(ABS((CLOSE - VAR4Y)),12,1)) * 100);
VAR7Y:=((SMA(MAX((CLOSE - VAR4Y),0),24,1) / SMA(ABS((CLOSE - VAR4Y)),24,1)) * 100);
VAR8Y:=(((CLOSE - LLV(LOW,45)) / (HHV(HIGH,45) - LLV(LOW,45))) * 100);
VAR9Y:=SMA(VAR8Y,3,1);
VARAY:=SMA(VAR9Y,3,1);
VARBY:=((3 * VAR9Y) - (2 * VARAY));
VARCY:=(CROSS(VAR5Y,10) AND (VAR3Y < (0 - (28 * 20))));
VARDY:=((100 - CROSS(76,VAR5Y)) AND (VAR3Y > (5 * 20)));
DRAWICON(((CROSS(76,VAR5Y) AND (VAR3Y > 5)) ),(HIGH * 1.01),5),colorFFFFFF;
VAREY:=((((CROSS(VAR9Y,VARAY) AND (VARAY < 10)) AND (VAR3Y < (0 - 30))) AND (VAR2Y > 3)) * 30);
VARFY:= - ((((VARAY < 11) AND (VAR5Y < 15)) AND (VAR3Y < (0 - 26))) * 10);
DRAWICON((CROSS(VARFY,(0 - 9))),(LOW * 0.998),4);
能量线:=DMA(((CLOSE + OPEN) / 2),(VOL / (SMA(VOL,4,1) * 4)));

上开:=o;
上收:=c;
上高:=h;
上低:=l;
JJ:=(上开+上高+上低)/3;
A:=EMA(JJ,4);
B:REF(A,1),POINTDOT,COLORYELLOW;
智能黄金线:A,COLORYELLOW,LINETHICK1;
STICKLINE(((SSL < MM) ),财神爷,智能黄金线,0.1,0),COLORCYAN;
VA1:=EMA(上收,8);
VA2:=EMA(上收,20);
DRAWTEXT(CROSS(VA2,VA1),VA1*1.10,'止损'),ALIGN1,COLORyellow;
DRAWTEXT(CROSS(VA1,VA2)AND(C>=O)AND 智能黄金线>REF(智能黄金线,1),VA1*0.98,'买入'),COLOR00FF00;
选手A:=MA(上收,3);
箱顶A:=MA(REF(HHV(上收,6),1),3);
箱底A:=MA(REF(LLV(上收,3),1),3);
t1:=MA(上收,20)>=REF(MA(上收,20),1);
t2:=CROSS(选手A,箱底A) AND 箱顶A/箱底A>100/100 AND t1;
t3:=CROSS(箱顶A,选手A) AND 箱顶A/箱底A>100/100;
选手:=MA(上收,2);
箱顶:MA(REF(HHV(上收,30),1),2),COLOR0000FF,LINETHICK2;
箱底:MA(REF(LLV(上收,30),1),2),COLOR00FF00,LINETHICK2;
t4:=CROSS(选手,箱底) AND 箱顶/箱底>110/100;
t5:=CROSS(箱顶,选手) AND 箱顶/箱底>110/100;
Var1:=(上收-LLV(上低,27))/(HHV(上高,27)-LLV(上低,27))*100;
Var2:=SMA(Var1,3,1);
Var3:=SMA(Var2,3,1);
Var4:=SMA(Var3,3,1);
DRAWTEXT(Var3 >=Var4 and BARSTATUS=2,箱顶,'--中期好'),COLOR00FFFF;
DRAWTEXT( Var3<Var4 and BARSTATUS=2,箱顶,'--中期坏'),COLORf0f000;
DRAWTEXT( A>B and BARSTATUS=2,箱底,'--短期好'),COLOR00FFFF;
DRAWTEXT(A<B and BARSTATUS=2,箱底,'--短期坏'),COLORf0f000;

mms:=ma(sma((l+h+2*c)/4-ref((l+h+2*c)/4,1),5,1)/sma(abs((l+h+2*c)/4-ref((l+h+2*c)/4,1)),5,1)*100,1)+50;
g1:=if(-mms>95,0,20);
uoo:=(-(((CLOSE-LLV(CLOSE,7))/(HHV(CLOSE,7)-LLV(CLOSE,7))*100=100)>0 and g1)+1);
DRAWTEXT(CROSS(Var3,Var4)AND(C>=O)AND Var3<40 AND uoo>0,箱底,''),ALIGN0,COLORf00ff0;
DRAWTEXT(CROSS(Var4,Var3) AND Var4>75 ,箱顶*1.03,'减磅'),COLORf0f000;

{K线}
STICKLINE(C>=O,C,O,7,0),COLORRED;
STICKLINE(C>=O,C,O,4,0),COLORB0B0FF;
STICKLINE(C>=O,C,O,2,0),COLORYELLOW;
STICKLINE(C>=O,H,L,0,0),COLORYELLOW;
STICKLINE(C<=O,C,O,7,0),colorFFAA00;
STICKLINE(C<=O,C,O,4,0),COLORCYAN;
STICKLINE(C<=O,C,O,2,0),COLORCYAN;
STICKLINE(C<=O,H,L,0,0),COLORCYAN;

{K线卖提示}
Qc0:=3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1);
stickline(Qc0>=91 AND (CLOSE-LLV(CLOSE,5))/(HHV(CLOSE,5)-LLV(CLOSE,5))*100>99.9,open,close,3,0),COLOR3366FF;
stickline(Qc0>=91 AND (CLOSE-LLV(CLOSE,5))/(HHV(CLOSE,5)-LLV(CLOSE,5))*100>99.9,H,L,0.5,0),COLOR3366FF;

{K线超卖提示}
SQ1:=SMA(MAX(C-REF(C,2),0),7,1)/SMA(ABS(C-REF(C,2)),7,1)*100;
SQ2:=SMA(MAX(C-REF(C,1),0),7,1)/SMA(ABS(C-REF(C,1)),7,1)*100;
CM1:=IF(SQ1<12,30,0);
CM2:=IF(SQ2<12,30,0);
Zb1:=(CLOSE-LLV(CLOSE,10))/(HHV(CLOSE,10)-LLV(CLOSE,10))*100;
www:=Zb1<1;
w:=if(WWW,-20,0);
A01:=SMA(ABS((LOW - REF(LOW,1))),3,1) / SMA(MAX((LOW - REF(LOW,1)),0),3,1) *100;
A02:=EMA(IF(CLOSE *1.3,A01 *10,A01 /10),3);
A03:=LLV(LOW, 30);
A04:=HHV(A02, 30);
A05:=EMA(IF((LOW <= A03),(A02 + A04*2)/2,0),3) /6180 *2.5;
A06:=IF((A05 >15),15,A05);
Kx:=if(A06>=1.7,-20,0);
Zy:=MA(((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+2*(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100+3*(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100)/6,3);
Zy1:=IF(Zy<-6,-20,0);
KS:=(((CLOSE - SMA(CLOSE,13,1)) / SMA(CLOSE,13,1)) * (0 - 100));
RKS:=REF(KS,1);
MLS:=((((RKS / KS) > 1.23) AND (RKS > 13)) AND ((CLOSE / REF(CLOSE,1)) > 1.03));
{超卖一}STICKLINE(CM1 and IF(Kx and w and Zy1,-16,10)<0,L,L*0.998,7,0),Color0089FF{超卖一:橙};
{超卖二}STICKLINE(IF(Kx and w and Zy1,-16,10)<0 and CM1,L*0.998,L*0.996,7,0),COLORgreen{超卖二:绿};
{超跌}STICKLINE(CM1 and IF(Kx and w and Zy1,-16,10)<0 AND(KS>13),L*0.996,L*0.994,7,0),coloryellow{超跌};
{反弹}STICKLINE((MLS=1),L,L*0.998,7,0),ColorFFFF00;

{K线买提示}
趋势线:=FORCAST(CLOSE,7);
Fk:=100*(C-REF(C,1))/REF(C,1);
pk1:=IF(C<REF(O,1) AND fk<0,1,0);
pk2:=IF(C<REF(O,2) AND fk<0,1,0);
pk3:=(((CLOSE / OPEN) > 1.04) AND (CLOSE <(SMA(HIGH,21,2) * 1.05))) AND ((CLOSE - REF(CLOSE,1)) > 0);
stickline((Pk1=0 AND REF(Pk1,1)=1 AND Pk2=0 AND REF(Pk2,1)=1),open,CLOSE,3,0),COLORMAGENTA;
stickline((Pk1=0 AND REF(Pk1,1)=1 AND Pk2=0 AND REF(Pk2,1)=1),H,L,0.5,0),COLORMAGENTA;
STICKLINE(pk3 AND(趋势线>REF(趋势线,1)OR智能黄金线>REF(智能黄金线,1)),CLOSE,OPEN,3,0),COLORMAGENTA;
STICKLINE(pk3 AND(趋势线>REF(趋势线,1)OR智能黄金线>REF(智能黄金线,1)),H,L,0.5,0),COLORMAGENTA;

买进价:=((c-ref(ma(c,6),1))/6+ma(c,6))*1.004;
买进条件:=cross(c,买进价) and 买进价>ref(买进价,1);
STICKLINE(买进条件 AND 财神爷>智能黄金线AND 智能黄金线>REF(智能黄金线,1),L,L*0.998,7,0),COLORWHITE;

买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);
DRAWTEXT(cross(买线,卖线)AND 箱顶>=REF(箱顶,1),箱底,''),ALIGN0,color00ffff;
stickline(cross(买线,卖线),open,close,3,0),color00ffff;
stickline(cross(买线,卖线),h,l,0.5,0),color00ffff;

A4:=MA(CLOSE,20);
A5:=(CLOSE > MA(CLOSE,5));
A6:=(MA(CLOSE,5) > MA(CLOSE,10));
A7:=(CLOSE > MA(CLOSE,10));
A8:=(MA(CLOSE,5) > MA(CLOSE,20));
A9:=(CLOSE > MA(CLOSE,20));
A10:=REF(A4,1);
A11:=(A4 > A10);
AVX:=(((((IF(A5,10,(0 - 10)) + IF(A6,10,(0 - 10))) + IF(A7,10,(0 - 10))) + IF(A8,10,(0 - 10))) + IF(A9,10,(0 - 10))) + IF(A11,10,(0 - 10)));
DSLX:=(CLOSE / INDEXC);
DSLX1:=MA(DSLX,5);
DSLX2:=MA(DSLX,10);
V1:=MA(VOL,5);
V2:=MA(VOL,10);
阻力位:=IF((CLOSE > 200),(CLOSE * 1.01),(CLOSE * 1.07));
阻力位1:=IF((CLOSE < 10),(CLOSE * 1.05),阻力位);
止损位:=IF((CLOSE > 200),(CLOSE * 0.99),(CLOSE * 0.93));
止损位1:=IF((CLOSE < 10),(CLOSE * 0.95),止损位);
TJTS1:=BARSTATUS=2 and c<200;
TJTS2:=BARSTATUS=2 and c>200;
k2:=hhv(h,barslast(DISPSTATUS=1)+1);
DRAWTEXT(TJTS1 or TJTS2 ,k2*0.99,'阻力位:'+NUMTOSTRN(阻力位1,2)+' '),coloryellow,ALIGN2;
DRAWTEXT(TJTS1 or TJTS2 ,k2*0.99,'止损位:'+NUMTOSTRN(止损位1,2)+' '),coloryellow ,ALIGN2;

DRAWTEXT(TJTS1 and((CROSS(AVX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右。 '),ALIGN2,colorDC143C;
DRAWTEXT(TJTS1 and((CROSS(AVX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右。 '),ALIGN2,colorDC143C;
DRAWTEXT(TJTS1 and((CROSS(AVX,1) AND (V1 > V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右。 '),ALIGN2,colorDC143C;
DRAWTEXT(TJTS1 and((CROSS(AVX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右。 '),ALIGN2,color0000FF;
DRAWTEXT(TJTS1 and((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望。 '),ALIGN2,color00FF00;
DRAWTEXT(TJTS1 and((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓。 '),ALIGN2,color00FF00;


DRAWTEXT(TJTS1 and((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股放量下跌,走势明显偏弱,离场观望。 '),ALIGN2,color00FF00;
DRAWTEXT(TJTS1 and((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股缩量下跌,走势偏弱,离场观望。 '),ALIGN2,color00FF00;
DRAWTEXT(TJTS1 and((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股形态良好,强势明显,量能充足,可以继续持有。 '),ALIGN2,color00FFFF;
DRAWTEXT(TJTS1 and((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股上行趋势不变,强势依然,但量能开始转弱,注意风险。 '),ALIGN2,color00FFFF;
DRAWTEXT(TJTS1 and((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股仍然具备上涨潜力,但股性偏弱,可考虑减仓。 '),ALIGN2,color00FFFF;
DRAWTEXT(TJTS1 and((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股走势趋弱,量能不足,减持大部分筹码。 '),ALIGN2,color00FFFF;
DRAWTEXT(TJTS1 and((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股形态不佳,注意成交量的变化,但目前不适合参与。 '),ALIGN2;
DRAWTEXT(TJTS1 and((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'该股趋势不明,股价偏弱,注意量能变化,目前不宜参与。 '),ALIGN2;
DRAWTEXT(TJTS1 and((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股有走强迹象,但量能不足,趋势不明,不适合操作。 '),ALIGN2;
DRAWTEXT(TJTS1 and((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'该股走势太弱,没有参与价值。 '),ALIGN2;
DRAWTEXT(TJTS2 and(CROSS(AVX,1) AND (V1 >= V2)) ,k2*0.99,'大盘量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右, '),ALIGN2,color0000FF;
DRAWTEXT(TJTS2 and(CROSS(AVX,1) AND (V1 >= V2)) ,k2*0.98,' 如前期经过一轮下跌,此时为最佳买点,但如果前期有过一段涨幅则介入需谨慎。 '),ALIGN2,color0000FF;
DRAWTEXT(TJTS2 and(CROSS(AVX,1) AND (V1 < V2)) ,k2*0.99,'大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌, '),ALIGN2,color0000FF;
DRAWTEXT(TJTS2 and(CROSS(AVX,1) AND (V1 < V2)) ,k2*0.98,' 可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入。 '),ALIGN2,color0000FF;
DRAWTEXT(TJTS2 and(CROSS(1,AVX) AND (V1 >= V2)) ,k2*0.99,'大盘形态走坏,重仓者可以减去大部分仓位。 '),ALIGN2,color00FF00;
DRAWTEXT(TJTS2 and(CROSS(1,AVX) AND (V1 < V2)) ,k2*0.99,'大盘缩量调整,注意风险,短线清仓观望。 '),ALIGN2,color00FF00;
DRAWTEXT(TJTS2 and(((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) ,k2*0.99,'大盘走势良好,量能理想,可以继续持有强势股。 '),ALIGN2,color00FFFF;
DRAWTEXT(TJTS2 and(((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) ,k2*0.99,'大盘形态良好,但量能稍显不足,随时准备减仓。 '),ALIGN2,color00FFFF;
DRAWTEXT(TJTS2 and(((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) ,k2*0.99,'大盘趋势不明,注意成交量变化,目前不适宜进场。 '),ALIGN2;
DRAWTEXT(TJTS2 and(((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) ,k2*0.99,'大盘趋势向下,量能萎缩,不适合进场。 '),ALIGN2;

 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

怎么收费,代编流程等详情请点击查阅!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容