請問,日內以來的開倉次數,如何表達 [金字塔]
- 咨詢內容:
如題,謝謝
- 金字塔客服:
用全局變量,開一次倉開倉次數加1,例如
VARIABLE:n=0;
if date<>ref(date,1) then n:=0;
if 開倉條件 then begin
buy();
n:=n+1;
endn就是開倉次數
[此貼子已經被作者于2015/1/29 9:42:07編輯過] - 用戶回復:
H10:=REF(HHV(H,5),1);L10:=REF(LLV(L,5),1);VARIABLE:m=0;if date<>ref(date,1) then m:=0;
if h>h10 and holding<=entervol*1 and (m=0 or m=1) and time>091600 and time<150000 then begin sellshort(1,0,market); buy(1,1,market); m:=m+1; end if l<l10 and holding<=entervol*-1 and (m=0 or m=1) and time>091600 and time<150000 then begin sell(1,0,market); buyshort(1,1,market); m:=m+1; end
if L<ENTERPRICE-20 and enterbars>0 then begin sell(1,entervol,market); end if h>ENTERPRICE+20 and enterbars>0 then begin sellshort(1,entervol,market); end
if time>=151000 then begin sellshort(1,0,market); sell(1,0,market); m:=0; end
這樣寫,哪個地方錯了,一筆交易都沒有 - 網友回復:
把全部代碼貼出來,不要一直貼你認為錯誤的那一部分
- 網友回復: 這就是全部了
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容