公式指标论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

大智慧分时【抓涨停】主图源码,精!有图有真相

2022-3-2 20:17| 发布者: admin| 查看: 71| 评论: 0

抓涨停

{抓涨停FSZ}
input:LONG(24,1,100),SHORT(13,1,100),M(6,1,100),N(6,1,100);
DRAWGBKLAST(CLOSE>0,STRIP(RGB(95,95,95),RGB(0,0,0),0));
DRAWTEXTREL(20,30,'抓涨停FSZ'),LINETHICK6,Coloryellow;
DRAWTEXTREL(200,30,STKLABEL+' '+STKNAME),LINETHICK6,ColorFFFF80;
wWj:=' ';
wyy1:=WEEKDAY;
if C>0 then begin;
wWj:=' 星期';
IF wyy1=5 then wWj:= wWj+'五';
IF wyy1=4 then wWj:= wWj+'四';
IF wyy1=3 then wWj:= wWj+'三';
IF wyy1=2 then wWj:= wWj+'二';
IF wyy1=1 then wWj:= wWj+'一';
end;
wWl:='';
wWh:='';
wyy2:=LMONTH;
wyy3:=LDAY;
IF BARSTATUS=2 then wWw:=' 农历 '+NUMTOSTRN(wyy2,0)+'月 '+NUMTOSTRN(wyy3,0)+'日';
IF BARSTATUS=2 then wWh:=NUMTOSTRN(date+1000000,0);
IF BARSTATUS=2 then wWl:=wWj;
DRAWTEXTREL(20 ,40 ,' '+wWh+wWl+wWw),LINETHICK3,ColorFFFF80;
IF BARSTATUS=2 then
zg:=FINANCE2(35);{总股}
lta:=FINANCE2(37);{流通A}
sy:=FINANCE2(3);{收益}
sl:=DYNAINFO(39);{市盈率}
wf:=FINANCE2(8);{未分}
gj:=FINANCE2(7);{公积};
jz:=FINANCE2(4);{净资}
cw:='总股:'+zg+' 流通A:'+lta+' 收益:'+sy+' 市盈率:'+sl+' 未分:'+wf+' 公积:'+gj+' 净资:'+jz;
DRAWTEXTREL(20,690,BKNAME),COLOR0055FF;
DRAWTEXTREL(20,760,cw),COLOR0055FF;
rcc:=DYNAINFO(3);
s2:=sma(c,3,1);
s6:=sma(c,5,1);
dk:=4*(s2-s6);
kk:=IF(DATATYPE=8,0.95,1);

{引用数据}
强势:="分引.强势#DAY";
轨强:="分引.轨强#DAY";

{时间设置}
V1:=TIME;
a1:=COUNT(BARSCOUNT(C)=1 and time<102000 ,0 );
T:=if(V1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)),
(FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)));
TT:=INTPART(2*T/5);

{两条暗轨}
AA1:POLYLINE(CLOSE5,COST(20)),DOTLINE,color660077,LINETHICK2;
BB1:POLYLINE(CLOSE5,COST(80)),DOTLINE,color227700,LINETHICK2;

{CYC}
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);
FILLRGN(CYC5,CYC13,CYC5>CYC13),color888800,LAYER3;
FILLRGN(CYC13,CYC34,CYC13>CYC34),colorAAAA00,LAYER3;

{分时MACD}
昨收:=DYNAINFO(3);
HH:=DYNAINFO(5);
LL:=DYNAINFO(6);
FK:=MAX(HH-昨收,昨收-LL)*0.1;
ZS:=昨收-FK*3.2;
Q1:=昨收-FK*3.22;
Q2:=昨收-2*FK*3.22;
Q3:=昨收-3*FK*3.2;
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
DIF:=(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG));
DEA:=(EMA(DIF,M));
MACD:=5*(DIF-DEA);
A4:=BARSLAST(ref(cross(dif,dea),1));
B1:=ref(c,A4+1)>c and ref(dif,A4+1) DRAWTEXT(FILTER(B1>0,5),rcc*kk-0.03*rcc*kk,'背离'),COLORyellow;
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),rcc*kk,MACD*4+rcc*kk,3,0),COLORFF00FF,LINETHICK3;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),rcc*kk,MACD*4+rcc*kk,3,0),COLORblue,LINETHICK3;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),rcc*kk,MACD*4+rcc*kk,3,0),COLOR4ABEFF,LINETHICK3;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),rcc*kk,MACD*4+rcc*kk,3,0),COLORblue,LINETHICK3;
STICKLINE(dk>0,rcc*kk,rcc*kk+dk,0,1),COLORRED;
STICKLINE(dk<0,rcc*kk,rcc*kk+dk,0,1),COLORCYAN;

{多头MACD}
DIFF:=EMA(CLOSE,240)-EMA(CLOSE,240)*100;
DEAA:=EMA(DIFF,18);
多头MACD:(-3*(DIFF-DEAA))*20,LINETHICK0;
ZD:=HHV(多头MACD,0);
ZX:=LLV(多头MACD,0);
CZ:=(Q2-Q3)/6;
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),LINETHICK1,color0000FF;
STICKLINE(多头MACD<0,RB,(Q2+Q3)/2,2,1),LINETHICK1,color00FF00;
{火焰山及底部信号}
faa:=WINNER(CLOSE+CLOSE*15/100)*100;
fbb:=WINNER(CLOSE+CLOSE*0/100)*100;
fcc:=faa-fbb;
fdd:=(WINNER(CLOSE-CLOSE*0.1/100)-WINNER(CLOSE-CLOSE*15/100))*100;
fee:=fcc<3 and fdd<0.5 and OPEN<>LOW;
fa1:=DYNAINFO(6);
fa2:=IF(LOW>fa1,0,IF(HIGH fa3:=VOL/WINNER(LOW);
fa4:=REF(HHV(CLOSE,120),1);
fa5:=REF(LLV(CLOSE,120),1);
fa6:=100*(CLOSE-fa5)/(fa4-fa5);
fa7:=fa2>0 or fa2=1;
fa8:=fa7 and fa3/REF(fa3,3)>=3 and fa6<80;
fa9:=REF(fa8,1) or REF(fa8,2) or REF(fa8,3) or REF(fa8,4);
fa10:=fa8 and fa9;
fa11:=IF(FILTER(fa8,3),5,0);
fa12:=IF(FILTER(fa10,3) or fee,10,0);
eeee:=(rcc-ZS)/10;
fVar1:=REF(LOW,1);
fVar2:=SMA(ABS(LOW-fVar1),13,1)/SMA(MAX(LOW-fVar1,0),13,1);
fVar3:=EMA(fVar2,13);
fVar4:=LLV(LOW,34);
fVar51:=EMA(IF(LOW<=fVar4,fVar3,0),3);
fVar5:=IF(fVar51>20,20,fVar51);
DRAWTEXT(fa11,(Q2+Q3)/2*1.02,'↑进'),COLOR00FFFF,LAYER2;
DRAWTEXT(fa12,(Q2+Q3)/2*1.03,',↑加'),LAYER2;
主力进场:STICKLINE(fVar5>REF(fVar5,1),(Q2+Q3)/2,(Q2+Q3)/2+fVar5*eeee,10,0 ),COLORRED,LAYER0;
洗盘:IF(fVAR5 STICKLINE(fVAR5 fVar6:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((CLOSE-
LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
fVar7:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA((OPEN-LLV
(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
fVar8:=fVar6REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(fVar8 AND COUNT(fVar8,30)=1,(Q2+Q3)/2+3*eeee,'★迹'),LAYER0;
JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,(Q2+Q3)/2,(Q2+Q3)/2*1.01,4,0),ColorFF00FF;
DRAWTEXT(二次金叉,(Q2+Q3)/2*1.01,' 二金'),ColorYELLOW;
HH:=MA(CLOSE,10);
GG:=MA(CLOSE,12);
上:=ema((MA(HIGH,3) * 1.05),30);
下:=ema((MA(LOW,3) * 0.96),30);
决战:STICKLINE((((CROSS(DIF,DEA) AND ((下 - REF(下,1)) > 0)) AND (MACD >= REF(MACD,1))) AND
(DIF < 0)),(Q2+Q3)/2,(Q2+Q3)/2*1.01,1,0),color0000FF;
DRAWTEXT((((CROSS(DIF,DEA) AND ((下 - REF(下,1)) > 0)) AND (MACD >= REF(MACD,1))) AND (DIF
<= 0)),(Q2+Q3)/2*1.01,'DIF金叉'),color0000FF;

{两个主要买进信号}
RSV:=((CLOSE-LLV(LOW,240))/(HHV(HIGH,240)-LLV(LOW,240))*200-100);
K:=SMA(SMA(RSV,18,1),3,1);
D:=MA(EMA(K,18),3);
短买:=CROSS(K,D) AND K>0 AND close DRAWTEXT(短买,(Q2+Q3)/2+(Q2-Q3)/1,'短买'),colorFF0000,LAYER0;
DRAWICON((强势 OR 轨强) AND 短买 ,RB,1);
yy:=SMA(vol,30,1);
量1:=(yy-LLV(Llv(yy,1),30))/(HHV(Hhv(yy,1),30)-LLV(Llv(yy,1),30));
量:=(yy-LLV(Llv(yy,1),30))/(HHV(Hhv(yy,1),30)-LLV(Llv(yy,1),30))>0.92;
短横:=((HHV(CLOSE,TT)-LLV(CLOSE,TT))/CLOSE)<0.04;
横后上涨:=(close/DYNAINFO(3))>=1.02=0 and 短横 and 量 and CROSS(C,(MA(C*V,TT)/MA(V,TT) + AVEDEV(C,TT)*2));
上涨:=FILTER((CROSS(横后上涨,0)and 量 AND T>60
OR (T>60 AND close AND CROSS(C,MA(HHV(C,TT),1)))),30);
DRAWTEXT(上涨,(Q2+Q3)/2+(Q2-Q3)/1,'★涨'),COLORRED,LAYER0,LINETHICK3;
DRAWICON((强势 OR 轨强) AND 上涨,RB,1);
C,LINETHICK2,COLORFFFFFF,LAYER0;


鲜花

握手

雷人

路过

鸡蛋
返回顶部