编写要求:
请老师把通达信的附图“百发百中”中的青云直上出现的位置做出一个选股+预警公式
BIAS1W :=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2W :=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3W :=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
MM:=(BIAS1W+2*BIAS2W+3*BIAS3W)/6;
MN:=MA(MM,3);
VAR24:=LLV(LOW,36);
VAR25:=HHV(HIGH,30);
VAR26:=EMA((CLOSE-VAR24)/(VAR25-VAR24)*4,4)*25;
底背离:IF(MN<-4 ,17,0),COLORA67D3D,LINETHICK3;
顶背离: IF((VAR26>90),17,0), COLOR6B238E,LINETHICK3;
IF(MN<-4 ,12,0),COLORBLACK,LINETHICK3;
IF((VAR26>90),12,0), COLORBLACK,LINETHICK3;
DRAWTEXT(底背离,6,'底背离'),COLORA67D3D;
DRAWTEXT(顶背离,6,'顶背离'),COLORGREEN;
N:=20;
MID:=MA(C,N);
VART1:=POW((C-MID),2);
VART2:=MA(VART1,N);
VART3:=SQRT(VART2);[localimg=129,186]1[/localimg]
UPPER:=MID+2*VART3;
LOWER:=MID-2*VART3;
BOLL:=REF(MID,1);
UB:=REF(UPPER,1);
LB:=REF(LOWER,1);
LOWER1:=MID-VART3;
LB1:=REF(LOWER1,1);
股价线:(C-LB1)/(UB-LB)*100,COLORGREEN, LINETHICK1;
趋势线:MA(股价线,6),COLORRED, LINETHICK3;
90,COLORGREEN, LINETHICK1;
50,COLORWHITE, LINETHICK1;
0,COLORWHITE, LINETHICK1;
VARC:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1);
准备建仓:EMA(IF(L<= LLV(L,30),VARC,0),3),COLORFF00FF,LINETHICK2;
VARO5:=LLV(LOW,27);
VARO6:=HHV(HIGH,34);
VARO7:=EMA((CLOSE-VARO5)/(VARO6-VARO5)*4,4)*25;
建仓区: IF((VARO7<10),80,100) ,COLORFFFF00,LINETHICK3;
IF((VARO7<10),85,100) ,COLORBLACK,LINETHICK2;
下单: IF(CROSS(3*SMA((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100,5,1),3,1),10),38,0),STICK ,COLORYELLOW, LINETHICK4;
DRAWTEXT(下单,38,'下单!'),COLORGREEN;
BIAS1:=(C-MA(C,6))/MA(C,6)*100;
BIAS2:=(C-MA(C,12))/MA(C,12)*100;
BIAS3:=(C-MA(C,24))/MA(C,24)*100;
BIAS:=(BIAS1+2*BIAS2+3*BIAS3)/6;
乖离1:=MA(BIAS,3);
乖离:IF(CROSS(BIAS,乖离1) AND 乖离1<-9,28,0),COLORRED,LINETHICK2;
IF(CROSS(BIAS,乖离1) AND 乖离1<-9,18,0),COLORRED,LINETHICK2;
STICKLINE(CROSS(BIAS,乖离1) AND 乖离1<-9,-12,0,6,0),COLORYELLOW;
DRAWTEXT(乖离,18,'低买'),COLORRED;
TRJ:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),5);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=(SUM(IF(((HD > 0) AND (HD > LD)),HD,0),5) );
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),5);
神偷线:=(((DMP ) * 100) / TRJ);
辅助线:=((DMM * 100) / TRJ);
动向趋势线:=(MA(((ABS((辅助线 - 神偷线)) / (辅助线 + 神偷线)) * 100),3));
ADXR:=((动向趋势线 + REF(动向趋势线,3)) / 2);
VAR3:=MA(CLOSE,2);
VAR7:=REF(VAR3,1);
【强弱】:=((SMA(MAX((VAR3 - VAR7),0),5,1) / SMA(ABS((VAR3 - VAR7)),5,1)) * 100);
快买:( IF(((动向趋势线 > 88) AND (神偷线 < 5.8)),68,0)),LINETHICK1,COLORFF00FF;
( IF(((动向趋势线 > 88) AND (神偷线 < 5.8)),48,0)),LINETHICK1,COLORFF00FF;
DRAWTEXT(快买,60,'准备'),COLORFF00FF;
MA2:=EMA(C,2);MA5:=EMA(C,5);MA13:=EMA(C,13);MA30:=EMA(C,30);MA55:=EMA(C,55);YCX:=MA5>=REF(MA5,1);H1:=MAX(MAX(MA5,MA13),MA30);L1:=MIN(MIN(MA5,MA13),MA30);一阳穿三线:= H1
解答:
?AA05:=MA(C,5);
五日乖离率:=(C-AA05)/AA05*100;
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!