開平倉問題 [金字塔]
- 咨詢內(nèi)容:
VARIABLE:bj=0;
if aspect=0 and holding=0 and bj=0 then begin bj:=1; buy(1,1,thisclose);endif H>=PBUY and C>=MAX(O,PBUY) AND MA1>REF(MA1,1) and holding=0 and bj=0 then begin bj:=2; buy(1,1,thisclose);end if aspect=1 and holding>0 and bj=1 then begin sell(1,0,thisclose); bj:=0;end if C<stopprice and holding>0 and bj=2 then begin sell(1,0,thisclose); bj:=0;end
if aspect=1 and holding=0 and bj=0 then begin bj:=1; BUYSHORT(1,1,thisclose);endif L<=PSELL and C<=MIN(O,PSELL) AND MA1<REF(MA1,1) and bj=0 then begin bj:=2; BUYSHORT(1,1,thisclose);end if aspect=1 and holding>0 and bj=1 then begin SELLSHORT(1,0,thisclose); bj:=0;end if C<stopprice and holding>0 and bj=2 then begin SELLSHORT(1,0,thisclose); bj:=0;end
k1的多單子用p1平倉k2的多單子用p2平倉
Q1的空單子用D1平倉Q2的空單子用D2平倉開空同理。 - 金字塔客服:
圖標不顯示
- 用戶回復:
你貼完整代碼
- 網(wǎng)友回復:
這樣編寫是正確?
- 網(wǎng)友回復: 還是做空要另外使用一個變量?
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容