请老师改选股和预警,要求成本线和决策线金叉。谢谢。
指点江山源码:
A1:=COST(0.37);A2:=COST(6);A3:=COST(15);A4:=COST(55);A5:=COST(95);
【90%成本】:=COST(90);【70%成本】:=COST(12);获利:=WINNER(C)*100;
sjj:=STKTYPE=1 or STKTYPE=2 or STKTYPE=3 or STKTYPE=5 or STKTYPE=11;
套牢:=100-WINNER(C)*100;底出击★:=a1;稳建仓:=a2;快刀手:=a3;预测★:=a5;
升浪:=a4;Q:=WEEKDAY;P:=SYSPARAM(1);b0:=(c-ma(close,13))*100;b1:=ma(b0,5);
b2:=wma(b1,5);b3:=b1>b2 and b1<=0;b4:=ma(c,5)>ma(c,14) and v>ref(v,1);
g:=ma(STKINDI('','千钧引用.总1',0,7)/sum(v,5)*100,if(CAPITAL=0,25,14));
k:=sma(g,3,1);d:=sma(k,3,1);J:=3*K-2*D;xg:=exist(k>d,3) and b3 and b4;
周:=IF(q>0 and q<=1,1,IF(q>1 and q<=2,2,IF(q>2 and q<=3,3,IF(q>3 and
q<=4,4,IF(q>4 and q<=5,5,0)))));
M:=MONTH;月:=IF(M=1,1,IF(M>1 and M<=2,2,IF(M>2 and M<=3,3,IF(M>3 and M<=4,4,IF(M>4 and M<=5,5,IF(M>5 and M<=6,6,IF(M>6 and M<=7,7,
IF(M>7 and M<=8,8,IF(M>8 and M<=9,9,IF(M>9 and M<=10,10,IF(M>10 and M<=11,11,IF(M>11 and M<=12,12,0))))))))))));
日:=DAY;ny:=LMONTH;nr:=LDAY;
w1:=IF(HOUR>1 and HOUR<10,STRLEFT(NUMTOSTR(CURRENTTIME,0),1),STRLEFT(NUMTOSTR(CURRENTTIME,0),2));
w2:=IF(MINUTE>1 and MINUTE<10,STRMID(NUMTOSTR(CURRENTTIME,0),2,2),STRMID(NUMTOSTR(CURRENTTIME,0),3,2));
w3:=STRRIGHT(NUMTOSTR(CURRENTTIME,0),2);
STICKLINE(c=o and c>ref(c,1),c,o,6,0),COLOR0000ee;
STICKLINE(C>O,h,l,0,0),COLOR0000ee;
STICKLINE(C>O,O,C,8,0),COLOR0000aa;STICKLINE(C>O,O,C,5,0),COLOR0000cc;
STICKLINE(C>O,O,C,3,0),COLOR0000ee;STICKLINE(C>O,O,C,1,0),COLOR0000ff;
STICKLINE(C=O and c<ref(c,1),c,o,6,0),COLORFFEE00;
STICKLINE(C<O,h,l,0,0),COLORFFEE00;
STICKLINE(C<O,O,C,8,0),COLORFF4400;STICKLINE(C<O,O,C,5,0),COLORFF8800;
STICKLINE(C<O,O,C,3,0),COLORFFAA00;STICKLINE(C<O,O,C,1,0),COLORFFCC00;
bc:=barslast(p=barpos)+1;
金h:=if(NOT(sjj),sum(h*vol,bc)/sum(vol,bc),sum(amount,bc)/sum(v,bc)/100*sum(h,bc)/sum(c,bc));
金l:=if(NOT(sjj),sum(l*vol,bc)/sum(vol,bc),sum(amount,bc)/sum(v,bc)/100*sum(l,bc)/sum(c,bc));
点石成金:if(ref(h,bc-1)>ref(h,bc) and ref(h,bc-1)>ref(h,bc-2),金h,金l),color00BBff,LINETHICK2;
SS:=55;HhC:=HHV(h,SS);LLc:=LLV(L,SS);
PARTLINE(BARPOS>=p-SS,hHC[p]),COLOR00EE00;
DRAWNUMBER(BARPOS=p-SS,hHC[p],hHC[p],2),COLOREEEEEE,PXUP25;
PARTLINE(BARPOS>=p-SS,LLc[p]),COLOR0000FF;
DRAWNUMBER(BARPOS=p-SS,LLc[p],LLc[p],2),COLOREEEEEE,PXUP25;
PARTLINE(BARPOS>=p-SS,(hHC[p]+LLc[p])/2),COLOR00EEFF;
DRAWNUMBER(BARPOS=p-SS,(hHC[p]+LLc[p])/2,(hHC[p]+LLc[p])/2,2),COLOREEEEEE,PXUP25;
PARTLINE(BARPOS>=p-55,(hHC[p]*3+LLc[p])/4),COLORDDDDDD,POINTDOT;
DRAWNUMBER(BARPOS=p-55,(hHC[p]*3+LLc[p])/4,(hHC[p]*3+LLc[p])/4,2),COLOREEEEEE,PXUP25;
PARTLINE(BARPOS>=p-55,(hHC[p]+LLc[p]*3)/4),COLORDDDDDD,POINTDOT;
DRAWNUMBER(BARPOS=p-55,(hHC[p]+LLc[p]*3)/4,(hHC[p]+LLc[p]*3)/4,2),COLOREEEEEE,PXUP25;
成本线:DMA(C,IF(CAPITAL=0,vol/ESTDATA(12)/20,vol/FINANCE(7)/50)),COLORff00ff;
决策线:WMA(成本线,IF(CAPITAL=0,74,21)),COLOR00ee00;
A:=BLKNAME;BKG:=STRLEFT(A,STRFIND(A,',',1)-1);
BKSG:=STKCOUNT(BKG);BK:='板块指数';BKS:=STKCOUNT(BK);
DRAWTEXT(xg,l*0.98,'★'),COLOR00ffFF;
DRAWTEXT(cross(k,d) and 获利<10 and k<-10,l*1.01,'哪跑?' ),COLOREEEEFF;
DRAWTEXT(cross(k,d) and 获利<10 and k<-10,L*0.98 ,'★' ),COLOR0000FF,ALIGN1;
DRAWTEXTEX(c,1,0,0,''+STKLABEL+' '+STKNAME+' 隶属'+MARKETNAME+',所属板块:'+BKG+','+'共含证券:'+NUMTOSTR(BKSG,0)+' 家'),COLOR00ddff;
DRAWTEXTEX(c,1,0,45,'2009年:'+NUMTOSTR(月[P],0)+' 月'+NUMTOSTR(日[P],0)
+'日 星期:'+NUMTOSTR(周[P],0)+' 农历:'+NUMTOSTR(ny[P],0)+' 月:'
+NUMTOSTR(nr[P],0)+' 北京时间:'+w1+' 点:'+w2+' 分:'+w3+' 秒'),color55ee55;
DRAWTEXTEX(c,1,0,45,' 获利盘:'+NUMTOSTR(获利,2)+' %'),align4,Colorff00ff;
DRAWTEXTEX(c,1,0,45,' 套牢盘:'+NUMTOSTR(套牢,2)+' %'),align4,Colorffbb00;
DRAWTEXTEX(c,1,0,45,' ■底击:'+NUMTOSTR(底出击★[sysparam(1)],2)+' 元'),align4,Colorred;
DRAWTEXTEX(c,1,0,45,' ■稳仓:'+NUMTOSTR(稳建仓[sysparam(1)],2)+' 元')PXDN0,align4,Coloryellow;
DRAWTEXTEX(c,1,0,45,' ■快刀:'+NUMTOSTR(快刀手[SYSPARAM(1)],2)+' 元')PXDN0,align4,COLORgreen;
DRAWTEXTEX(c,1,0,45,' ■升浪:'+NUMTOSTR(升浪[sysparam(1)],2)+' 元')PXDN0,align4,Colorffffff;
DRAWTEXTEX(c,1,0,45,' 、 ■预测:'+NUMTOSTR(预测★[sysparam(1)],2)+' 元')PXDN0,align4,Colorffbbff;
DRAWTEXTEX(c,1,0,45,' 、 90成本:'+NUMTOSTR(【90%成本】[sysparam(1)],2)+' 元')PXDN0,align4,Colorffeeff;
DRAWTEXTEX(c,1,0,45,' 、 70成本:'+NUMTOSTR(【70%成本】[sysparam(1)],2)+' 元')PXDN0,align4,Colorffccff;
CC:=C;M5:=MA(C,5);M10:=MA(C,10);M20:=MA(C,20);M30:=MA(C,30);M60:=ma(c,60);M90:=ma(c,90);M120:=ma(c,120);M250:=ma(c,250);gb:=SYSPARAM(1);
p[1]:=CC[gb];p[2]:=M5[gb];p[3]:=M10[gb];p[4]:=M20[gb];p[5]:=M30[gb];p[6]:=M60[gb];p[7]:=M90[gb];p[8]:=M120[gb];p[9]:=M250[gb];
s[1]:=CC[gb];s[2]:=M5[gb];s[3]:=M10[gb];s[4]:=M20[gb];s[5]:=M30[gb];s[6]:=M60[gb];s[7]:=M90[gb];s[8]:=M120[gb];s[9]:=M250[gb];
VARIABLE:ptr[9]='';ptr[1]:='CC';ptr[2]:='M5';ptr[3]:='M10';ptr[4]:='M20';ptr[5]:='M30';ptr[6]:='M60';ptr[7]:='M90';ptr[8]:='M120';ptr[9]:='M250';px:=SORTPOS(p,1,1,9);
DRAWTEXT(SYSPARAM(2)=BARPOS,c,ptr[p[1]]+':'+NUMTOSTR(s[p[1]],2)+' '+ptr[p[2]]+':'+NUMTOSTR(s[p[2]],2)+' '+ptr[p[3]]+':'+NUMTOSTR(s[p[3]],2)+' '+ptr[p[4]]+':'+NUMTOSTR(s[p[4]],2)+' '+ptr[p[5]]+':'+NUMTOSTR(s[p[5]],2)+' '+ptr[p[6]]+':'+NUMTOSTR(s[p[6]],2)+' '+ptr[p[7]]+':'+NUMTOSTR(s[p[7]],2)+' '+ptr[p[8]]+':'+NUMTOSTR(s[p[8]],2)+' '+ptr[p[9]]+':'+NUMTOSTR(s[p[9]],2)),ALIGN5,colorb5eeee;
//