下载长风数据后DDE还是为0
2019/12/14 19:13:51
公式编写说明:
请哪位帮我改一下LXDDX指标.没正版数据.下载长风数据后当天总是为0input:p1(60),p2(5),p3(10);TODAY:= "ddx.ddx"=0; {判断是否当天}P:=MIN(COUNT(ORDER(2),0),P1);P:=IF(P=0 and TODAY,1,P);OK:="DDEDATA@CHECK">=1;{判断数据是否完整}IF OK THENDDX:=IF(TODAY,"DDEDATA@BIGORDER"(1)-"DDEDATA@BIGORDER"(2),BIGORDER(1)-BIGORDER(2))*vol/capital*100;ELSEDDX:=IF(TODAY,"DDEDATA@DDEDATA"(0),(BIGORDER(1)-BIGORDER(2))*vol/capital*100);DDX:DDX,COLOR3D;DDX1:EMA(DDX,p)*p,color00ffff,LINETHICK1;DDX2:MA(DDX1,p2),colorff00ff,LINETHICK1;DDX3:MA(DDX1,p3),color00ff00,LINETHICK1;1,dotline,colorblue;drawtextabs(0,0,'大单动向');
公式源码回答:
{DDX}
INPUT: P1(60,0,100),P2(5,0,100),P3(10,0,100);
VARIABLE:DDX=0;
REFLINE:0;
VAR0:=MIN(COUNT(ORDER(2),0),P1);
DDX:(BIGORDER(1) - BIGORDER(2)) * VOL/CAPITAL * 100,COLOR3D;
DDX1:EMA((BIGORDER(1) - BIGORDER(2)) * VOL/CAPITAL * 100,VAR0) * VAR0;
DDX2:MA(DDX1,P2);
DDX3:MA(DDX1,P3);
DRAWTEXTABS(0,0,'大单动向');
1,DOTLINE;
投 股票网 www .tou18.cn
股市公式下载推荐