您现在的位置:程序化交易>> 期货公式>> 交易开拓者(TB)>> 开拓者知识>>正文内容

重复发信号并成交,怎么改? [开拓者 TB]

  • 咨询内容: bBuyCon = avgRateOfHTL[1] > AmplitudeSet And fastMA[1] > slowMA[1] And Close > fastMA[1] And highChannel[1]/lowChannel[1] < 1+0.001*XZ And MarketPosition != 1;

    bSellCon = avgRateOfHTL[1] < avgRateOfHTL  And fastMA[1] < slowMA[1] And Close < fastMA[1] And highChannel[1]/lowChannel[1] < 1+0.001*XZ And MarketPosition != -1;
    If(bBuyCon == true)
    {
    PlotString("bBuy","bBuy",Low,Red);
    Buy(lots,Open+Offset*MinPoint);

    } If(BKFLG == 0) { A_SendOrder(Enum_Buy,Enum_Entry,lots,Price("New"));
    }Return;
    If(bSellCon == ture)
    {
    Sell(lots,Open-Offset*MinPoint);
    } If(SKFLG == 0) { A_SendOrder(Enum_Sell,Enum_Entry,lots,Price("New"));
    }Return;
    Commentary("bBuyCon = "+IIFString(bBuyCon,"True","false"));
    Commentary("bSellCon = "+IIFString(bSellCon,"True","false"));
    Commentary("(avgRateOfHTL) "+Text(avgRateOfHTL));
    If(MarketPosition == 1 And Low <= AvgEntryPrice - stopPoint){SellShort(0,Min(Open,AvgEntryPrice - stopPoint)-Offset*MinPoint);

    } If(SPKFLG == 0) { A_SendOrder(Enum_Sell,Enum_Entry,lots,Price("New"));
    }Return;
    If(MarketPosition == -1 And High >= AvgEntryPrice + stopPoint){BuyToCover(0,Max(Open,AvgEntryPrice + stopPoint)+Offset*MinPoint);

    } If(BPKFLG == 0) { A_SendOrder(Enum_Buy,Enum_Entry,lots,Price("New"));
    }Return;

     

     来源:CXH99.COM

  • TB技术人员: If(bBuyCon == true and MarketPosition <> 1)
    ...
    If(bSellCon == ture and MarketPosition  <> -1)
    ...
    SellShort()需要和Sell()换位置。
    还有,可以删掉return语句吧。

 

有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流或微信号:cxh99cxh99  进行 有偿收费 编写!

怎么收费,代编流程等详情请点击阅读!

(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)


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

相关文章

    没有相关内容