源码
input:时间(71016),N(20,1,100),M(14,1,100);
var1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);
var2:=REF(var1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var3:=REF(var2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
var4:=REF(var3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var5:=REF(var4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
var6:=REF(var5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var7:=REF(var6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
var8:=REF(var7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var9:=REF(var8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
varA:=REF(var9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
varB:=REF(varA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
varC:=REF(varB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
var8 OR var9 OR varA OR varB OR varC,CLOSE,REF(CLOSE,1),8,0),COLOR0000AA;{红1}
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
var8 OR var9 OR varA OR varB OR varC,CLOSE,REF(CLOSE,1),6,0),COLOR0000CC;{红1}
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
var8 OR var9 OR varA OR varB OR varC,CLOSE,REF(CLOSE,1),4,0),COLOR0000DD;{红1}
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
var8 OR var9 OR varA OR varB OR varC,CLOSE,REF(CLOSE,1),2,0),COLOR0000FF;{红1}
STICKLINE(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
var8 OR var9 OR varA OR varB OR varC,CLOSE,REF(CLOSE,1),0,0),COLORYELLOW;{红1}
varD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);
varE:=REF(varD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
varF:=REF(varE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var10:=REF(varF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
var11:=REF(var10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var12:=REF(var11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
var13:=REF(var12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var14:=REF(var13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
var15:=REF(var14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var16:=REF(var15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
var17:=REF(var16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);
var18:=REF(var17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);
STICKLINE(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
var14 OR var15 OR var16 OR var17 OR var18,CLOSE,REF(CLOSE,1),8,0),COLOR998855;
STICKLINE(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
var14 OR var15 OR var16 OR var17 OR var18,CLOSE,REF(CLOSE,1),6,0),COLORBBAA77;
STICKLINE(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
var14 OR var15 OR var16 OR var17 OR var18,CLOSE,REF(CLOSE,1),4,0),COLORDDCC99;
STICKLINE(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
var14 OR var15 OR var16 OR var17 OR var18,CLOSE,REF(CLOSE,1),2,0),COLORFFEEBB;
STICKLINE(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
var14 OR var15 OR var16 OR var17 OR var18,CLOSE,REF(CLOSE,1),0,0),COLORCYAN;
var19:=REF(varD OR varE OR varF OR var10 OR var11 OR var12 OR var13 OR
var14 OR var15 OR var16 OR var17 OR var18,1) AND var1;
STICKLINE(var19,REF(CLOSE,1),REF(CLOSE,2),8,0),COLOR00ffff;
STICKLINE(var19,REF(CLOSE,1),REF(CLOSE,2),6,0),COLOR00c8ff;
STICKLINE(var19,REF(CLOSE,1),REF(CLOSE,2),4,0),COLOR10ecff;
STICKLINE(var19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ffff;
STICKLINE(var19,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR10f0ff;
var1A:=REF(var1 OR var2 OR var3 OR var4 OR var5 OR var6 OR var7 OR
var8 OR var9 OR varA OR varB OR varC,1) AND varD;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),8,0),COLOR00d900;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),6,0),COLOR93ffd1;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),4,0),COLOR93ff22;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR24ff22;
STICKLINE(var1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090ff21;
LC:=REF(CLOSE,1);R:=MAX(CLOSE-LC,0)/ABS(CLOSE-LC)*100;RS:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
M1:=SMA(RS,4,1);M2:=SMA(R,4,1);YB:=4*(M1+M2);DIFF:=EMA(YB,21)-EMA(YB,55);DEA:=EMA(DIFF,7);
买点:CROSS(DIFF,DEA) AND DEA<0,LINETHICK0;JJ:=BARSLAST(买点);选股:CROSS(DIFF,DEA)AND COUNT(买点,30)>=2,LINETHICK0;
XM:=CROSS(DEA,DIFF) AND dea>0;DRAWICON(XM>0,HIGH+0.5,5);DRAWICON(买点>0,LOW-0.5,6);DRAWICON(选股>0,LOW-0.5,10);
时间A:=1000000+时间;时间B:=CURRENTDATE;d1:=DATE=时间A;d2:=DATE=时间B;
tj1:=BARSLAST(d1);tj2:=BARSLAST(d2);hh:=HHV(HIGH,tj1);ll:=LLV(LOW,tj1);
hh1:=HHV(VOL,tj1);ll1:=LLV(VOL,tj1);zh:=REF(hh,tj2);zl:=REF(ll,tj2);
zh1:=REF(hh1,tj2);zl1:=REF(ll1,tj2);sj1:=NUMTOSTR(时间A,0);sj2:=NUMTOSTR(时间B,0);
zw:=BARSLAST(HIGH=hh);jw:=BARSLAST(LOW=ll);zw1:=BARSLAST(VOL=hh1);jw1:=BARSLAST(VOL=ll1);
qz:=(zh-zl)/zl*100*SGN(jw-zw);qz1:=IF(CAPITAL<1,SUM(INDEXV/ESTDATA(8)*100,tj1),SUM(VOL/CAPITAL*100,tj1));
xs:=NUMTOSTR(REF(DATE,zw),0);xx:=NUMTOSTR(REF(DATE,jw),0);
xs1:=NUMTOSTR(REF(DATE,zw1),0);xx1:=NUMTOSTR(REF(DATE,jw1),0);
A1:=COST(0.33);A2:=COST(5);A3:=COST(15);A4:=COST(55);A5:=COST(97);
成本90%:=COST(90);成本70%:=COST(70);成本30%:=COST(30);成本10%:=COST(10);
获利:=WINNER(CLOSE)*100;套牢:=100-WINNER(CLOSE)*100;
DRAWTEXTEX(CLOSE,1,350,0,'90成本:'+NUMTOSTR(成本90%,2)),Color00DD00;
DRAWTEXTEX(CLOSE,1,350,60,'70成本:'+NUMTOSTR(成本70%,2)),Color00DDFF;
DRAWTEXTEX(CLOSE,1,350,120,'30成本:'+NUMTOSTR(成本30%,2)),Color00DD00;
DRAWTEXTEX(CLOSE,1,350,180,'10成本:'+NUMTOSTR(成本10%,2)),Color00DDFF;
DRAWTEXTEX(CLOSE,1,350,240,'底出击:'+NUMTOSTR(A1,2)),ColorDDDDDD;DRAWTEXTEX(CLOSE,1,540,0,'建仓:'+NUMTOSTR(A2,2)),Color00DDFF;
DRAWTEXTEX(CLOSE,1,700,0,'快刀:'+NUMTOSTR(A3,2)),Colorff00FF;DRAWTEXTEX(CLOSE,1,860,0,'升浪:'+NUMTOSTR(A4,2)),Color0000FF;
DRAWTEXTEX(CLOSE,1,860,60,'预测:'+NUMTOSTR(A5,2)),ColorffFF00;DRAWTEXTEX(CLOSE,1,540,60,'获利:'+NUMTOSTR(获利,2)),ColorFF00FF;
DRAWTEXTEX(CLOSE,1,700,60,'套牢:'+NUMTOSTR(套牢,2)),Color00DD00;
DRAWTEXTEX(CLOSE,1,0,60,'0'+STRMID(xs,3,1)+'年'+STRMID(xs,4,2)+'月'+STRMID(xs,6,2)+'日 '+'最高价:'+NUMTOSTR(REF(HIGH,zw),2)),COLORFFCC00;
DRAWTEXTEX(CLOSE,1,0,120,'0'+STRMID(xx,3,1)+'年'+STRMID(xx,4,2)+'月'+STRMID(xx,6,2)+'日 '+'最低价:'+NUMTOSTR(REF(LOW,jw),2)),COLORFFCC00;
DRAWTEXTEX(CLOSE,1,0,180,'0'+STRMID(xs1,3,1)+'年'+STRMID(xs1,4,2)+'月'+STRMID(xs1,6,2)+'日 '+'最大量:'+NUMTOSTR(REF(VOL,zw1),0)),COLORFFCC00;
DRAWTEXTEX(CLOSE,1,0,240,'0'+STRMID(xx1,3,1)+'年'+STRMID(xx1,4,2)+'月'+STRMID(xx1,6,2)+'日 '+'最低量:'+NUMTOSTR(REF(VOL,jw1),0)),COLORFFCC00;
DRAWTEXTEX(CLOSE,1,0,880,'0'+STRMID(sj1,3,1)+'年'+STRMID(sj1,4,2)+'月'+STRMID(sj1,6,2)+'日'),COLORFFCC00;
DRAWTEXTEX(CLOSE,1,145,880,'到0'+STRMID(sj2,3,1)+'年'+STRMID(sj2,4,2)+'月'+STRMID(sj2,6,2)+'日'),COLORFFCC00;
DRAWTEXTEX(qz<0,1,320,880,'这个时间段总跌幅:'+NUMTOSTR(qz,2)+'%'),COLORFFCC00;
DRAWTEXTEX(qz>0,1,320,880,'这个时间段总涨幅:'+NUMTOSTR(qz,2)+'%'),COLORFFCC00;
DRAWTEXTEX(CLOSE,1,0,940,'0'+STRMID(sj1,3,1)+'年'+STRMID(sj1,4,2)+'月'+STRMID(sj1,6,2)+'日'),COLORFFCC00;
DRAWTEXTEX(CLOSE,1,145,940,'到0'+STRMID(sj2,3,1)+'年'+STRMID(sj2,4,2)+'月'+STRMID(sj2,6,2)+'日'),COLORFFCC00;
DRAWTEXTEX(qz1,1,320,940,'这个时间段总换手:'+NUMTOSTR(qz1,2)+'%'),COLORFFCC00;
DRAWTEXTEX(CLOSE,1,0,0,STKLABEL+' '+STKNAME+''),Color00DDFF;X5:=REF(EMA(CLOSE,M),1);X6:=(EMA(CLOSE,M)-X5)/X5*100;
X7:=REF(EMA(CLOSE,M),BARSLAST(CROSS(X6,0))+1);X8:=REF(EMA(CLOSE,M),BARSLAST(CROSS(0,X6))+1);
PARTLINE(X6>=0 and X7=REF(X7,1),X7),COLOR0000FF;DRAWLINE(CROSS(X6,0),X5,CROSS(0,X6),X5,0),COLOR0000FF;
PARTLINE(X6<0 and X8=REF(X8,1),X8),COLOR00FF00;DRAWLINE(CROSS(0,X6),X5,CROSS(X6,0),X5,0),COLOR00EE00;
DRAWLINE(CROSS(0,X6) OR CROSS(X6,0),X5,ISLASTBAR,X5,0),COLORYELLOW;
A1:=REF(CLOSE,N)=HHV(CLOSE,2*N+1);B1:=FILTER(A1,N);C1:=BACKSET(B1,N+1);
HD:=FILTER(C1,N);A2:=REF(CLOSE,N)=LLV(CLOSE,2*N+1);B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);LD:=FILTER(C2,N);A:=REF(CLOSE,BARSLAST(HD));
B:=REF(CLOSE,BARSLAST(LD));t1:=BARSLAST(HD) and BARSLAST(LD) AND NOT(LD);
STICKLINE(t1,A,A,6,0),ColorFFEE00;STICKLINE(t1,B,B,6,0),ColorFF00FF;
VERTLINE(ISLASTBAR),ColorEEEEEE,LINEDOT;
HH:=HIGH; LL:=LOW; OO:=OPEN; CC:=CLOSE;
<%
vh=ffl.vardata("hh")
vl=ffl.vardata("ll")
vo=ffl.vardata("oo")
vc=ffl.vardata("cc")
last=ubound(vh)
if last<101 then
b=last+1
else
b=0
for i=last-101 to last-51
vh(i)=vh(i+51)
vl(i)=vl(i+51)
vo(i)=vo(i+51)
vc(i)=vc(i+51)
next
a=(vh(last-51)+vl(last-51))/2
j=1
for i=last-49 to last
j=j+2
vh(i)=2*a-vl(i-j)
vl(i)=2*a-vh(i-j)
vo(i)=2*a-vc(i-j)
vc(i)=2*a-vo(i-j)
next
end if
ffl.vardata("hh")=vh
ffl.vardata("ll")=vl
ffl.vardata("oo")=vo
ffl.vardata("cc")=vc
ffl.varstartindex("hh")=b
ffl.varstartindex("ll")=b
ffl.varstartindex("oo")=b
ffl.varstartindex("cc")=b
%>
x1:=C;y1:=x1[DATACOUNT];x2:=ma(c,20);x3:=ma(c,60);x4:=ma(c,120);x5:=ma(c,250);
右顺:=x2>x3 and x3>x4 and x4>x5; 右线坑:=x3>x2 and x3>x4 and x4>x5;左顺:=x2>x3 and x3>x5 and x5>x4;
右夹月季:=x4>x2 and x2>x3 and x3>x5;右夹年:=x2>x4 and x4>x5 and x5>x3;左夹年:=x2>x5 and x5>x4 and x4>x3;
PARTLINE(右顺,y1),LINETHICK3,COLORRED;
PARTLINE(右线坑,y1),LINETHICK3,COLORCYAN;
PARTLINE(左顺,y1),LINETHICK3,COLORYELLOW;
PARTLINE(右夹月季,y1),LINETHICK3,COLORWHITE;
PARTLINE(右夹年,y1),LINETHICK3,COLORMAGENTA;
PARTLINE(左夹年,y1),LINETHICK3,COLORGREEN;
{字}
DRAWTEXT(BARPOS=SYSPARAM(1) and count(右顺,1)=1,y1,'右顺: \n股价未大幅长期上升, \n业绩有增长形态尚可,\n关注重点'),PXDN10,COLORRED;
DRAWTEXT(BARPOS=SYSPARAM(1) and count(右线坑,1)=1,y1,'右线坑: \n一般出现在右顺类股票已有升幅 \n回档后可能形成新的基底'),PXDN10,COLORCYAN;
DRAWTEXT(BARPOS=SYSPARAM(1) and count(左顺,1)=1,y1,'左顺: \n刚刚突破类小心随时回档洗盘'),PXDN10,COLORYELLOW;
DRAWTEXT(BARPOS=SYSPARAM(1) and count(右夹月季,1)=1,y1,'右夹月季: \n右派类中走势 \n疲弱后出现'),PXDN10,COLORWHITE;
DRAWTEXT(BARPOS=SYSPARAM(1) and count(右夹年,2)=1,y1,' \n \n \n \n右夹年: \n一般是长期 \n箱形振荡后出现'),PXDN10,COLORMAGENTA;
DRAWTEXT(BARPOS=SYSPARAM(1) and count(左夹年,1)=1,y1,'左夹年: \n一般是已成功量价筑底 \n但短期上升较快'),PXDN10,COLORGREEN;
DRAWTEXT(BARPOS=SYSPARAM(1) and 左夹年,y1,'★★★'),PXUP20,COLORGREEN;
{解盘}
EXPLAIN(1,'----------------------------------------------------------------------------'),COLORWHITE;
EXPLAIN(C,'熊转牛:\n关注左夹年'),COLORGREEN;
EXPLAIN(C,' \n追涨;做反弹: \n关注右顺右线坑'),ColorFFD800;
EXPLAIN(1,'----------------------------------------------------------------------------'),COLORWHITE;
EXPLAIN(count(右顺,2)=1,'右顺:股价未大幅长期上升,业绩有增长,形态尚可盘不大的关注重点。'),COLORRED;
EXPLAIN(count(右线坑,2)=1,'右线坑:一般出现在右顺类股票已有升幅,回档后可能形成新的基底。'),COLORCYAN;
EXPLAIN(count(左顺,2)=1,'左顺:刚刚突破类,关注,小心随时回档洗盘。'),COLORYELLOW;
EXPLAIN(count(右夹月季,2)=1,'右夹月季:右派类中走势疲弱后出现,关注。'),COLORWHITE;
EXPLAIN(count(右夹年,2)=1,'右夹年:一般是长期箱形振荡后出现,关注。'),COLORMAGENTA;
EXPLAIN(count(左夹年,1)=1,'左夹年:一般是已成功量价筑底,但短期上升较快。'),COLORGREEN;
EXPLAIN(1,'----------------------------------------------------------------------------'),COLORWHITE;
A:=BACKSET(SYSPARAM(1)=BARSCOUNT(CLOSE),50);STICKLINE(A AND CC>=OO,OO,CC,6,1),COLORMAGENTA,SHIFT50;
STICKLINE(A AND CC>=OO,LL,OO,0.1,1),COLORMAGENTA,SHIFT50;STICKLINE(A AND CC>=OO,CC,HH,0.1,1),COLORMAGENTA,SHIFT50;
STICKLINE(A AND CC<OO,OO,CC,6,0),COLORGREEN,SHIFT50;STICKLINE(A AND CC<OO,LL,HH,0.1,0),COLORGREEN,SHIFT50;
F10:=IF(F10FIND('鹏搏资讯',1)>0,3,0);
IF F10=0 THEN EXIT;
XSL:=IF(DATACOUNT<60,1,5);
KG:=' ';
IF F10=3 THEN BEGIN
{业绩预告--鹏搏}
YGZ:=F10FIND('控盘情况:',1);
YGS:=IF(F10=3,F10FIND('业绩预告',150),F10FIND('◆ 信息快讯 ◆',300));
IF YGS<YGZ THEN BEGIN
FHS:=IF(F10=3,F10FIND('最近一次分红',YGS+30),F10FIND('●',YGS+80))LINETHICK;
XST:=F10TEXT(YGS+IF(F10=1,68,0),IF(FHS>0 AND FHS>YGS,FHS-YGS,58));
XSR:=STRMID(XST,1,STRFIND(XST,' ',10));
DRAWTEXTEX(CLOSE,1,0,1000,XSR),ColorFFFFFF;
END;
END;