请老师帮忙改成选股公式

[通达信]
设置
1910 2 感谢好人 Lv.3 发表于 · 2020-11-25 00:56 举报 显示全部楼层 复制 正序浏览 |
跳转到指定楼层
A1:=HIGH;
B1:=LOW;
C1:=CLOSE;
A2:=REF(HIGH,1);
A5:=REF(HIGH,2);
A6:=REF(HIGH,3);
B2:=REF(LOW,1);
B5:=REF(LOW,2);
B6:=REF(LOW,3);
C7:=REF(CLOSE,1);
C8:=REF(CLOSE,5);
NUM1:=IF(A2<C7 AND A2<C8 AND A1<B5 AND A1<B6,0,1);
NUM2:=IF(B2>C7 AND B2>C8 AND B1>A5 AND B1>A6,0,1);
DIF1:=A1-A2;
DIF2:=B1-B2;
REII:=(DIF1+DIF2)*NUM1*NUM2;
REIA:=SQRT(DIF1*DIF1)+SQRT(DIF2*DIF2);
REI:SUM(REII,0)/SUM(REIA,0)*100,COLORWHITE,LINETHICK2,NODRAW;

STICKLINE(C>0,REI,REF(REI,1),-1,0),COLORGRAY;
STICKLINE(REI>REF(REI,1) AND REI>MA(REI,5),REI,REF(REI,1),-1,0),COLORRED;
STICKLINE(REI<REF(REI,1) AND REI<MA(REI,5),REI,REF(REI,1),-1,0),COLORGREEN;
MA(REI,5),COLORGRAY;

请老师帮忙改成3个选股公式 如下图(麻烦老师了,有点不好意思):
1.昨天是灰色柱子,今天是红色柱子的选股。
2.昨天是红柱,今天也是红柱但是今天的红柱小于昨天的红柱。
3.昨天是灰色柱子,今天也是灰色柱子的选股。

附件

1

1

2

2

3

3

举报

扔鸡蛋(0) 回复

感谢好人
Lv.3
发表于 2020-11-25 09:45 复制 查看全部楼层
休闲者68 发表于 2020-11-25 08:43
{1.昨天是灰色柱子,今天是红色柱子的选股。}
A1:=HIGH;
B1:=LOW;

感谢休闲者68老师,辛苦了 谢谢您!

举报

点亮(0) 扔鸡蛋(0) 回复

休闲者68
Lv.6
发表于 2020-11-25 08:43 复制 查看全部楼层
{1.昨天是灰色柱子,今天是红色柱子的选股。}
A1:=HIGH;
B1:=LOW;
A2:=REF(HIGH,1);
A5:=REF(HIGH,2);
A6:=REF(HIGH,3);
B2:=REF(LOW,1);
B5:=REF(LOW,2);
B6:=REF(LOW,3);
C7:=REF(CLOSE,1);
C8:=REF(CLOSE,5);
NUM1:=IF(A2<C7 AND A2<C8 AND A1<B5 AND A1<B6,0,1);
NUM2:=IF(B2>C7 AND B2>C8 AND B1>A5 AND B1>A6,0,1);
DIF1:=A1-A2;
DIF2:=B1-B2;
REII:=(DIF1+DIF2)*NUM1*NUM2;
REIA:=SQRT(DIF1*DIF1)+SQRT(DIF2*DIF2);
REI:=SUM(REII,0)/SUM(REIA,0)*100;
红色:=REI>REF(REI,1) AND REI>MA(REI,5);
绿色:=REI<REF(REI,1) AND REI<MA(REI,5);
灰色:=C>0;
XG1:REF(灰色 AND NOT(红色) AND NOT(绿色),1) AND 红色;



{2.昨天是红柱,今天也是红柱但是今天的红柱小于昨天的红柱。}
A1:=HIGH;
B1:=LOW;
A2:=REF(HIGH,1);
A5:=REF(HIGH,2);
A6:=REF(HIGH,3);
B2:=REF(LOW,1);
B5:=REF(LOW,2);
B6:=REF(LOW,3);
C7:=REF(CLOSE,1);
C8:=REF(CLOSE,5);
NUM1:=IF(A2<C7 AND A2<C8 AND A1<B5 AND A1<B6,0,1);
NUM2:=IF(B2>C7 AND B2>C8 AND B1>A5 AND B1>A6,0,1);
DIF1:=A1-A2;
DIF2:=B1-B2;
REII:=(DIF1+DIF2)*NUM1*NUM2;
REIA:=SQRT(DIF1*DIF1)+SQRT(DIF2*DIF2);
REI:=SUM(REII,0)/SUM(REIA,0)*100;
红色:=REI>REF(REI,1) AND REI>MA(REI,5);
XG2:EVERY(红色,2) AND C<REF(C,1);



{3.昨天是灰色柱子,今天也是灰色柱子的选股。}
A1:=HIGH;
B1:=LOW;
A2:=REF(HIGH,1);
A5:=REF(HIGH,2);
A6:=REF(HIGH,3);
B2:=REF(LOW,1);
B5:=REF(LOW,2);
B6:=REF(LOW,3);
C7:=REF(CLOSE,1);
C8:=REF(CLOSE,5);
NUM1:=IF(A2<C7 AND A2<C8 AND A1<B5 AND A1<B6,0,1);
NUM2:=IF(B2>C7 AND B2>C8 AND B1>A5 AND B1>A6,0,1);
DIF1:=A1-A2;
DIF2:=B1-B2;
REII:=(DIF1+DIF2)*NUM1*NUM2;
REIA:=SQRT(DIF1*DIF1)+SQRT(DIF2*DIF2);
REI:=SUM(REII,0)/SUM(REIA,0)*100;
红色:=REI>REF(REI,1) AND REI>MA(REI,5);
绿色:=REI<REF(REI,1) AND REI<MA(REI,5);
灰色:=C>0;
XG3:EVERY(灰色 AND NOT(红色) AND NOT(绿色),2);
查看全部打赏
  • 福阿德+8理想币 +7共享币 : 理想精神:分享,互助,友善,传递正能量!

举报

点亮(0) 扔鸡蛋(0) 回复

您需要登录后才可以回帖 登录

本版积分规则 《理想财富服务协议》《免责声明》

论坛问题
微信扫一扫,添加好友咨询
驿站问题
微信扫一扫,添加好友咨询
广告投放
微信扫一扫,添加好友咨询
回顶部 到页底
快速回复 返回顶部 返回列表