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

固定止赢问题 [金字塔]

  • 咨询内容: 版主,我想写个固定止赢,为啥怎么改参数都不好使呢,根本不起作用,求解~~附代码//固定止赢止赢平多:sell(close-enterprice>=20*mindiff and holding>0 and enterbars>2,100%,market);止赢平空:sellshort(enterprice-close>=20*mindiff and holding<0 and enterbars>2,100%,market);

     

  • 金字塔客服: 举个实际的例子说明一下,哪里是你认为能够止损的但是没有止损

     

  • 用户回复: 止盈只执行一次,怎么改动?如果满足条件有很多次,我只想执行一次,如何改动上面的代码

     

  • 网友回复: VARIABLE:n:=0,m:=0;
    //止盈平多
    if close-enterprice>=20*mindiff and n=0 and enterbars>2 then
    begin
    sell(holding>0,100%,market);
    n:=1;
    end
    //止盈平空
    if enterprice-close>=20*mindiff and m=0 and enterbars>2 then
    begin
    sellshort(holding<0,100%,market);
    m:=1;
    end

 

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

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


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

相关文章

    没有相关内容