9qihuo.com
我们只提供有用的干货

[求助]小时周期取周线的数据 (文华财经WH6赢顺V6.7)

投资者咨询:[求助]小时周期取周线的数据 (文华财经WH6赢顺V6.7)
来源:文华财经  日期:2019/8/25 1:36
麻烦老师帮忙看下,我下面这3种写法是否正确?
 从小时周期取周线的均线数据,这样写是否合理?
NW:=BARSLAST(WEEKDAY<REF(WEEKDAY,1))+1;
CCW:=IF(NW=1,REF(C,1),0);
T5W:=SUM(CCW,SUMBARS(NW=1,5-1))+C;
T10W:=SUM(CCW,SUMBARS(NW=1,10-1))+C;
T20W:=SUM(CCW,SUMBARS(NW=1,20-1))+C;
T40W:=SUM(CCW,SUMBARS(NW=1,40-1))+C;
T60W:=SUM(CCW,SUMBARS(NW=1,60-1))+C;
T120W:=SUM(CCW,SUMBARS(NW=1,120-1))+C;
WMA1:=T5W/5;//求平均
WMA2:=T10W/10;
WMA3:=T20W/20;
WMA4:=T40W/40;
WMA5:=T60W/60;
WMA6:=T120W/120;

 从日线取月线的均线数据,这样写是否合理?
NM:=BARSLAST(MONTH<>REF(MONTH,1))+1;
CCM:=IF(NM=1,REF(C,1),0);
T5M:=SUM(CCM,SUMBARS(NM=1,5-1))+C;
T10M:=SUM(CCM,SUMBARS(NM=1,10-1))+C;
T20M:=SUM(CCM,SUMBARS(NM=1,20-1))+C;
T40M:=SUM(CCM,SUMBARS(NM=1,40-1))+C;
T60M:=SUM(CCM,SUMBARS(NM=1,60-1))+C;
T120M:=SUM(CCM,SUMBARS(NM=1,120-1))+C;
MMA1:=T5M/5;//求平均
MMA2:=T10M/10;
MMA3:=T20M/20;
MMA4:=T40M/40;
MMA5:=T60M/60;
MMA6:=T120M/120;

从周线取季线的均线数据,这样写是否合理?
NQ:=BARSLAST(QUARTER<>REF(QUARTER,1))+1;
CCQ:=IF(NQ=1,REF(C,1),0);//
T5Q:=SUM(CCQ,SUMBARS(NQ=1,5-1))+C;//
T10Q:=SUM(CCQ,SUMBARS(NQ=1,10-1))+C;
T20Q:=SUM(CCQ,SUMBARS(NQ=1,20-1))+C;
T40Q:=SUM(CCQ,SUMBARS(NQ=1,40-1))+C;
T60Q:=SUM(CCQ,SUMBARS(NQ=1,60-1))+C;
T120Q:=SUM(CCQ,SUMBARS(NQ=1,120-1))+C;
QMA1:=T5Q/5;//求平均
QMA2:=T10Q/10;
QMA3:=T20Q/20;
QMA4:=T40Q/40;
QMA5:=T60Q/60;
QMA6:=T120Q/120;



技术人员回复
日期:2019/8/25 9:59
 我们分析下,12点前回复