您现在的位置:程序化交易>> 期货公式>> 金字塔等>> 金字塔知识>>正文内容

求老师把指标信号改成自动化反手交易 [金字塔]

  • 咨询内容:

    指标源码如下:

    NN:=DATE<>REF(DATE,1);
    BARNUMBER1:=BARSLAST(NN)+1;
    BARNUMBER2:=50;
    MAH1:=WMA(H,BARNUMBER1),LINETHICK2,COLORGREEN;
    MAL1:=WMA(L,BARNUMBER1),LINETHICK2,COLORRED;
    MAH2:WMA(H,BARNUMBER2),LINETHICK2,COLORMAGENTA;
    MAL2:WMA(L,BARNUMBER2),LINETHICK2,COLORMAGENTA;


    IF(MAH2>=REF(MAH2,1),MAH2,DRAWNULL),COLORMAGENTA,LINETHICK2;
    IF(MAL2>=REF(MAL2,1),MAL2,DRAWNULL),COLORMAGENTA,LINETHICK2;
    IF(MAH2<REF(MAH2,1),MAH2,DRAWNULL),COLORCYAN,LINETHICK2;
    IF(MAL2<REF(MAL2,1),MAL2,DRAWNULL),COLORCYAN,LINETHICK2;

    DRAWTEXT(MAH2>=REF(MAH2,1) AND MAL2>=REF(MAL2,1) AND (REF(MAH2,1)<=REF(MAH2,2) OR REF(MAL2,1)<=REF(MAL2,2)),L*0.999,'短多B'),COLORRED;

    DRAWTEXT(MAH2<=REF(MAH2,1) AND MAL2<=REF(MAL2,1) AND (REF(MAH2,1)>=REF(MAH2,2) OR REF(MAL2,1)>=REF(MAL2,2)),H*1.001,'短空S'),COLORGREEN;

     

  • 金字塔客服:

    NN:=DATE<>REF(DATE,1);
    BARNUMBER1:=BARSLAST(NN)+1;
    BARNUMBER2:=50;
    MAH1:=WMA(H,BARNUMBER1),LINETHICK2,COLORGREEN;
    MAL1:=WMA(L,BARNUMBER1),LINETHICK2,COLORRED;
    MAH2:WMA(H,BARNUMBER2),LINETHICK2,COLORMAGENTA;
    MAL2:WMA(L,BARNUMBER2),LINETHICK2,COLORMAGENTA;


    IF(MAH2>=REF(MAH2,1),MAH2,DRAWNULL),COLORMAGENTA,LINETHICK2;
    IF(MAL2>=REF(MAL2,1),MAL2,DRAWNULL),COLORMAGENTA,LINETHICK2;
    IF(MAH2<REF(MAH2,1),MAH2,DRAWNULL),COLORCYAN,LINETHICK2;
    IF(MAL2<REF(MAL2,1),MAL2,DRAWNULL),COLORCYAN,LINETHICK2;

    DRAWTEXT(MAH2>=REF(MAH2,1) AND MAL2>=REF(MAL2,1) AND (REF(MAH2,1)<=REF(MAH2,2) OR REF(MAL2,1)<=REF(MAL2,2)),L*0.999,'短多B'),COLORRED;

    DRAWTEXT(MAH2<=REF(MAH2,1) AND MAL2<=REF(MAL2,1) AND (REF(MAH2,1)>=REF(MAH2,2) OR REF(MAL2,1)>=REF(MAL2,2)),H*1.001,'短空S'),COLORGREEN;

    if MAH2>=REF(MAH2,1) AND MAL2>=REF(MAL2,1) AND (REF(MAH2,1)<=REF(MAH2,2) OR REF(MAL2,1)<=REF(MAL2,2)) then begin
     sellshort(1,0,market);
     buy(holding=0,1,market);
    end

    if MAH2<=REF(MAH2,1) AND MAL2<=REF(MAL2,1) AND (REF(MAH2,1)>=REF(MAH2,2) OR REF(MAL2,1)>=REF(MAL2,2)) then begin
     sell(1,0,market);
     buyshort(holding=0,1,market);
    end

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 511411198  点击这里给我发消息进行 有偿 编写!不贵!点击查看价格!


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

相关文章

    没有相关内容