最新更新 - 网站地图 -
您的当前位置:首页 > 股票公式 > 公式技巧 > 把最佳时机公式中的最佳时机做成选股

把最佳时机公式中的最佳时机做成选股

来源:网络 点击: 时间:2023-01-04 18:55:49

编写要求:

解答:

?网友求助:

源码为:

input:LONG(26,20,100),SHORT(12,5,40),M(9,2,60);
a1:=1;
a2:=DYNAINFO(14);
a3:=(FINANCE2(37));
a4:=(FINANCE2(3));
a5:=DYNAINFO(17);
a6:=(MA(CLOSE,0)) * a1;
a7:=(MA(a6,0)) * a1;
a8:=a6 - a7;
STICKLINE((a6 > a7),a6,a7,0.8,501),linethick1,colorRed;
STICKLINE((a7 > a6),a6,a7,0.8,1),linethick1;
DRAWICON(((CROSS(a7,a6)) AND (TIME > 93200)),a6,8),colorGreen;
DRAWICON(((CROSS(a6,a7)) AND (TIME > 93200)),a6,7),colorYellow;
a9:=(CLOSE = ((HHV(CLOSE,0)) * a1)) AND (VOL >= 1000);
a10:=VOL = (HHV(VOL,0));
a11:=(STRFIND(STKNAME,'ST',1)) > 0;
a12:=(STRFIND(STKNAME,'S',1)) > 0;
a13:=NOT(a11) AND NOT(a12);
a14:=SUM((((((a13 AND a9) AND a10) AND (CLOSE > (MA(CLOSE,0)))) AND (TIME > 93500)) AND (TIME < 145500)),0);
a15:=((ALLBIDVOL / (ALLBIDVOL + ALLASKVOL)) * 100) * a1;
a16:=(HIGH + LOW) / 2;
a17:=(a14);
a18:=(a15);
a19:=(MA((MA(CLOSE,0)),0)) * a1;
DRAWTEXT(((((a13 AND a9) AND a10) AND (TIME > 93500)) AND (TIME < 144500)),CLOSE,'涨'),colorred,linethick5;

DRAWTEXTABS(25,282,' '),colorCyan;
DRAWTEXTABS(25,302,' '),colorCyan;
DRAWTEXT((FILTER((((a5 > 1) AND (a14 >= 2)) AND (a8 > 0)),15)),a6,'追涨'),linethick3,coloryellow;
a3:=(FINANCE2(37));
a20:=(EMA(CLOSE,SHORT)) - (EMA(CLOSE,LONG));
a21:=EMA(a20,M);
a22:=2 * (a20 - a21);
DRAWTEXT((FILTER(((a20 * a1) > 0.2),30)),CLOSE,'警报'),linethick2,colorGreen;
DRAWTEXTABS(180,2,'上涨家数:'+NUMTOSTRN(DYNAINFO(69),0)+' 家'),COLOR0000FF;
DRAWTEXTABS(380,2,'下跌家数:'+NUMTOSTRN(DYNAINFO(70),0)+' 家'),COLOR00FF00;
DRAWTEXTABS(285,2,'平盘家数:'+NUMTOSTRN(DYNAINFO(71),0)+' 家'),COLORFFFFFF;
X1:POLYLINE(C X5:POLYLINE(C X9:POLYLINE(C 十:POLYLINE(C X11:POLYLINE(C X51:POLYLINE(C X91:POLYLINE(C 二十:POLYLINE(C X12:POLYLINE(C X52:POLYLINE(C X92:POLYLINE(C 三十:POLYLINE(C X13:POLYLINE(C X53:POLYLINE(C tt:=BARSCOUNT(c);
CC:=(close);
均线:=SUM(AMOUNT,0)/SUM(VOL*100,0);
上均:=均线 + AVEDEV(C,tt)*2;
下均:=均线 - AVEDEV(C,tt)*2;
时长:=if(HOUR>=13 AND HOUR<15 ,1,0);
涨幅:=(close/DYNAINFO(3))>=1.03;
跌幅:=(close/DYNAINFO(3))<=0.97;
涨跌幅:=涨幅 OR 跌幅;
yy:=SMA(vol,30,1);
放量:=(yy-LLV(Llv(yy,1),30))/(HHV(Hhv(yy,1),30)-LLV(Llv(yy,1),30))>0;
横盘:=((HHV(CLOSE,TT)-LLV(CLOSE,TT))/CLOSE)<=0.05;
横涨:=涨跌幅=0 and 横盘 and 时长 and 放量 and CROSS(CC,上均)and DYNAINFO(22) 横跌:=涨跌幅=0 and 横盘 and 时长 and 放量 and CROSS(下均,CC) ;
PP:= FILTER(横涨,100) ;
UU:= FILTER(横跌,50) ;
DRAWTEXT(PP,上均,'★上突'),colorff00ff;
DRAWTEXT(UU,下均,'★下破'),COLOR00FFFF;
VERTLINE( PP,3),COLORWHITE,LINETHICK2;
VERTLINE( UU,3),COLOR00FF00,LINETHICK2;
选股:=(pp>0)/1;
A001:=CLOSE-REF(CLOSE,6);
A002:=MA(A001,6);
A003:=((CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9)))*100;
A004:=SMA(A003,3,1);
A005:=SMA(A004,3,1);
A006:=EMA((3*A004-2*A005),2);
A007:=(HIGH+LOW+CLOSE)/3;
A008:=((A007-MA(A007,14))/(0.015*AVEDEV(A007,14)))/2;
A009:=(A008+(EMA(((0-(100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))))+100)/100,3)*200-100))/2;
A010:=A009-REF(A009,14);
A011:=A009-REF(A009,26);
A012:=(A009+A010+A011)/3;
KKM:=EMA(A012,4);
A013:=HHV(HIGH,34);
A014:=(2*CLOSE+HIGH+LOW)/4;
A015:=LLV(LOW,34);
A016:=EMA(((A014-A015)/(A013-A015))*100,13);
A017:=EMA(0.667*REF(A016,1)+0.333*A016,2);
KKMD:=A016-A017>1 AND A016<30 AND A017<30;
KKML:=A016-A017<0 AND A016>80 AND A017>80 AND REF(A016-A017,1)>0;
KKMQ:=COUNT(A016-A017>0,2)=2;
KKAL:=(A016-A017)<0;
DRAWTEXT(FILTER(KKMD,133),L,'★最佳时机'),COLOR00FFFF;

不胜感激!!!
?

    Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号

    免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!

    Top