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

指标请写成模型 [金字塔]

  • 咨询内容: 老师.如下指标请写成模型.多子开多平空.空字开空平多.用收盘价下单.谢!

    DIFF:EMA(CLOSE,28)-EMA(CLOSE,199);DEA:EMA(DIFF,9);STICKLINE(DIFF<=DEA,DIFF,DEA,COLORGREEN,0);STICKLINE(DIFF>DEA,DIFF,DEA,COLORRED,0);DRAWTEXT(CROSS(DIFF,DEA),DIFF,'多');DRAWTEXT(CROSS(DEA,DIFF),DEA,'空');

     

  • 金字塔客服:

    建立一个交易公式,然后把下列代码复制进去

     

    diff:ema(close,28)-ema(close,199);
    dea:ema(diff,9);
    stickline(diff<=dea,diff,dea,colorgreen,0);
    stickline(diff>dea,diff,dea,colorred,0);
    drawtext(cross(diff,dea),close,'多');
    drawtext(cross(dea,diff),close,'空');
    if cross(diff,dea) then begin
     sellshort(1,0,limitr,close);
     buy(holding=0,1,limitr,close);
    end

    if cross(dea,diff) then begin
     sell(1,0,limitr,close);
     buyshort(holding=0,1,limitr,close);
    end

     

  • 用户回复: 一楼模型请增加提前平仓功能.用固定轮交易.买入要求用走完K线下单.平仓出信号即平.

     

  • 网友回复:

    diff:ema(close,28)-ema(close,199);
    dea:ema(diff,9);
    stickline(diff<=dea,diff,dea,colorgreen,0);
    stickline(diff>dea,diff,dea,colorred,0);
    drawtext(cross(diff,dea),close,'多');
    drawtext(cross(dea,diff),close,'空');
    sellshort(cross(diff,dea),0,limitr,close);
    buy(ref(cross(diff,dea),1) and holding=0,1,limitr,close);

    sell(cross(dea,diff),0,limitr,close);
    buyshort(ref(cross(dea,diff),1) and holding=0,1,limitr,close);

 

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

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


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

相关文章

    没有相关内容