TIPTEXT(DISPSTATUS=2,0,var1000);
a:="LTFunc5@FORLT2"; {计算BS点}
s1:="LTFunc5@LT_S1"; {s1=0,向下; s1=1,向上}
hs:="LTFunc5@LT_HS"; {短线买入机会}
ls:="LTFunc5@LT_LS"; {短线卖出机会}
p1:="LTFunc5@LT_P1"; {p1=1,显示BS,p1上穿0线,B点 ; p1下穿1线,S点}
upp:="LTFunc5@LT_UPP";{明日B点预测}
udd:="LTFunc5@LT_UDD";{明日S点预测}
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;
AA2:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买量2:=IF(CLOSE>OPEN,AA2*(HIGH-LOW),IF(CLOSE<OPEN,AA2*((HIGH-OPEN)+ (CLOSE-LOW)),VOL/2));
卖量2:=IF(CLOSE>OPEN,0-AA2*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE< OPEN,0-AA2*(HIGH-LOW),0-VOL/2));
DDX2:=(买量2+卖量2)/(买量2-卖量2);
d12:=ema(abs(DDX2),60); {ddx绝对值60日指数平滑移动平均}
d22:=max(DDX2/d12+7.5,7.5);
d32:=min(DDX2/d12,10); {能量级别:当日ddx与60日平均值的比值,最高10.0}
K1:=IF(CLOSE>=REF(CLOSE,1),HIGH-OPEN+CLOSE-LOW+CLOSE-REF(CLOSE,1),HIGH-OPEN+CLOSE-LOW);
K2:=IF(CLOSE<=REF(CLOSE,1),OPEN-LOW+HIGH-CLOSE+REF(CLOSE,1)-CLOSE,OPEN-LOW+HIGH-CLOSE);
DT:=VOL*K1/(K1+K2);
KT:=VOL-DT;
买量:=SUM(DT,1);
卖量:=SUM(KT,1);
DDX3:=EMA(买量-卖量,5)*VOL/sum(vol,60)*0.001;
d11:=ema(abs(DDX3),60); {ddx绝对值60日指数平滑移动平均}
d21:=max(DDX3/d11+7.5,7.5);
d31:=min(DDX3/d11,10); {能量级别:当日ddx与60日平均值的比值,最高10.0}
TT:=(OPEN+HIGH+LOW+CLOSE)/4;
AA:=IF(BETWEEN(C,TT,H) OR C=O,VOL,0);
BB:=IF(BETWEEN(C,TT,L),VOL,0);
CC:=IF(AA AND BB,0,VOL/3);DDXJ:=10*(AA-(BB+CC))/IF(CAPITAL<1,SUM(VOL,13),CAPITAL);
jj:=(HIGH+LOW+CLOSE)/3;qj0:=vol/IF(HIGH=LOW,4,HIGH-LOW);
qj1:=IF(CAPITAL=0,qj0*(jj-MIN(CLOSE,OPEN)),qj0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW)));
qj2:=IF(CAPITAL=0,qj0*(MIN(OPEN,CLOSE)-LOW),qj0*IF(HIGH=LOW,1,(jj-MIN(CLOSE,OPEN))));
qj3:=IF(CAPITAL=0,qj0*(HIGH-MAX(OPEN,CLOSE)),qj0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE))));
qj4:=IF(CAPITAL=0,qj0*(MAX(CLOSE,OPEN)-jj),qj0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-jj)));
DDXQJ:=((qj1+qj2)-(qj3+qj4))/sum(vol,60);
dJ11:=ema(abs(DDXQJ),60); {ddx绝对值60日指数平滑移动平均}
dJ21:=max(DDXQJ/dJ11+7.5,7.5);
dJ31:=min(DDXQJ/dJ11,10); {能量级别:当日ddx与60日平均值的比值,最高10.0}
dJ1:=ema(abs(DDXJ),60); {ddx绝对值60日指数平滑移动平均}
dJ2:=max(DDXJ/dJ1+7.5,7.5);
dJ3:=min(DDXJ/dJ1,10); {能量级别:当日ddx与60日平均值的比值,最高10.0}
{hs;ls;hhs;lls;us;ds;s1;p1;p0;upp;udd};
d1:=ema(abs("ddx.ddx"),60); {ddx绝对值60日指数平滑移动平均}
d2:=max("ddx.ddx"/d1+7.5,7.5);
d3:=min("ddx.ddx"/d1,10); {能量级别:当日ddx与60日平均值的比值,最高10.0}
fb:=if(s1=0,hs,ls);
tr0:=ifs(p1=1,'明日收盘价<'+numtostrn(udd,2)+',出现S点\n','若明日收盘价> '+numtostrn(upp,2)+',出现B点\n');
tr1:=ifs(s1=1,'明日收盘价<'+numtostrn(ls,2)+',短线卖出机会','若明日收盘价> '+numtostrn(hs,2)+'短线买入机会');
tr2:=ifs(p1=1,ifs(cross(p1,0),'B点','持股'),ifs(cross(1,p1),'S点','持币'));
tr3:=ifs(s1=0,'向下,','向上,');
tr4:='3.能量级别:'+numtostrn(d3,1)+'级/'+numtostrn(dJ3,1)+'级 /'+numtostrn(dJ31,1)+'级/'+numtostrn(d31,1)+'级/'+numtostrn(d32,1)+'级';
bs:=datestr(date)+'买卖点决策系统提示\n'+'1.BS点:'+tr2+','+tr0+'2.短线:'+tr3+tr1+' \n'+tr4;
drawflagtext(1,fb,bs);
STICKLINE(p1=1 and c>=o and o<>0,c,o,d2,0),color5454ff;
STICKLINE(p1=1 and c>=o and o<>0,c,o,7.5,0),colorblack;
STICKLINE(p1=1 and c>=o and o<>0,c,c,7.5,0),color5454ff;
STICKLINE(p1=1 and c>=o and o<>0,o,o,7.5,0),color5454ff;
STICKLINE(p1=1 and c>=o and o<>0,o,c,7.5,1),color5454ff;
STICKLINE(p1=1 and c<=o,o,c,7.5,1),color5454ff;
STICKLINE(p1=1 and c<=o,l,c,0.5,1),color5454ff;
STICKLINE(p1=1 and c<=o,h,o,0.5,1),color5454ff;
STICKLINE((p1<>1 or barscount(c)<3) and c>=o,c,o,7.5,1),colorffff54;
STICKLINE((p1<>1 or barscount(c)<3) and c>=o,c,h,0.5,1),colorffff54;
STICKLINE((p1<>1 or barscount(c)<3) and c>=o,l,o,0.5,1),colorffff54;
drawbmp(p1=1 and ref(p1,1)=0,l,'buy1.bmp'),align1,valign0;
drawbmp(p1=0 and ref(p1,1)=1,h,'sell1.bmp'),align1,valign2;
drawbmp(s1=1 and ref(s1,1)=0 and (p1+ref(p1,1))<>1,l,'bs.bmp'),align1,valign0;
drawbmp(s1=0 and ref(s1,1)=1 and (p1+ref(p1,1))<>1,h,'ss.bmp'),align1,valign2;TJTS1:=BARSTATUS=2 and c<200;
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);
mc:=REF(c,1);
阻力位:=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),止损位);
阻力位a:=IF((mc > 200),(mc * 1.01),(mc * 1.07));
阻力位2:=IF((mc < 10),(mc * 1.05),阻力位a);
止损位b:=IF((mc > 200),(mc * 0.99),(mc * 0.93));
止损位2:=IF((mc < 10),(mc * 0.95),止损位b);
TJTS1:=BARSTATUS=2 and c<200;
TJTS2:=BARSTATUS=2 and c>200;
DRAWTEXTABS(58,20,'[昨/今日 止损位 :'+NUMTOSTRn(止损位b,2)+'/'+NUMTOSTRn(止损位1,2)+'**]'),LINETHICK1,COLOR00FF00;
DRAWTEXTABS(58,35,'[昨/今日 阻力位 :'+NUMTOSTRn(阻力位2,2)+'/'+NUMTOSTRn(阻力位1,2)+']'),LINETHICK1,colorFEBAF5;
T := BARSLAST(DISPSTATUS=1)+1;
HHg := HHV(H, T);
ddg := LLV(L, T);
{Hk := LL-HH; G12 := LL-HK*1.55; }
k2:=hhv(h*1.03,barslast(DISPSTATUS=1)+1);
DRAWTEXT(TJTS1 and ((CROSS(AVX,1) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'★该股的量能理想,有明显走强迹象,可以考虑中线进场参与,仓位在2/3左右。 '),ALIGN2,color0000FF,LINETHICK2;
DRAWTEXT(TJTS1 and ((CROSS(AVX,1) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'★该股虽然走势趋强,但量能还显不足,可以考虑短线进场,仓位在1/2左右。 '),ALIGN2,color0000FF,LINETHICK2;
DRAWTEXT(TJTS1 and ((CROSS(AVX,1) AND (V1 > V2)) AND (DSLX < DSLX1)) ,k2*0.99,'★该股量价配合良好,但相对其它股票并没有明显走强,可以考虑短线进场,仓位1/2左右。 '),ALIGN2,color0000FF,LINETHICK2;
DRAWTEXT(TJTS1 and ((CROSS(AVX,1) AND (V1 <= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'★该股形态尚可,但量能不足,股票也未完全走强,可以短线参与,仓位1/3左右。 '),ALIGN2,color0000FF,LINETHICK2;
DRAWTEXT(TJTS1 and ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'★该股形态变坏,但走势相对其它股票尚可,重仓者减持大半,清仓者可以观望。 '),ALIGN2,color00FF00,LINETHICK2;
DRAWTEXT(TJTS1 and ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'★该股随大盘一起下跌,程明显缩量走势,考虑到大盘风险,减持或清仓。 '),ALIGN2,color00FF00,LINETHICK2;
DRAWTEXT(TJTS1 and ((CROSS(1,AVX) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'★该股放量下跌,走势明显偏弱,离场观望。 '),ALIGN2,color00FF00,LINETHICK2;
DRAWTEXT(TJTS1 and ((CROSS(1,AVX) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'★该股缩量下跌,走势偏弱,离场观望。 '),ALIGN2,color00FF00,LINETHICK2;
DRAWTEXT(TJTS1 and ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'★该股形态良好,强势明显,量能充足,可以继续持有。 '),ALIGN2,color00FFFF,LINETHICK2;
DRAWTEXT(TJTS1 and ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'★该股上行趋势不变,强势依然,但量能开始转弱,注意风险。 '),ALIGN2,color00FFFF,LINETHICK2;
DRAWTEXT(TJTS1 and ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'★该股仍然具备上涨潜力,但股性偏弱,可考虑减仓。 '),ALIGN2,color00FFFF,LINETHICK2;
DRAWTEXT(TJTS1 and ((((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'★该股走势趋弱,量能不足,减持大部分筹码。 '),ALIGN2,color00FFFF,LINETHICK2;
DRAWTEXT(TJTS1 and ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'★该股形态不佳,注意成交量的变化,但目前不适合参与。 '),ALIGN2,LINETHICK2;
DRAWTEXT(TJTS1 and ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX >= DSLX1)) ,k2*0.99,'★该股趋势不明,股价偏弱,注意量能变化,目前不宜参与。 '),ALIGN2,LINETHICK2;
DRAWTEXT(TJTS1 and ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 >= V2)) AND (DSLX < DSLX1)) ,k2*0.99,'★该股有走强迹象,但量能不足,趋势不明,不适合操作。 '),ALIGN2,LINETHICK2;
DRAWTEXT(TJTS1 and ((((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) AND (DSLX < DSLX1)) ,k2*0.99,'★该股走势太弱,没有参与价值。 '),ALIGN2,LINETHICK2;
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,LINETHICK2;
DRAWTEXT(TJTS2 and (CROSS(AVX,1) AND (V1 < V2)) ,k2*0.99,'★大盘虽然走势趋强,但量能还显不足,如果前期经过一轮下跌, '),ALIGN2,color0000FF,LINETHICK2;
DRAWTEXT(TJTS2 and (CROSS(AVX,1) AND (V1 < V2)) ,k2*0.98,' ★可以考虑短线进场,仓位在1/2左右,一旦量能放大可以加仓买入。 '),ALIGN2,color0000FF,LINETHICK2;
DRAWTEXT(TJTS2 and (CROSS(1,AVX) AND (V1 >= V2)) ,k2*0.99,'★大盘形态走坏,重仓者可以减去大部分仓位。 '),ALIGN2,color00FF00,LINETHICK2;
DRAWTEXT(TJTS2 and (CROSS(1,AVX) AND (V1 < V2)) ,k2*0.99,'★大盘缩量调整,注意风险,短线清仓观望。 '),ALIGN2,color00FF00,LINETHICK2;
DRAWTEXT(TJTS2 and (((AVX >= 1) AND (REF(AVX,1) > 0)) AND (V1 >= V2)) ,k2*0.99,'★大盘走势良好,量能理想,可以继续持有强势股。 '),ALIGN2,color00FFFF,LINETHICK2;
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,LINETHICK2;
DRAWTEXT(TJTS2 and (((AVX < 1) AND (REF(AVX,1) < 0)) AND (V1 < V2)) ,k2*0.99,'★大盘趋势向下,量能萎缩,不适合进场。 '),ALIGN2,LINETHICK2;
DRAWTEXTABS(10,5,'点击右边版面中的"评"字,将呈现自动技术股评'),colorFF00FF,LINETHICK1;
c1a:=c/ref(ema(c,30),30);
c2a:=indexc/ref(ema(indexc,30),30);
l1:=c1a/c2a*10-10;
c3a:=c/ma(c,60);
c4a:=indexc/ma(indexc,60);
l2:=c3a/c4a*10-10;
c5a:=c/ma(c,120);
c6a:=indexc/ma(indexc,120);
l3:=c5a/c6a*10-10;
L4:=MA(L1+L2+L3,5);
诊断3:=IFS(REF(L4,1)>0 AND REF(L4,1)>REF(L4,2),'该股中长期走势强于大盘,且近期继续走强。','')+
IFS(REF(L4,1)>0 AND REF(L4,1)<=REF(L4,2),'该股中长期走势强于大盘,但近期有所走弱。','')+
IFS(REF(L4,1)<=0 AND REF(L4,1)>REF(L4,2),'该股中长期走势弱于大盘,但近期有所转强。','')+
IFS(REF(L4,1)<=0 AND REF(L4,1)<=REF(L4,2),'该股中长期走势弱于大盘,且近期继续走弱。','');
DRAWTEXTABS(10 ,55, 诊断3),LINETHICK2,colorred;
均价:=(3*C+H+L+O)/6;
VAR1:=(8*均价+7*REF(均价,1)+6*REF(均价,2)+5*REF(均价,3)+
4*REF(均价,4)+3*REF(均价,5)+2*REF(均价,6)+REF(均价,8))/36;
VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND CLOSE>VAR2 AND CLOSE<VAR1;
SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1)
AND CLOSE<VAR2) OR (VAR1>VAR2 AND VAR1<REF(VAR1,1)
AND VAR2<REF(VAR2,1) AND CLOSE<VAR2);;
SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<VAR2;
XD1:=VAR1=VAR2 AND CLOSE<VAR2 OR (VAR1<REF(VAR1,1) AND VAR2<REF(VAR2,1)
AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<VAR2);
XD2:=VAR1=VAR2 AND CLOSE>VAR1;
IF BARSTATUS=2 AND SZ1 THEN BEGIN
DRAWTEXTABS(10,70,'调整结束短线介入'),LINETHICK2,COLORRED;
END
ELSE
IF BARSTATUS=2 AND SZ2 THEN BEGIN
DRAWTEXTABS(10,70,'上升通道走势良好'),LINETHICK2,COLORRED;
END
ELSE
IF BARSTATUS=2 AND SZ3 THEN BEGIN
DRAWTEXTABS(10,70,'股价偏离注意调整'),LINETHICK2,COLORRED;
END
ELSE
IF BARSTATUS=2 AND SZ4 THEN BEGIN
DRAWTEXTABS(10,70,'上升通道调整洗盘'),LINETHICK2,COLORGREEN;
END
ELSE
IF BARSTATUS=2 AND SZ5 THEN BEGIN
DRAWTEXTABS(10,70,'转向特征注意离场'),LINETHICK2,COLORGREEN;
END
ELSE
IF BARSTATUS=2 AND SZ6 THEN BEGIN
DRAWTEXTABS(10,70,'通道改变坚决离场'),LINETHICK2,COLORGREEN;
END
ELSE
IF BARSTATUS=2 AND XD1 THEN BEGIN
DRAWTEXTABS(10,70,'下跌通道只宜观望'),LINETHICK2,COLORGREEN;
END
ELSE
IF BARSTATUS=2 AND XD2 THEN BEGIN
DRAWTEXTABS(10,70,'短期底部准备进入'),LINETHICK2,COLORYELLOW;
END;