序列運(yùn)行模式下的 買賣函數(shù)分別是什么? [金字塔]
- 咨詢內(nèi)容:
請(qǐng)教:序列運(yùn)行模式下的 買賣函數(shù)分別是什么?
- 金字塔客服:
...
[此貼子已經(jīng)被作者于2013/11/25 14:36:20編輯過] - 用戶回復(fù):
后臺(tái) tbuy(開多),tsell(平多),tbuyshort(開空),tsellshort(平空),可在序列或逐k模式運(yùn)行。
- 網(wǎng)友回復(fù):
//用固定時(shí)間間隔 variable:maxprofit=0;//有倉(cāng)位時(shí)最大獲利 buycond:=ref(count(c>o,2)=2,1); if buycond and holding=0 then begin buy(1,1,limitr,o+2*mindiff); maxprofit:=0; end //止損平倉(cāng) if holding>0 and low<enterprice-10 then sell(1,1,market);win:=0;win2:=0;if holding > 0 and enterbars > 0 thenbegin win:=(high-enterprice); //記錄最大盈利 if win > maxprofit then maxprofit:=win; win2:=maxprofit-win; //最大盈利后的回調(diào)幅度end //如果開倉(cāng)均價(jià)盈利大于50點(diǎn)但小于100點(diǎn)時(shí),跌破盈利段的一半止盈if maxprofit>50 and maxprofit<100 and holding>0 then 止贏1:SELL(win2<0.5*maxprofit,1,market); //如果開倉(cāng)均價(jià)盈利大于100點(diǎn)時(shí),以盈利100點(diǎn)的位置為低點(diǎn),100+N點(diǎn)為高點(diǎn),這段距離回落一半止盈if maxprofit>=100 and holding>0 then 止贏2:SELL(win2<100+0.5*(maxprofit-100),1,market);
這個(gè)程序中哪些是圖表交易函數(shù),怎么修改才可以運(yùn)行在序列模式 - 網(wǎng)友回復(fù):
buy(開多),sell(平多),buyshort(開空),sellshort(平空) 都是圖表程序化交易函數(shù)
variable定義的全局變量,也是圖表程序化交易的函數(shù),且必須在逐K線模式下運(yùn)行.
這是你在策略編寫區(qū)看到的一個(gè)代碼吧
一般的策略,逐K模式就可以的,推薦您先從圖表程序化交易學(xué)起
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容