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

后臺(tái)程序編寫,幫看看那里有問題。 [金字塔]

  • 咨詢內(nèi)容: 根據(jù)阿火:后臺(tái)下單模板;編寫的模型。if holding=0 then buy(val1>0,100,LIMIT,O,0);buyshort(val1>0,100,LIMIT,O,0);ee:=enterprice; //多頭平倉(cāng) IF (h-ee)>3 and (h-ee)<50 THEN SELL(1,10,LIMIT,ee+3,0),ORDERQUEUE;  SELL(1,10,LIMIT,EXITPRICE+3,0),ORDERQUEUE;IF (ee-l)>1 and (ee-l)<50 THEN SELL(1,10,LIMIT,ee-1,0),ORDERQUEUE;  SELL(1,10,LIMIT,EXITPRICE-3,0),ORDERQUEUE;  IF TSELLHOLDING(1)>0 THEN BEGIN  //空頭平倉(cāng) IF (h-ee)>1 and (h-ee)<50 THEN SELLSHORT(1,10,LIMIT,ee+1,0),ORDERQUEUE;  SELLSHORT(1,10,LIMIT,EXITPRICE+3,0),ORDERQUEUE; IF (ee-l)>3 and (ee-l)<50 THEN SELLSHORT(1,10,LIMIT,ee-3,0),ORDERQUEUE;  SELLSHORT(1,10,LIMIT,EXITPRICE-3,0),ORDERQUEUE;tm:=50;//撤單時(shí)間cc800988:=holding;drawtextex(1,1,800,0,'虛擬持倉(cāng)為:'+numtostr(cc800988,0));//在圖表上輸入虛擬持倉(cāng)監(jiān)控if not(islastbar) or workmode<>1 then exit;xiadan800988:=cc800988-hold;if xiadan800988>0.5 and tsubmit(0)>tm then tcancelex(0,0,cc800988,stklabel);//撤單功能。tsell(1,10,mkt);tsellshort(1,10,mkt);if xiadan800988>0.5 then begin cang:=min(xiadan800988,abs(hold));  if hold<0 then begin  if (h-ee)>1 and (h-ee)<50 then  tsellshort(1,10,LMT,tenterprice+1,0,'800988'),ALLOWREPEAT;  tsellshort(1,10,LMT,TEXITPRICE+3,0,'800988'),ALLOWREPEAT;  if (ee-l)>3 and (ee-l)<50 then  tsellshort(1,10,LMT,tenterprice-3,0,'800988'),ALLOWREPEAT;  tsellshort(1,10,LMT,TEXITPRICE-3,0,'800988'),ALLOWREPEAT;  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 平空 %.0f',cang); end cang:=xiadan800988+min(hold,0); if cang>0 then begin  if (TIME>=085600 AND TIME<=90000) then    tbuy(1,100,LMT,DYNAINFO(54),0,'800988');  if (currenttime>=93000 and currenttime>=144000) then   tbuy(1,100,LMT,O,0,'800988'),ALLOWREPEAT;  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 開多 %.0f',cang); endendif xiadan800988<-0.5 then begin cang:=min(abs(xiadan800988),abs(hold)); if hold>0 then begin  if (h-ee)>3 and (h-ee)<50 then  tsell(1,10,LMT,tenterprice+3,0,'800988'),ALLOWREPEAT;  tsell(1,10,LMT,TEXITPRICE+3,0,'800988'),ALLOWREPEAT;  if (ee-l)>1 and (ee-l)<50 then  tsell(1,10,LMT,tenterprice-1,0,'800988'),ALLOWREPEAT;  tsell(1,10,LMT,TEXITPRICE-3,0,'800988'),ALLOWREPEAT;  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 平多 %.0f',cang); end cang:=abs(xiadan800988)-max(hold,0); if cang>0 then begin  if (TIME>=085600 AND TIME<=90000) then    tbuyshort(1,100,LMT,DYNAINFO(55),0,'800988');  if (currenttime>=93000 and currenttime>=144000) then   tbuyshort(1,100,LMT,O,0,'800988'),ALLOWREPEAT;  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 開空 %.0f',cang);  end endendhold:=cc800988;

    在圖上看不到與阿火一樣的標(biāo)示。請(qǐng)問那里出了問題。

     

  • 金字塔客服: 這是阿火模型;Globalvariable:hold=drawnull;//藍(lán)色部分改為你自己的模型buycond:=h>ref(hhv(h,10),1);sellcond:=l<ref(llv(l,10),1);if holding>0 and sellcond then sell(1,1,market);if holding<0 and buycond then sellshort(1,1,market);if holding=0 and buycond then buy(1,1,market);if holding=0 and sellcond then buyshort(1,1,market);cc800988:=holding;//這句放在信號(hào)穩(wěn)定的地方
    drawtextex(1,1,800,0,'虛擬持倉(cāng)為:'+numtostr(cc800988,0));//在圖表上輸入虛擬持倉(cāng)以便監(jiān)控if not(islastbar) or workmode<>1 then exit;xiadan800988:=cc800988-hold;if xiadan800988>0.5 then begin cang:=min(xiadan800988,abs(hold)); if hold<0 then begin  tsellshort(1,cang,mkt,0,0,'800988'),allowrepeat;  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 平空 %.0f',cang); end cang:=xiadan800988+min(hold,0); if cang>0 then begin  tbuy(1,cang,mkt,0,0,'800988'),allowrepeat;  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 開多 %.0f',cang); endendif xiadan800988<-0.5 then begin cang:=min(abs(xiadan800988),abs(hold)); if hold>0 then begin  tsell(1,cang,mkt,0,0,'800988'),allowrepeat;  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 平多 %.0f',cang); end cang:=abs(xiadan800988)-max(hold,0); if cang>0 then begin  tbuyshort(1,cang,mkt,0,0,'800988'),allowrepeat;  debugfile('D:\800988.txt',numtostr(hold,0)+' '+numtostr(cc800988,0)+' 開空 %.0f',cang); endendhold:=cc800988;

     

  • 用戶回復(fù): 把你的公式貼完整

     

  • 網(wǎng)友回復(fù): 完整

     

  • 網(wǎng)友回復(fù): 貼完整的公式,

 

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

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


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

相關(guān)文章

    沒有相關(guān)內(nèi)容
主站蜘蛛池模板: 在线观看国产三级| 日韩在线一区二区三区视频| 女人让男生桶的视频免费| 亚洲黄色片一级| 青青青国产在线视频| 搞黄网站免费看| 免费现黄频在线观看国产| 久久伊人色综合| 大胸小子bd在线观看| 亚洲制服丝袜精品久久| 97久久天天综合色天天综合色| 日本xxxwww| 亚洲国产成人高清在线观看| 香蕉成人伊视频在线观看| 成人免费高清完整版在线观看| 亚洲中文字幕无码中文| 男女午夜特黄毛片免费| 国产精品国产三级国产AV主播 | 久久久久黑人强伦姧人妻| 欧美性受xxxx白人性爽| 免费大片av手机看片| 色噜噜亚洲男人的天堂| 在线观看的黄网| 中文字幕在线色| 欧美精品综合一区二区三区| 又色又爽又黄的视频网站| 黄色一级毛片在线观看| 幼香视频在线观看免费| 亚洲成人www| 精品一区二区三区在线视频观看 | 亚洲国产成人久久一区久久| 男人j进女人p免费视频| 四虎成人国产精品视频| 91成人在线免费视频| 尤物视频网站在线| 久久久久久亚洲av成人无码国产| 欧美三级在线播放| 亚洲熟妇中文字幕五十中出| 车文里的冰块棉签是干啥用的| 国产精品久久久福利| 中文字幕欧美激情|