请高手帮忙写一个通达信的选股公式,谢谢!

[通达信] 5476 5
设置
2387724 Lv.2

专栏

发表于 2016-4-7 23:53 复制 显示全部楼层 正序浏览 |
跳转到指定楼层
AA1:=(VOL/CLOSE)/3;
AA2:=SUM((IF(((AA1>40) AND (CLOSE>(REF(CLOSE,1)))),AA1,0)),0);
AA3:=SUM((IF(((AA1>40) AND (CLOSE<(REF(CLOSE,1)))),AA1,0)),0);
AA4:=SUM((IF(((AA1<40) AND (CLOSE>(REF(CLOSE,1)))),AA1,0)),0);
AA5:=SUM((IF(((AA1<40) AND (CLOSE<(REF(CLOSE,1)))),AA1,0)),0);
AA6:=((AA2+AA3)+AA4)+AA5;
AA7:=IF((BARSTATUS=2),((100*AA2)/AA6),0);
AA8:=((IF((BARSTATUS=2),((100*AA3)/AA6),0)));
AA9:=((IF((BARSTATUS=2),((100*AA4)/AA6),0)));
AA10:=((IF((BARSTATUS=2),((100*AA5)/AA6),0)));
机买:=(AA2),LINETHICK0;
机卖:=(AA3),LINETHICK0;
散买:=(AA4);
散卖:=(AA5);
总买:=AA2+AA4;
总卖:=AA3+AA5;
机构买比:=机买/总买*0.1,LINETHICK0;
机构卖比:=机卖/总卖*0.1,LINETHICK0;

DRAWTEXT_FIX(1,0.700,1-0.10,0,STRCAT(STRCAT('【机买】',CON2STR(机买,1)),'万')),COLORRED;
DRAWTEXT_FIX(1,0.700,1-0.05,0,STRCAT(STRCAT('【机卖】',CON2STR(机卖,1)),'万')),COLOR00FF00;
DRAWTEXT_FIX(1,0.850,1-0.10,0,STRCAT(STRCAT('【散买】',CON2STR(散买,1)),'万')),COLORRED;
DRAWTEXT_FIX(1,0.850,1-0.05,0,STRCAT(STRCAT('【散卖】',CON2STR(散卖,1)),'万')),COLOR00FF00;


最新:CLOSE,LINETHICK2,COLORWHITE;
AA:=SUM(AMOUNT,BARSCOUNT(C))/SUM(VOL*100,BARSCOUNT(C));
BB:=BETWEEN(C/AA,C+H,C-H);
DRAWTEXT( ISLASTBAR  AND 最新>REF(最新,1),最新,STRCAT(' 涨▲',CON2STR(最新,2))),COLORMAGENTA;
DRAWTEXT( ISLASTBAR  AND 最新<REF(最新,1),最新,STRCAT(' 跌▼',CON2STR(最新,2))),COLOR00FF00;
DRAWTEXT_FIX(1,0.020,1-0.99,0,DYBLOCK),COLORWHITE;
DRAWTEXT_FIX(1,0.100,1-0.99,0,HYBLOCK),COLORYELLOW;

均价:SUM(C*V,240)/SUM(V,240),COLORYELLOW,LINETHICK2;

TT:=BARSCOUNT(C);
前高:=REF(HHV(H,TT),1);
突破:=CROSS(C,REF(HHV(H,TT),1)){ AND HHVBARS(VOL,TT)=0} AND C/均价<1.09 AND TT>1  AND TT<240;
DRAWTEXT(CROSS(C,REF(HHV(H,TT),1)) AND {HHVBARS(VOL,TT)=0  AND} C/均价<1.09 AND TT>=1 AND  TT<240 ,前高, '←突'),COLORRED;

主力扫盘:=COUNT(突破,13)>=3 AND CROSS(C,REF(HHV(H,TT),1)){ AND HHVBARS(VOL,TT)=0};
DRAWTEXT(主力扫盘,前高, '←扫盘'),COLORYELLOW;

{已主力扫盘:=BARSLAST(主力扫盘)<13;
DRAWTEXT(BARSLAST(主力扫盘)<8,(DYNAINFO(3))*9.5/10 , '↖已扫'),COLORGREEN;}

全仓买进:=CROSS(C,REF(HHV(H,TT),1)) AND HHVBARS(VOL,TT)=0 AND C/均价<1.09 AND TT>1  AND TT<240  AND BARSLAST(主力扫盘)>=21;

DRAWTEXT(全仓买进 ,前高, '←全仓'),COLORCYAN;

VAR1:=EMA(EMA(C,13),13);
控盘:=(VAR1-REF(VAR1,1))/REF(VAR1,1)*1000;
JJ:=DYNAINFO(11);
P:=55;
S:=8;
M1:=3;
能量:=(EMA(C,S)-EMA(C,P))*10;
空头:=EMA(能量,M1);
BTJ11:=(C-JJ)/JJ<-0.03;
BTJ2:=控盘>REF(控盘,1) AND 控盘<-0.2;
BTJ3:=CROSS(能量,空头) AND 能量<-0.3;
BTJ811:=FILTER(BTJ11 AND BTJ2 AND BTJ3,13);
有庄:=BTJ811;
DRAWTEXT(BTJ811,C*0.999,'←有庄'),COLORRED;

H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
阻力:L1+P1*7/8,COLORGREEN;
支撑:L1+P1*0.5/8,COLORMAGENTA;
{DRAWICON(LONGCROSS(支撑,C,2),C,5);
DRAWICON(LONGCROSS(C,阻力,2),C,6);}

资金流入:=SUM(IF(C>REF(C,1),C*V,0),FROMOPEN);
资金流出:=-SUM(IF(C<REF(C,1),C*V,0),FROMOPEN);
净资金:=(资金流入+资金流出)/10000;

DRAWTEXT_FIX(1,0.700,1-0.15,0,STRCAT(STRCAT('【净买】',CON2STR(净资金,1)),'万')),COLORRED;

KP:=DYNAINFO(4);
ZX:=DYNAINFO(7);
分时顶:HHV(H,480),COLORRED,DOTLINE;
分时底:LLV(L,480),COLORGREEN,DOTLINE;

{DRAWICON(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C,1);}
DRAWNUMBER(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C*0.99,TIME);
DRAWNUMBER(FILTER(CROSS(C,DYNAINFO(3)*1.1-0.01),60),C*0.98,C),COLORYELLOW;

{分时量}
预测量:="FSKY8.预测量#DAY";
主买:="FSKY8.主买#DAY";
前量:="FSKY8.前量#DAY";
昨量:="FSKY8.昨量#DAY";
今量:="FSKY8.今量#DAY";
前4:="FSKY8.前4#DAY";
前5:="FSKY8.前5#DAY";
前总:=前量;
昨总:=昨量;
总:=今量,NODRAW;
BMM:=MAX(前总,昨总);
AMM:=IF(总/BMM>2,BMM*3,BMM);
MM:=350/AMM;

A1:=IF(ZX>=KP,255,0);
A2:=IF(ZX>=KP,0,255);
A3:=IF(ZX>=KP,0,255);
DRAWRECTREL(0,975,MM*预测量,990,RGB(90,90,90));
DRAWRECTREL(0,975,MM*今量,990,RGB(A1,A2,A3));
DRAWRECTREL(0,975,MM*主买,990,RGB(250,250,280));
ZO:="FSKY8.ZO#DAY";
ZC:="FSKY8.ZC#DAY";
A4:=IF(ZC>=ZO,255,0);
A5:=IF(ZC>=ZO,0,255);
A6:=IF(ZC>=ZO,0,255);
DRAWRECTREL(0,945,MM*昨量,960,RGB(A4,A5,A6));
JO:="FSKY8.JO#DAY";
JC:="FSKY8.JC#DAY";
A7:=IF(JC>=JO,255,0);
A8:=IF(JC>=JO,0,255);
A9:=IF(JC>=JO,0,255);
DRAWRECTREL(0,915,MM*前量,930,RGB(A7,A8,A9));
JO3:="FSKY8.JO3#DAY";
JC3:="FSKY8.JC3#DAY";
A10:=IF(JC3>=JO3,255,0);
A11:=IF(JC3>=JO3,0,255);
A12:=IF(JC3>=JO3,0,255);
DRAWRECTREL(0,885,MM*前4,900,RGB(A10,A11,A12));
JO4:="FSKY8.JO4#DAY";
JC4:="FSKY8.JC4#DAY";
A13:=IF(JC4>=JO4,255,0);
A14:=IF(JC4>=JO4,0,255);
A15:=IF(JC4>=JO4,0,255);
DRAWRECTREL(0,855,MM*前5,870,RGB(A13,A14,A15));

{分时K}
ZS:=DYNAINFO(3);
ZG:=DYNAINFO(5);
ZD:=DYNAINFO(6);
OP:=500-(KP/ZS-1)*1200;
CL:=500-(ZX/ZS-1)*1200;
HI:=500-(ZG/ZS-1)*1200;
LO:=500-(ZD/ZS-1)*1200;
N1:=IF(TIME>=130000 OR TIME<91500,260,760);{360,860}
Z1:=IF(ZX>=KP,255,0);
Z2:=IF(ZX>=KP,0,255);
Z3:=IF(ZX>=KP,0,255);
DRAWRECTREL(N1+35,HI,N1+35,LO,RGB(Z1,Z2,Z3));
Q1:=IF(ZX>=KP,255,0);
Q2:=IF(ZX>=KP,0,255);
Q3:=IF(ZX>=KP,0,255);
DRAWRECTREL(N1+25,OP,N1+45,CL,RGB(Q1,Q2,Q3));
ZH:="FSKY8.ZH#DAY";
ZL:="FSKY8.ZL#DAY";
ZKP:=500-(ZO/ZS-1)*1200;
ZCP:=500-(ZC/ZS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#DAY";
JL4:="FSKY8.JL4#DAY";
ZZKP4:=500-(JO4/ZS-1)*1200;
ZZCP4:=500-(JC4/ZS-1)*1200;
ZZZG4:=500-(JH4/ZS-1)*1200;
ZZZD4:=500-(JL4/ZS-1)*1200;
Z13:=IF(JC4>=JO4,255,0);
Z14:=IF(JC4>=JO4,0,255);
Z15:=IF(JC4>=JO4,0,255);
DRAWRECTREL(N1-85,ZZZG4,N1-85,ZZZD4,RGB(Z13,Z14,Z15));
Q13:=IF(JC4>=JO4,255,0);
Q14:=IF(JC4>=JO4,0,255);
Q15:=IF(JC4>=JO4,0,255);
DRAWRECTREL(N1-95,ZZKP4,N1-75,ZZCP4,RGB(Q13,Q14,Q15));
JO5:="FSKY8.JO5#DAY";
JC5:="FSKY8.JC5#DAY";
JH5:="FSKY8.JH5#DAY";
JL5:="FSKY8.JL5#DAY";
ZZKP5:=500-(JO5/ZS-1)*1200;
ZZCP5:=500-(JC5/ZS-1)*1200;
ZZZG5:=500-(JH5/ZS-1)*1200;
ZZZD5:=500-(JL5/ZS-1)*1200;
Z16:=IF(JC5>=JO5,255,0);
Z17:=IF(JC5>=JO5,0,255);
Z18:=IF(JC5>=JO5,0,255);
DRAWRECTREL(N1-115,ZZZG5,N1-115,ZZZD5,RGB(Z16,Z17,Z18));
Q16:=IF(JC5>=JO5,255,0);
Q17:=IF(JC5>=JO5,0,255);
Q18:=IF(JC5>=JO5,0,255);
DRAWRECTREL(N1-125,ZZKP5,N1-105,ZZCP5,RGB(Q16,Q17,Q18));
JO6:="FSKY8.JO6#DAY";
JC6:="FSKY8.JC6#DAY";
JH6:="FSKY8.JH6#DAY";
JL6:="FSKY8.JL6#DAY";
ZZKP6:=500-(JO6/ZS-1)*1200;
ZZCP6:=500-(JC6/ZS-1)*1200;
ZZZG6:=500-(JH6/ZS-1)*1200;
ZZZD6:=500-(JL6/ZS-1)*1200;
Z19:=IF(JC6>=JO6,255,0);
Z20:=IF(JC6>=JO6,0,255);
Z21:=IF(JC6>=JO6,0,255);
DRAWRECTREL(N1-145,ZZZG6,N1-145,ZZZD6,RGB(Z19,Z20,Z21));
Q19:=IF(JC6>=JO6,255,0);
Q20:=IF(JC6>=JO6,0,255);
Q21:=IF(JC6>=JO6,0,255);
DRAWRECTREL(N1-155,ZZKP6,N1-135,ZZCP6,RGB(Q19,Q20,Q21));
JO7:="FSKY8.JO7#DAY";
JC7:="FSKY8.JC7#DAY";
JH7:="FSKY8.JH7#DAY";
JL7:="FSKY8.JL7#DAY";
ZZKP7:=500-(JO7/ZS-1)*1200;
ZZCP7:=500-(JC7/ZS-1)*1200;
ZZZG7:=500-(JH7/ZS-1)*1200;
ZZZD7:=500-(JL7/ZS-1)*1200;
Z22:=IF(JC7>=JO7,255,0);
Z23:=IF(JC7>=JO7,0,255);
Z24:=IF(JC7>=JO7,0,255);
DRAWRECTREL(N1-175,ZZZG7,N1-175,ZZZD7,RGB(Z22,Z23,Z24));
Q22:=IF(JC7>=JO7,255,0);
Q23:=IF(JC7>=JO7,0,255);
Q24:=IF(JC7>=JO7,0,255);
DRAWRECTREL(N1-185,ZZKP7,N1-165,ZZCP7,RGB(Q22,Q23,Q24));
JO8:="FSKY8.JO8#DAY";
JC8:="FSKY8.JC8#DAY";
JH8:="FSKY8.JH8#DAY";
JL8:="FSKY8.JL8#DAY";
ZZKP8:=500-(JO8/ZS-1)*1200;
ZZCP8:=500-(JC8/ZS-1)*1200;
ZZZG8:=500-(JH8/ZS-1)*1200;
ZZZD8:=500-(JL8/ZS-1)*1200;
Z25:=IF(JC8>=JO8,255,0);
Z26:=IF(JC8>=JO8,0,255);
Z27:=IF(JC8>=JO8,0,255);
DRAWRECTREL(N1-205,ZZZG8,N1-205,ZZZD8,RGB(Z25,Z26,Z27));
Q25:=IF(JC8>=JO8,255,0);
Q26:=IF(JC8>=JO8,0,255);
Q27:=IF(JC8>=JO8,0,255);
DRAWRECTREL(N1-215,ZZKP8,N1-195,ZZCP8,RGB(Q25,Q26,Q27));
JO9:="FSKY8.JO9#DAY";
JC9:="FSKY8.JC9#DAY";
JH9:="FSKY8.JH9#DAY";
JL9:="FSKY8.JL9#DAY";
ZZKP9:=500-(JO9/ZS-1)*1200;
ZZCP9:=500-(JC9/ZS-1)*1200;
ZZZG9:=500-(JH9/ZS-1)*1200;
ZZZD9:=500-(JL9/ZS-1)*1200;
Z28:=IF(JC9>=JO9,255,0);
Z29:=IF(JC9>=JO9,0,255);
Z30:=IF(JC9>=JO9,0,255);
DRAWRECTREL(N1-235,ZZZG9,N1-235,ZZZD9,RGB(Z28,Z29,Z30));
Q28:=IF(JC9>=JO9,255,0);
Q29:=IF(JC9>=JO9,0,255);
Q30:=IF(JC9>=JO9,0,255);
DRAWRECTREL(N1-245,ZZKP9,N1-225,ZZCP9,RGB(Q28,Q29,Q30));

MA5:="FSKY8.MA5#DAY";
XMA5:=500-(MA5/ZS-1)*1200;
DRAWRECTREL(N1+428,XMA5,N1+442,XMA5,RGB(255,255,255));
DRAWTEXT_FIX(N1+45,XMA5,1-0.15,0,STRCAT(STRCAT('MA5',CON2STR(A5,1)),'')),COLORRED;
MA10:="FSKY8.MA10#DAY";
XMA10:=500-(MA10/ZS-1)*1200;
DRAWRECTREL(N1+418,XMA10,N1+452,XMA10,RGB(250,250,280));
MA20:="FSKY8.MA20#DAY";
XMA20:=500-(MA20/ZS-1)*1200;
DRAWRECTREL(N1+408,XMA20,N1+462,XMA20,RGB(0,0,255)),COLORC0C0C0;
MA60:="FSKY8.MA60#DAY";
XMA60:=500-(MA60/ZS-1)*1200;
DRAWRECTREL(N1+398,XMA60,N1+472,XMA60,RGB(0,255,0)),COLOR808000;
阻力1:=REFDATE(REF(HHV(C,60),FROMOPEN-60),DATE)DOTLINE,COLORCYAN;

请把带有庄的 股票选出来,谢谢!

举报

使用道具 扔鸡蛋 回复

2387724
Lv.2

专栏

发表于 2016-4-8 21:41 复制 查看全部楼层
游客,您是(游客)级别,无法查看回复内容,请登录论坛并到新手区学习升级之后才能查看。升级指南请看...

举报

使用道具 点亮 支持 扔鸡蛋 回复

3008729
Lv.0

专栏

发表于 2016-4-8 15:27 复制 查看全部楼层
游客,您是(游客)级别,无法查看回复内容,请登录论坛并到新手区学习升级之后才能查看。升级指南请看...

举报

使用道具 点亮 支持 扔鸡蛋 回复

2387724
Lv.2

专栏

发表于 2016-4-8 11:35 复制 查看全部楼层
游客,您是(游客)级别,无法查看回复内容,请登录论坛并到新手区学习升级之后才能查看。升级指南请看...

举报

使用道具 点亮 支持 扔鸡蛋 回复

3008729
Lv.0

专栏

发表于 2016-4-8 07:18 复制 查看全部楼层
游客,您是(游客)级别,无法查看回复内容,请登录论坛并到新手区学习升级之后才能查看。升级指南请看...

举报

使用道具 点亮 支持 扔鸡蛋 回复

3570197
Lv.1

专栏

发表于 2016-4-8 00:03 复制 查看全部楼层
游客,您是(游客)级别,无法查看回复内容,请登录论坛并到新手区学习升级之后才能查看。升级指南请看...

举报

使用道具 支持 扔鸡蛋 回复

您需要登录后才可以回帖 登录

本版积分规则 《理想财富服务协议》《免责声明》

0楼
5楼
4楼
3楼
2楼
楼主
站长推荐 /8
回顶部 到页底
快速回复 返回顶部 返回列表