人人爽天天爽夜夜爽qc-人人爽天天爽夜夜爽曰-人人天天爱天天做天天摸-人人天天夜夜-色网站在线-色网站在线看

您現(xiàn)在的位置:程序化交易>> 期貨公式>> 交易開拓者(TB)>> 開拓者知識(shí)>>正文內(nèi)容

幫忙看下這有一段撤單指令的編寫問題 [開拓者 TB]

  • 咨詢內(nèi)容: 本帖最后由 fushengchenken 于 2016-1-29 16:02 編輯

    這段程序代碼是在1分鐘的K線上運(yùn)行的平倉(cāng)指令,請(qǐng)幫我看下這段撤單和從新平倉(cāng)的指令的問題

    If(A_TotalPosition>0 And A_GetOpenOrderCount!=0)
    {
      A_DeleteOrder();
      MyExitDelete=MyExitDelete+1;
      SetGlobalVar(14,MyExitDelete);
      If(MyExitDelete>0)
      {
      A_SendOrder(Enum_Sell,Enum_Exit,A_BuyPosition(),Close-ExitSlippage*MinMove*PriceScale);
      MyBuyExit=MyBuyExit+1;
      SetGlobalVar(8,MyBuyExit);
      MyExitTime=Time;
      SetGlobalVar(11,MyExitTime);
      }
      If(A_GetLastOpenOrderIndex(Enum_Sell,Enum_Exit)==InvalidInteger)
      {
      MyEntryTime=0;
      SetGlobalVar(10,MyEntryTime);
      }
    }

    我想實(shí)現(xiàn)的目標(biāo)是:
    1.一但有多單持倉(cāng)并且有未成交的多單就立刻撤單,并將 MyExitDelete+1做為全局變量做一個(gè)記錄。
    2.如果一但有過一次撤單以后立刻再次平倉(cāng)多單,并且用A_GetLastOpenOrderIndex(Enum_Buy,Enum_Exit)==InvalidInteger指令來判斷平倉(cāng)指令是否成功。一旦確認(rèn)平倉(cāng)成功了,再將MyEntryTime清0.
    3.我要讓這個(gè)指令重復(fù)運(yùn)行,以達(dá)到不斷的平倉(cāng)撤單,再平倉(cāng)再撤單直到平倉(cāng)成功,這樣一個(gè)效果。

    目前遇到一些始終解決不掉,又找不到問題的原因的地方,希望TB的技術(shù)人員幫忙看看:
    問題1:我咨詢過你們TB的服務(wù)人員,他們告訴我TB的運(yùn)行機(jī)制是會(huì)在一分鐘的K線的最后一個(gè)TICK合并下一個(gè)1分鐘的K線合并計(jì)算?我不知道這個(gè)敘述清楚沒有。這里面有個(gè)問題我下面截取一張圖表來咨詢。遇到的問題是為什么在賬戶都完全沒有持倉(cāng)的情況下,程序總會(huì)在每個(gè)1分鐘的最后一個(gè)TICK上面撤單一次?(見下圖1紅色加粗?jǐn)?shù)據(jù))

    問題2:
    QQ截圖20160129143856.png (6.58 KB, 下載次數(shù): 0) 2016-1-29 14:38:41 上傳

     

  • TB技術(shù)人員: 圖1見紅色加粗部分
    Time=0.1124 MyTimeSecondValue=58 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1124 MyTimeSecondValue=58 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1124 MyTimeSecondValue=0 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=1 MySellExit=0 MyExitTime=0.1124 MyExitDelete=1 Date=2016-01-29

     

  • TB客服:
    圖1見紅色加粗部分
    Time=0.1125 MyTimeSecondValue=57 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1125 MyTimeSecondValue=57 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1125 MyTimeSecondValue=58 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1125 MyTimeSecondValue=58 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1125 MyTimeSecondValue=59 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1125 MyTimeSecondValue=59 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=1 MySellExit=0 MyExitTime=0.1125 MyExitDelete=1 Date=2016-01-29

     

  • 網(wǎng)友回復(fù): 圖1見紅色加粗部分
    Time=0.1126 MyTimeSecondValue=53 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1126 MyTimeSecondValue=54 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1126 MyTimeSecondValue=55 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1126 MyTimeSecondValue=56 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1126 MyTimeSecondValue=58 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1126 MyTimeSecondValue=59 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=1 MySellExit=0 MyExitTime=0.1126 MyExitDelete=1 Date=2016-01-29

     

  • 網(wǎng)友回復(fù): 本帖最后由 fushengchenken 于 2016-2-1 11:05 編輯

    圖2見紅色加粗部分
    Time=0.1333 MyTimeSecondValue=31 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=31 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=31 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=32 MyBuyEntry=0 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=32 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0.1333 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=33 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0.1333 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=33 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0.1333 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=34 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0.1333 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=35 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0.1333 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=35 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0.1333 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=36 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0.1333 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=36 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0.1333 MyEntryDelete=0 MyBuyExit=0 MySellExit=0 MyExitTime=0 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=37 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=1 MySellExit=0 MyExitTime=0.1333 MyExitDelete=0 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=38 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29

    Time=0.1333 MyTimeSecondValue=39 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=39 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=40 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=41 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=41 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=44 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=46 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=46 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=47 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=48 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29
    Time=0.1333 MyTimeSecondValue=49 MyBuyEntry=1 MySellEntry=0 MyEntryTime=0 MyEntryDelete=0 MyBuyExit=2 MySellExit=0 MyExitTime=0.1333 MyExitDelete=1 Date=2016-01-29

 

有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友

可聯(lián)系技術(shù)人員 QQ: 511411198  點(diǎn)擊這里給我發(fā)消息進(jìn)行 有償 編寫!不貴!點(diǎn)擊查看價(jià)格!


【字體: 】【打印文章】【查看評(píng)論

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 清风阁我爱干视频网 | 久久精品视频一区二区三区 | 一级在线免费观看 | 羞羞官网 | 国产三级日本三级在线播放 | 日本3级网站 | 久久久噜噜噜久久久 | 男人日批视频 | 羞羞的网址 | 91资源在线视频 | 黄色中文字幕在线观看 | 久草香蕉视频在线观看 | 国产一区二区视频免费 | 日韩欧美一区二区三区不卡 | 国产一级毛片午夜福 | 国产色综合久久无码有码 | 另类异族videosex太狠了 | 成人免费视屏 | 啪啪网址大全 | 国产亚洲精品日韩香蕉网 | 日日碰日日摸日日澡视频播放 | 99视频在线看 | 亚洲成a人片在线观看播放 亚洲成精品动漫久久精久 亚洲大尺度 | 亚洲国产91 | 黄视频网站入口 | 国产日韩欧美91 | 日本视频一区二区三区 | 一级黄色大全 | 看日本黄色录像 | 精品福利影院 | 在线播放成人高清免费视频 | 成年免费大片黄在看 | 色视频免费在线观看 | 免费午夜剧场 | 国产欧美国产精品第二区 | 色偷偷88欧美精品久久久 | 新版天堂中文资源官网 | 国产免费91视频 | 男女羞羞免费视频 | 成人看片黄a在线观看 | 国产一级一片免费播放刺激 |