分时抓涨停主图源码
-
相关简介:以下是分时抓涨停主图的原码,烦请高人改进并转为通达信和大智慧1版,造福散民,本人谢了,消息请发邮箱! 分时抓涨停主图(飞狐原码) BU:=BARSLAST(CLOSE=HHV(CLOSE,2000)); SE:=BARSLAST(CLOSE=LLV(CLOSE,2000)); KK1:=SE; KK2:=BU; LM1:=SE; LM2:=BU; OK:=KK1KK2 AND LM1LM2; OK1:=KK1KK2 AND LM1LM2; NOK:=KK2KK1 AND LM2LM1; NOK1
-
文章来源:股海网作者:股海网发布时间:2015-01-06浏览次数:
以下是分时抓涨停主图的原码,烦请高人改进并转为通达信和大智慧1版,造福散民,本人谢了,消息请发邮箱!
分时抓涨停主图(飞狐原码)
BU:=BARSLAST(CLOSE=HHV(CLOSE,2000));
SE:=BARSLAST(CLOSE=LLV(CLOSE,2000));
KK1:=SE;
KK2:=BU;
LM1:=SE;
LM2:=BU;
OK:=KK1>KK2
AND LM1>LM2;
OK1:=KK1>KK2 AND LM1<LM2;
NOK:=KK2>KK1 AND
LM2>LM1;
NOK1:=KK2>KK1 AND
LM2<LM1;
DRAWICON(CROSS(KK1,KK2),OPEN*1,1);
DRAWTEXT(CROSS(KK1,KK2),OPEN*0.99,'抓'),colorFF00;
AOLYLINE(CLOSE<COST(50),COST(20)),POINTDOT,color8800;
BOLYLINE(CLOSE<COST(50),COST(80)),POINTDOT,color66CC00;
T:=OPENMINUTES(TIME);
CLOSE=DYNAINFO(7);
总量:=SUM(VOL,T);
总额:=SUM(AMOUNT,T);
均价:=总额/(总量*100);
次数:=COUNT(CLOSE>均价,T);
占比:=次数/T*100;
分时强势RAWICON(CROSS(CLOSE,均价)
AND CLOSE>均价 AND 占比>80 AND
T>5,CLOSE*0.985,4);
DRAWTEXT(CROSS(CLOSE,均价) AND CLOSE>均价 AND 占比>80
AND
T>5,CLOSE*0.98,'涨价'),colorFFFF;
VAR1:=AMOUNT/VOL/100;
VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
VAR3:=SUM(AMOUNT,5)/VAR1/100;
VAR4:=SUM(AMOUNT,13)/VAR1/100;
VAR5:=SUM(AMOUNT,34)/VAR1/100;
CYC5:=DMA(VAR2,VOL/VAR3);
CYC13:=DMA(VAR2,VOL/VAR4);
CYC34:=DMA(VAR2,VOL/VAR5);
CYC∞:=DMA(VAR2,VOL/CAPITAL);
一剑封喉:=CROSS(CLOSE,MA(CLOSE,13))
AND CROSS(CLOSE,MA(CLOSE,34)) AND
CROSS(CLOSE,MA(CLOSE,55));
A1:=(CLOSE-LLV(LOW,22))/(HHV(HIGH,22)-LLV(LOW,22))*100;
A2:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
A:=3*SMA(A1,5,1)-2*SMA(SMA(A2,5,1),3,1),POINTDOT,color8800;
YNGS:=一剑封喉
AND A<30;
DRAWICON(一剑封喉 AND A<30,LOW*0.985,10);
DRAWTEXT(一剑封喉 AND
A<30,LOW*0.98,'停'),colorFF;
昨收:=DYNAINFO(3);
HH:=DYNAINFO(5);
LL:=DYNAINFO(6);
FK:=MAX(HH-昨收,昨收-LL);
ZS:=昨收-FK*1.01;
Q1:=昨收-FK*1.012;
Q2:=昨收-2*FK*1.012;
Q3:=昨收-3*FK*1.01;
RSV:=((CLOSE-LLV(LOW,240))/(HHV(HIGH,240)-LLV(LOW,240))*200-100)/2;
K:=SMA(SMA(RSV,18,1),3,1);
D:=MA(EMA(K,18),3);
J:=3*K-2*D;
空头:=-3*K-2*D;
DIFF:=EMA(CLOSE,240)-EMA(CLOSE,240)*100;
DEA:=EMA(DIFF,18);
多头MACD:=(-3*(DIFF-DEA))*2;
ZD:=HHV(多头MACD,0);
ZX:=LLV(多头MACD,0);
CZ:=(Q2-Q3)/6;
FILLRGN(1,昨收-2*FK*1.015,昨收-3*FK*1.01),color10000;
Q1,LINETHICK2,colorCC;
Q2-CZ,POINTDOT,colorCC;
Q2-2*CZ,POINTDOT,colorCC;
Q2-3*CZ,POINTDOT,colorCC;
Q2-4*CZ,POINTDOT,colorCC;
Q2-5*CZ,POINTDOT,colorCC;
FDM:=MAX(ABS(ZD),ABS(ZX))*1.5;
RB:=(Q2+Q3)/2+2*(Q2-Q3)/3/FDM*多头MACD;
STICKLINE(多头MACD>0,RB,(Q2+Q3)/2,2,1),LINETHICK2,colorFF;
STICKLINE(多头MACD<0,RB,(Q2+Q3)/2,2,1),LINETHICK2,colorFF00;
短买:IF(CROSS(K,D)
AND
K>0,(Q2+Q3)/2+(Q2-Q3)/4,(Q2+Q3)/2),LINETHICK2,colorFF00FF;
突击:IF(CROSS(多头MACD,空头)
AND
多头MACD>0,(Q2+Q3)/2+(Q2-Q3)/4,(Q2+Q3)/2),LINETHICK2,colorFFFF;
DRAWICON(CROSS(K,D)
AND K>0,RB,1),ALIGN1;
DRAWTEXT(CROSS(K,D) AND
K>0,(Q2+Q3)/2+(Q2-Q3)/3,'短买'),colorFF0000;
DRAWTEXT(CROSS(多头MACD,空头) AND
多头MACD>0,(Q2+Q3)/2+(Q2-Q3)/3,'突击'),colorFFFF00;
KK:=DATE<1341231;
PK:=VOL*(OPEN+CLOSE+HIGH+LOW)/4;
PK1:=IF(VOL>0,PK/VOL,(OPEN+CLOSE+HIGH+LOW)/4);
C11:=PK1;
A01:=(C11-LLV(C11,75))/(HHV(C11,75)-LLV(C11,75));
A11:=SMA(A01,13,1);
A21:=SMA(A11,13,1);
A31:=3*A11-2*A21;
A41:=2*A31-0.5;
ZS:=DYNAINFO(3)*0.95;
选1:=IF(KK,C11*(1-(A41-A21)/40),0);
选2:=CROSS(C11,选1)
AND CLOSE/REF(CLOSE,1)<1.03;
选3:IF(选2,ZS*1.03,ZS),colorFF00;
{明关键价位}
c1:=ref(c,1);
c2:=hhv(c1,2);
c3:=llv(c1,1);
et:=hhv(c1,2);
et1:=ref(et,1);
xb:=llv(c1,1);
xb1:=ref(xb,1);
m:=BARSLAST(c<xb and c1>=xb1);
m11:=ref(m,1);
n9:=BARSLAST(c>et and c1<=et1);
n1:=ref(n9,1);
m21:=BARSLAST(m-n9>0 and m11<=n1)+1;
n2:=BARSLAST(n9-m>0 and n1<=m11)+1;
et2:=hhv(et,m21);
xb2:=llv(xb,n2);
a:=if(m-n9>0 and m11<=n1,1,if(n9-m>0 and n1<=m11,0,2));
h1:=if(m-n9>0,c,et2);
h2:=if(a=1,c,c2);
h3:=if(m-n9<0,c,xb2);
h4:=if(a=1,c,xb2);
h5:=if(m-n9>0 or a=1,c,h3);
明关键价位:ref(h5,1);{公称名称: 一剑封喉}
A1:=IF(BUYVOL,V,10000);//取主动性买盘,你可用自己的条件!
A2:=IF(SELLVOL,V,0);//取主动性卖盘,你可用自己的条件!
ZS:=DYNAINFO(3)*0.92;
K1:=(SUM(A1,0)/SUM(V,0));
K2:=(SUM(A2,0)/SUM(V,0));
K3(K1*0.35)+ZS)+((K2*0.35)+ZS))/2,POINTDOT;
KK1:IF(K1 ,(K1*0.35)+ZS,ZS),COLORGREEN;
KK30:IF(K2,(K2*0.35)+ZS,ZS),COLORMAGENTA;
MA1:=MA(CLOSE,2);
Var1:=简单移动平均(收盘价, 1);
Var2:=简单移动平均(收盘价, 5);
Var3:=简单移动平均(收盘价, 10);
Var4:=简单移动平均(收盘价, 20);
Var5:=简单移动平均(收盘价, 30);
Var6:=(Var1+Var2+Var3+Var4+Var5)/5;
Var7:=(Var6-向前引用(Var6, 15))/向前引用(Var6,15)*100;
Var8:=(Var6-向前引用(Var6, 15))/向前引用(Var6, 15)*100;
Var9:=指数平滑移动平均(Var7, 8);
平均价:=(最高价+4*最低价+开盘价+收盘价)/7;
均价差:= 指数平滑移动平均(平均价,13) - 指数平滑移动平均(平均价,34);
移动均价:= 指数平滑移动平均(均价差,5);
差:=(均价差-移动均价)*5;
A:=条件函数(差>=1000 ,1000 ,条件函数(差<=平均价,平均价,差) );
分水岭:=线性回归预测值(线性回归预测值(A,31),10);
涨↑:条件函数(A>分水岭,A,分水岭),LINETHICK1,colorred;
跌↓:条件函数(A<分水岭,A,分水岭),LINETHICK1,ColorGREEN;
{分:forcast(forcast(A,31),10),linethick2,colorffff00;}
ma6:=简单移动平均(收盘价,6);
ma18:=简单移动平均(收盘价,18);
ma55:=简单移动平均(收盘价,55);
ma125:=简单移动平均(收盘价,125);
ma250:=简单移动平均(收盘价,250);
TY:=收盘价;
A1:=向前引用(TY,10)=最高值(TY,2*10+1); B1:=信号过滤(A1,10); C1:=向前赋值(B1,10+1); HD:=信号过滤(C1,10);
A2:=向前引用(TY,10)=最低值(TY,2*10+1); B2:=信号过滤(A2,10); C2:=向前赋值(B2,10+1); LD:=信号过滤(C2,10);
AA:=向前引用(收盘价,上一次条件成立位置(HD)); B:=向前引用(收盘价,上一次条件成立位置(LD));
t11:=上一次条件成立位置(HD)<上一次条件成立位置(LD) AND 求逻辑非(HD) ;
t21:=上一次条件成立位置(HD)>上一次条件成立位置(LD) AND 求逻辑非(LD);
波峰:条件函数(t11,AA,AA),ColorFF00FF,点状线;
画柱线(t11,AA,AA,9,0),ColorFF00FF;
波谷:条件函数(t21,B,B),Color80FF00,点状线;
画柱线(t21,B,B,9,0),Color80FF00;
买进价:=((收盘价-向前引用(ma6,1))/6+ma6)*1.004;
买进条件:=交叉函数(收盘价,买进价) and 买进价>向前引用(买进价,1);
黄点状线:条件函数(买进条件,最低价,最高价),COLORYELLOW,linethick4,点状线;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,8);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);
DRAWTEXT(IF(B1>0,1,0),L-0.1,'MACD底背'),COLORGREEN;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)<K AND CROSS(K,D);
DRAWTEXT(IF(B2>0,1,0),L-0.25,'KDJ底背'),COLORYELLOW;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
A3:=BARSLAST(REF(CROSS(RSI1,RSI2),1));
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)<RSI1 AND CROSS(RSI1,RSI2);
DRAWTEXT(IF(B3>0,1,0),L-0.4,'RSI底背'),COLORCYAN;
C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));
D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);
DRAWTEXT(IF(D1>0,1,0),H+0.1,'MACD顶背'),COLORWHITE;
C2:=BARSLAST(REF(CROSS(D,K),1));
D2:=REF(C,C2+1)<C AND REF(K,C2+1)>K AND CROSS(D,K);
DRAWTEXT(IF(D2>0,1,0),H+0.25,'KDJ顶背'),COLORWHITE;
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)<C AND REF(RSI1,C3+1)>RSI1 AND CROSS(RSI2,RSI1);
DRAWTEXT(IF(D3>0,1,0),H+0.4,'RSI顶背'),COLORMAGENTA;