在线检测未来函数

把云端爆点主图上的爆.阻击.先知.改成选股

来源:Internet,编辑:股旁网,2012-07-13

编写要求:

请老师帮忙把云端爆点主图上的(爆.阻击.先知.)改成选股 【云端爆点主图】源码 VAR1:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100)/3; VARB:=(((MA(CLOSE,5) > MA(CLOSE,10)) AND (MA(CLOSE,10) > MA(CLOSE,30))) AND (MA(CLOSE,30) > MA(CLOSE,60))); 短线:=MA(CLOSE,13),COLORRED,LINETHICK3; VAR12:=(HIGH - LOW); VAR3:=ABS((OPEN - CLOSE)); VAR4:=(HIGH - IF((CLOSE > OPEN),CLOSE,OPEN)); VAR5:=(IF((CLOSE > OPEN),OPEN,CLOSE) - LOW); VAR6:=((VAR3 / VAR12) * VOL); VAR7:=((VAR4 / VAR12) * VOL); VAR8:=((VAR5 / VAR12) * VOL); DRAWTEXT((((((VAR6 > (MA(VOL,5) * 2)) AND 短线>REF(短线 ,1) AND (VAR6 >= VAR7)) AND (VAR6 >= VAR8)) AND (CLOSE > OPEN)) OR ((VOL >(MA(VOL,5) * 3)) AND VARB)) ,L*0.97,'●狙击'),COLOR00FFFF; STICKLINE(CLOSE>REF(CLOSE,1)*1.0985 AND CLOSE=HIGH,CLOSE,OPEN,4,-1),COLOR00FFFF; STICKLINE(CLOSE=CLOSE,CLOSE,OPEN,3,0),COLORFF7700; STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,2.2,0),COLORFF9900; STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,1.5,0),COLORFFBB00; STICKLINE(OPEN>=CLOSE,CLOSE,OPEN,0.5,0),COLORCYAN; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),COLOR000099; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,2.2,0),COLOR0000CC; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),COLOR0000FF; STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.5,0),COLORCC66FF; STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,3,0),COLOR009900; STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,2.2,0),COLOR00BB00; STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,1.5,0),COLOR00DD00; STICKLINE(VAR3,OPEN,(OPEN+CLOSE)/2,0.5,0),COLOR00FF00; STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,3,0),COLOR999999; STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,2.2,0),COLORBBBBBB; STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,1.5,0),COLORDDDDDD; STICKLINE(VAR4,OPEN,(OPEN+CLOSE)/2,0.5,0),COLORFFFFFF; MA5:MA(CLOSE,5),COLORWHITE; MA10:MA(CLOSE,10),COLORYELLOW; MA20:MA(CLOSE,20),COLORMAGENTA; MA60:MA(CLOSE,60),COLORGREEN; 爆点:=CROSS(MA5,MA10); DRAWTEXT(爆点,MA10*0.99,'●爆'),COLORRED; BIAS1:=(C-MA(C,6))/MA(C,6)*100; BIAS2:=(C-MA(C,12))/MA(C,12)*100; BIAS3:=(C-MA(C,24))/MA(C,24)*100; BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6; 乖离:=MA(BIAS,3); DRAWTEXT(CROSS(BIAS,乖离) AND 乖离<-9.5,L*0.99,'●底'),COLORRED; K:=(C+H+L)/3; D:=MA(K,4); DRAWTEXT(REF(C,1)>D AND CREF(D,1),H*1.02,'●警'),COLORGREEN; DRAWTEXT(REF(C,1)D AND DREF(C,1)*1.045,L*0.98, '●先知'),COLORRED; {以下含未来函数,不影响以上参数,不喜欢可删除} DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLORRED; DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLORRED; DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLORLIBLUE; DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF; DRAWTEXT_FIX(1,0.00,0.12,0,'财务分折:')COLORMAGENTA; DRAWTEXT_FIX(1,0.07,0.06,0,EXTERNSTR(0,1))COLOR0000FF; DRAWTEXT_FIX (1,0.05,0.12,0,'现金流:'),COLOR00CCCC; DRAWNUMBER_FIX(1,0.086,0.12,0,CONST(FINANCE(25)/1000000000)),COLOR00CCCC; DRAWTEXT_FIX (1,0.125,0.12,0,'应收款:'),COLOR00CCCC; DRAWNUMBER_FIX(1,0.159,0.12,0,CONST(FINANCE(22)/100000000)),COLOR00CCCC; DRAWTEXT_FIX (1,0.193,0.12,0,'存货:'),COLOR00CCCC; DRAWNUMBER_FIX(1,0.218,0.12,0,CONST(FINANCE(27)/100000000)),COLOR00CCCC; DRAWTEXT_FIX(1,0.253,0.12,0,'流动比率:'),COLOR00CCCC;{流动比率值>1.5<2.5较为合理,低于1说明偿债能力欠佳。} DRAWNUMBER_FIX(1,0.299,0.12,0,CONST(FINANCE(11)/FINANCE(15))),COLOR00CCCC; DRAWTEXT_FIX(1,0.336,0.12,0,'速动比率:'),COLOR00CCCC; DRAWNUMBER_FIX(1,0.383,0.12,0,CONST(FINANCE(11)-FINANCE(27)/FINANCE(15))),COLOR00CCCC; DRAWTEXT_FIX (1,0.47,0.12,0,'套牢盘%:'),COLOR00CCCC; DRAWNUMBER_FIX(1,0.507,0.12,0,CONST(100-WINNER(CLOSE)*100)),COLOR00CCCC;

股旁网解答:

 

 
 
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10); 
爆点:CROSS(MA5,MA10);
========================
K:=(C+H+L)/3; 
D:=MA(K,4);
先知:REF(C,1)<D AND C>D AND D<REF(D,1) AND C>REF(C,1)*1.045;
====================================
 
VARB:=(((MA(CLOSE,5) > MA(CLOSE,10)) AND (MA(CLOSE,10) > MA(CLOSE,30))) AND (MA(CLOSE,30) > MA(CLOSE,60)));
短线:=MA(CLOSE,13);
VAR12:=(HIGH - LOW);
VAR3:=ABS((OPEN - CLOSE));
VAR4:=(HIGH - IF((CLOSE > OPEN),CLOSE,OPEN));
VAR5:=(IF((CLOSE > OPEN),OPEN,CLOSE) - LOW);
VAR6:=((VAR3 / VAR12) * VOL);
VAR7:=((VAR4 / VAR12) * VOL);
VAR8:=((VAR5 / VAR12) * VOL);
狙击:(((((VAR6 > (MA(VOL,5) * 2)) AND 短线>REF(短线 ,1) AND (VAR6 >= VAR7)) AND (VAR6 >= VAR8)) AND (CLOSE > OPEN)) OR ((VOL >(MA(VOL,5) * 3)) AND VARB));
 

相关文章