捉牛观猴避熊主图 股性判断(通达信公式 主图 源码 测试图)

[复制链接]
查看54 | 回复0 | 2022-6-27 15:02:45 | 显示全部楼层 |阅读模式

 捉牛观猴避熊
提供解盘来做股性判断指标,

上面有很多信号,大部分有中文注解,慢慢理会吧

兔:=1080201;
龙:=1250628;
CYC:=IF((DATE>兔 AND DATE<龙),1,DRAWNULL);
龙年:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
发财:=MA(C,18)*CYC;
STICKLINE(C>龙年 AND C>发财,RE。FDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),COLOR00002F;
STICKLINE(C<龙年 AND C<发财,REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),COLOR002400;
STICKLINE((C<龙年 AND C>发财) OR (C>龙年 AND C<发财),REFDATE(HHV(H,130),DATE),REFDATE(LLV(L,130),DATE),5,0),COLOR402C00;
DRAWKLINE(H,O,L,C);
红看多:100,COLOR8080FF,NODRAW;
蓝变盘:100,COLORFFFFFF,NODRAW;
绿看空:100,COLOR6FFF6F,NODRAW;
 
 
{警示牌设置}
警示牌:=1;
高:=REFDATE(HHV(H,180),DATE)*1.05;
低:=REFDATE(LLV(L,180),DATE)*0.95;
A11:=MA(C,18);
A12:=MA(C,50);
A13:=MA(C,89);
A14:=IF((MA(C,180)<=高 AND MA(C,180)>=低) OR C>=MA(C,180),MA(C,180),DRAWNULL);
{—————股性判断—————}
牛股:=ISLASTBAR AND A11>A12 AND A12>A13 AND A13>IF(A14=DRAWNULL,0,A14) AND C>A11 OR ISLASTBAR AND A11>A12 AND C>=A11;
猴股:=ISLASTBAR AND A11>A12 AND C<A11 ;
熊股:=ISLASTBAR AND IF(A14=DRAWNULL,A12<A13 AND C<A13,A13<A14 AND C<A14) OR ISLASTBAR AND A11<A12;
DRAWGBK(警示牌=1 AND 牛股,0,0,0,'牛股',0);
DRAWGBK(警示牌=1 AND 猴股,0,0,0,'猴股',0);
DRAWGBK(警示牌=1 AND 熊股,0,0,0,'熊股',0);
DRAWKLINE(H,O,L,C);
超买:=MA(C,10)*IF(CAPITAL=0,1.04,1.1),POINTDOT,COLORGREEN,LINETHICK2;
DRAWTEXT(CROSS(MA(C,N1),MA(C,N2)),MA(C,N2)*0.99,'↖金叉'),LINETHICK2,COLORFF00FF;
 
 
STICKLINE(C>=O,C,O,3.4,0),COLOR0000AA;
STICKLINE(C>=O,C,O,3.0,0),COLOR0000BB ;
STICKLINE(C>=O,C,O,2.4,0),COLOR0000CC;
STICKLINE(C>=O,C,O,2.0,0),COLOR0000DD ;
STICKLINE(C>=O,C,O,1.6,0),COLOR0000EE;
STICKLINE(C>=O,C,O,1.2,0),COLOR0000FF;
STICKLINE(C>=O,C,O,0.6,0),COLOR0000FF;
STICKLINE(C>=O,H,L,0,0),COLORRED;
STICKLINE(C<=O,C,O,3.4,0),COLORAAAA00;
STICKLINE(C<=O,C,O,3.0,0),COLORBBBB00;
STICKLINE(C<=O,C,O,2.4,0),COLORCCCC00;
STICKLINE(C<=O,C,O,2.0,0),COLORDDDD00;
STICKLINE(C<=O,C,O,1.6,0),COLOREEEE00;
STICKLINE(C<=O,C,O,1.2,0),COLORFFFF00;
STICKLINE(C<=O,C,O,0.6,0),COLORFFFF00;
STICKLINE(C<=O,H,L,0,0),COLORFFFF00;
 AAA0:=CONST(HHV(H,50));PL5:=HHV(H,45); 
F:=100*(C-REF(C,1))/REF(C,1);
博尔:=IF(C<REF(O,1) AND F<0,1,0);
P1:=博尔;
量化:=IF(C<REF(O,2) AND F<0,1,0);
P2:=量化;
STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,3,0),COLORFF00FF;
 
 
 
V转: MA(C,5)<MA(C,10)  AND V=LLV(V,10) AND C>O NODRAW;
三日最低:=EMA((REF(L,4)+REF(L,3)+REF(L,2))/3,3); 
三日最高:=EMA((REF(H,4)+REF(H,3)+REF(H,2))/3,3); 
EXITLONG:CROSS(CROSS(三日最高,C),0.6),NODRAW;
DRAWTEXT(V转,L*0.98,'   V转'),COLORFFFFFF;
DRAWICON(V转,LOW*0.98,23);
DRAWICON(EXITLONG,H*1.01,35);
止跌:=(REF(EVERY(C<O,2),1) AND C>O);
 MTM:=C-REF(C,1);
 DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买0:=LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND CROSS(DX,MA(DX,2));
止跌买:止跌 AND 买0 ,NODRAW ;
DRAWTEXT(止跌买,L*0.98,'   止跌买'),COLORFFFFFF;
DRAWICON(止跌买,LOW*0.98,34);
 
 
VAR1:=REF((LOW+OPEN+CLOSE+HIGH)/4,1);
VAR2:=SMA(ABS(LOW-VAR1),13,1)/SMA(MAX(LOW-VAR1,0),10,1);
VAR3:=EMA(VAR2,10);
VAR4:=LLV(LOW,33);
VAR5:=EMA(IF(LOW<=VAR4,VAR3,0),3);
主力进:IF(VAR5>REF(VAR5,1),VAR5,0),NODRAW,COLOR505050;
DRAWTEXT(主力进,L*0.98,'   主力进'),COLORFFFFFF;
DRAWICON(主力进,LOW*0.98,13);
A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;
 A4:=SMA(A3,3,1);
 A5:=SMA(A4,3,1);
 A6:=3*A4-2*A5;
 A7:=C-REF(C,1);
 A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);
买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));
 DRAWTEXT(FILTER(买=1,5),LOW-0.05,'↖跟庄买'),COLORYELLOW;
 
STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW; 
ZT:=C/REF(C,1)>1.097;
XH:=FILTER(ZT,13);
BH:=BARSLAST(ZT);
CZ:=REF(H,BH)-REF(L,BH);
STICKLINE(ZT,REF(O,BH),REF(C,BH),2,0),COLORYELLOW;
DRAWTEXT(ZT,L*0.98,'★涨停'),COLOR4080FF;
 
 
N:=20;
中: EMA((HHV(H,N/2)+LLV(L,N/2))/2,N/3)COLOR6A6A6A;
BIAS:= ABS(C-中)/中;{乘离率}
P:=(1.2+5*FORCAST(BIAS,5)); {动态参数P}
动态上: 中+P*STD(C,N)COLOR80FFFF,LINETHICK1,DOTLINE;
动态下: 中-P*STD(C,N)COLOR80FFFF,LINETHICK1,DOTLINE;
CC:IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLOR000000,NODRAW;
止赢:1.05*CC,COLORMAGENTA,LINETHICK1;
DRAWTEXT(ISLASTBAR,止赢,'止赢'),LINETHICK1;
止损:0.97*CC,COLORYELLOW,LINETHICK1;
DRAWTEXT(ISLASTBAR,止损,'止损'),LINETHICK1;
V01:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20); 
V02:=(1-7/100)*(DMA(CLOSE,V01));
V03:=(1+7/100)*(DMA(CLOSE,V01));
V05:=MA((LOW+HIGH+CLOSE)/3,5);
短支撑:REFDATE(V02,DATE),LINETHICK1,COLOR454545;
DRAWTEXT(ISLASTBAR,短支撑,'短支撑'),LINETHICK1;
短阻力:REFDATE(V03,DATE),LINETHICK1,COLOR454545; 
DRAWTEXT(ISLASTBAR,短阻力,'短阻力'),LINETHICK1; 
波段10日:EMA(C,10),COLOR00FFFF,LINETHICK1;
红升2:IF(波段10日>REF(波段10日,1),波段10日,DRAWNULL),COLORFF00FF;
绿降2:IF(波段10日<REF(波段10日,1),波段10日,DRAWNULL),COLORFFFF00;
 
 
 
操作30日均线:EMA(C,30),COLORYELLOW,LINETHICK4;
红升:IF(操作30日均线>REF(操作30日均线,1),操作30日均线,DRAWNULL),COLORRED,LINETHICK4;
绿降:IF(操作30日均线<REF(操作30日均线,1),操作30日均线,DRAWNULL),COLOR009300,LINETHICK4;
{本周5周均线自动画线显示在日线上}
年:=YEAR,NODRAW;
月:=MONTH,NODRAW;
星期:=WEEKDAY,NODRAW;
日1:=DATETODAY(DATE);
上市日:=REF(DATE,TOTALBARSCOUNT-CURRBARSCOUNT);
自然日:=日1-DATETODAY(上市日)+1;
ZB:=(自然日-REF(自然日,1))!=星期-REF(星期,1)
OR TOTALBARSCOUNT-CURRBARSCOUNT=0;
本周第几天:=BARSLAST(ZB)+1;
本月第几天:=BARSLAST(年*100+月!=REF(年*100+月,1))+1;
MA1:=REF(C,本周第几天);
MA2:=REF(MA1,本周第几天);
MA3:=REF(MA2,本周第几天);
MA4:=REF(MA3,本周第几天);
五周价:=(C+MA1+MA2+MA3+MA4)/5;
五周:REFDATE(五周价,DATE),COLORLIRED,LINETHICK1,DOTLINE;
 
 
 
{支撑压力}
N0:=18;
A1:=REF(H,N0)=HHV(H,2*N0+1);
B1:=FILTER(A1,N0);
C1:=BACKSET(B1,N0+1);
D1:=FILTER(C1,N0);
A2:=REF(L,N0)=LLV(L,2*N0+1);

20225518314436791.rar

12.2 KB, 下载次数: 3

售价: 1 金钱  [记录]

20225518314436791.rar

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则