编写要求:
解答:
?网友求助:
请老师将下列5组UOS指标分别改为底背离和顶背离选股公式,谢谢。
终极指标1
TH1:=MAX(HIGH,REF(CLOSE,1));
TL1:=MIN(LOW,REF(CLOSE,1));
ACC11:=SUM(CLOSE-TL1,4)/SUM(TH1-TL1,4);
ACC12:=SUM(CLOSE-TL1,8)/SUM(TH1-TL1,8);
ACC13:=SUM(CLOSE-TL1,16)/SUM(TH1-TL1,16);
UOS1:(ACC11*8*16+ACC12*4*16+ACC13*4*8)*100/(4*8+4*16+8*16),
COLOR0000FF,LINETHICK2;
STICKLINE(CLOSE>0,35,35,10,0),COLOR00FF00;
STICKLINE(CLOSE>0,65,65,10,0),COLORFF00FF;
STICKLINE(CLOSE>0,70,70,10,0),COLORRED;
STICKLINE(CLOSE>0,50,50,10,0),COLORYELLOW;
A1:=LLV(LOW,180)=LOW AND NOT(LLV(UOS1,180)=UOS1) AND REF(UOS1<=35,1);
UOS底背离:IF(CROSS(0.05,A1),50,35),COLORGREEN;
B1:=HHV(HIGH,180)=HIGH AND NOT(HHV(UOS1,180)=UOS1)
AND REF(UOS1,1)>70;
UOS顶背离:IF(CROSS(0.05,B1),50,70);
终极指标2
TH2:=MAX(HIGH,REF(CLOSE,2));
TL2:=MIN(LOW,REF(CLOSE,2));
ACC21:=SUM(CLOSE-TL2,8)/SUM(TH2-TL2,8);
ACC22:=SUM(CLOSE-TL2,16)/SUM(TH2-TL2,16);
ACC23:=SUM(CLOSE-TL2,32)/SUM(TH2-TL2,32);
UOS2:(ACC21*16*32+ACC22*8*32+ACC23*8*16)*100/(8*16+8*32+16*32),
COLOR00FFFF,LINETHICK2;
STICKLINE(CLOSE>0,35,35,10,0),COLOR00FF00;
STICKLINE(CLOSE>0,65,65,10,0),COLORFF00FF;
STICKLINE(CLOSE>0,70,70,10,0),COLORRED;
STICKLINE(CLOSE>0,50,50,10,0),COLORYELLOW;
A2:=LLV(LOW,180)=LOW AND NOT(LLV(UOS2,180)=UOS2) AND REF(UOS2<35,1);
UOS底背离:IF(CROSS(0.05,A2),50,35),COLORGREEN;
B2:=HHV(HIGH,180)=HIGH AND NOT(HHV(UOS2,180)=UOS2)
AND REF(UOS2,1)>70;
UOS顶背离:IF(CROSS(0.05,B2),50,70);
终极指标3
TH3:=MAX(HIGH,REF(CLOSE,3));
TL3:=MIN(LOW,REF(CLOSE,3));
ACC31:=SUM(CLOSE-TL3,12)/SUM(TH3-TL3,12);
ACC32:=SUM(CLOSE-TL3,24)/SUM(TH3-TL3,24);
ACC33:=SUM(CLOSE-TL3,48)/SUM(TH3-TL3,48);
UOS3:(ACC31*24*48+ACC32*12*48+ACC33*12*24)*100/(12*24+12*48+24*48)
,COLORFFFF00,LINETHICK2;
STICKLINE(CLOSE>0,35,35,10,0),COLOR00FF00;
STICKLINE(CLOSE>0,65,65,10,0),COLORFF00FF;
STICKLINE(CLOSE>0,70,70,10,0),COLORRED;
STICKLINE(CLOSE>0,50,50,10,0),COLORYELLOW;
A3:=LLV(LOW,180)=LOW AND NOT(LLV(UOS3,180)=UOS3) AND REF(UOS3<35,1);
UOS底背离:IF(CROSS(0.05,A3),50,35),COLORGREEN;
B3:=HHV(HIGH,180)=HIGH AND NOT(HHV(UOS3,180)=UOS3)
AND REF(UOS3,1)>70;
UOS顶背离:IF(CROSS(0.05,B3),50,70);
终极指标4
TH4:=MAX(HIGH,REF(CLOSE,4));
TL4:=MIN(LOW,REF(CLOSE,4));
ACC41:=SUM(CLOSE-TL4,16)/SUM(TH4-TL4,16);
ACC42:=SUM(CLOSE-TL4,32)/SUM(TH4-TL4,32);
ACC43:=SUM(CLOSE-TL4,64)/SUM(TH4-TL4,64);
UOS4:(ACC41*32*64+ACC42*16*64+ACC43*16*32)*100/(16*32+16*64+32*64),
COLOR00FF00,LINETHICK2;
STICKLINE(CLOSE>0,35,35,10,0),COLOR00FF00;
STICKLINE(CLOSE>0,65,65,10,0),COLORFF00FF;
STICKLINE(CLOSE>0,70,70,10,0),COLORRED;
STICKLINE(CLOSE>0,50,50,10,0),COLORYELLOW;
A4:=LLV(LOW,180)=LOW AND NOT(LLV(UOS4,180)=UOS4) AND REF(UOS4<35,1);
UOS底背离:IF(CROSS(0.05,A4),50,35),COLORGREEN;
B4:=HHV(HIGH,180)=HIGH AND NOT(HHV(UOS4,180)=UOS4)
AND REF(UOS4,1)>70;
UOS顶背离:IF(CROSS(0.05,B4),50,70);
终极指标5
TH5:=MAX(HIGH,REF(CLOSE,5));
TL5:=MIN(LOW,REF(CLOSE,5));
ACC51:=SUM(CLOSE-TL5,20)/SUM(TH5-TL5,20);
ACC52:=SUM(CLOSE-TL5,40)/SUM(TH5-TL5,40);
ACC53:=SUM(CLOSE-TL5,80)/SUM(TH5-TL5,80);
UOS5:(ACC51*40*80+ACC52*20*80+ACC53*20*40)*100/(20*40+20*80+40*80)
,COLORFFFFFF,LINETHICK2;
STICKLINE(CLOSE>0,35,35,10,0),COLOR00FF00;
STICKLINE(CLOSE>0,65,65,10,0),COLORFF00FF;
STICKLINE(CLOSE>0,70,70,10,0),COLORRED;
STICKLINE(CLOSE>0,50,50,10,0),COLORYELLOW;
A5:=LLV(LOW,180)=LOW AND NOT(LLV(UOS5,180)=UOS5) AND REF(UOS5<35,1);
UOS底背离:IF(CROSS(0.05,A5),50,35),COLORGREEN;
B5:=HHV(HIGH,180)=HIGH AND NOT(HHV(UOS5,180)=UOS5)
AND REF(UOS5,1)>70;
UOS顶背离:IF(CROSS(0.05,B5),50,70);
?
Copyright 2018- www.dyjian.com/ 大宇股票知识网 海口美兰韩哲棚百货商行 版权所有 琼ICP备2023001966号
免责声名:本站所发表的内容仅用于学术交流和学习,内容所带来的一切后果均与本站无关。若您发现本站存在您非授权的原创作品,请第一时间联系本站删除!