您现在的位置:程序化交易>> 股票公式>> 通达信>> 通达信知识>>正文内容

请老师帮忙取个数值 [通达信]

  • 咨询内容: N1:=20;N2:=10;N3:=5;
    MA8:MA(C,8);
    AA:=REF(H,N1)=HHV(H,2*N1+1);
    QY:=BACKSET(AA,N1+1);
    CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);
    DDD:=BARSLAST(CC);
    GDTS:=IF(CC,CURRBARSCOUNT,0);
    DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
    DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
    DINGBU1:=REF(DINGBU,DDD+1);
    GDCS1:=CONST(DINGBUTS);
    DINGBUTS1:=REF(DINGBUTS,DDD+1);
    GDCS2:=CONST(DINGBUTS1);
    DINGBU2:=REF(DINGBU1,DDD+1);
    MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
    DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR00FF00,POINTDOT,LINETHICK4;
    DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLOR00FF00,POINTDOT,LINETHICK4;
    请问老师我如何提取这2根线的数值出来,谢谢

     

  • 通达信客服: N1:=20;N2:=10;N3:=5;
    MA8:MA(C,8);
    AA:=REF(H,N1)=HHV(H,2*N1+1);
    QY:=BACKSET(AA,N1+1);
    CC:=FILTER(QY,N1) AND H=HHV(H,N1+1);
    DDD:=BARSLAST(CC);
    GDTS:=IF(CC,CURRBARSCOUNT,0);
    DINGBU:=IF(DDD,REF(H,DDD),H);{顶部}
    DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);
    DINGBU1:=REF(DINGBU,DDD+1);
    GDCS1:=CONST(DINGBUTS);
    DINGBUTS1:=REF(DINGBUTS,DDD+1);
    GDCS2:=CONST(DINGBUTS1);
    DINGBU2:=REF(DINGBU1,DDD+1);
    MM:=IF(CURRBARSCOUNT>GDCS2,0,1);
    A:DRAWLINE(CURRBARSCOUNT=GDCS2,H,ISLASTBAR,REF(H,GDCS2-1),1),COLOR00FF00,POINTDOT,LINETHICK4;
    B:DRAWLINE(CURRBARSCOUNT=GDCS1,H,ISLASTBAR,REF(H,GDCS1-1),1),COLOR00FF00,POINTDOT,LINETHICK4;

     

  • 通达信技术部: 谢谢,我用下看看

     

  • 网友回复: 老师,我在设置条件选股里面测试公式出现这种错误,麻烦解决一下:



    错误句 :
    A:=DRAWLINE(CURRBARSCOUNT=GDCS1,AA01,ISLASTBAR,REF(AA01,GDCS1-1),1),COLORFF0000,POINTDOT,LINETHICK4
    详细信息 : 不是指标画线公式,不能指定画线类型!
    错误起始位置 : 426 ; 长度: 2

     

  • 网友回复: 测试通过!

【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容