為什么用以下公式不能觸發開平倉呢? [金字塔]
-
咨詢內容:
現在主要是沒有開倉信號。
variable:num=0;
if (c-ref(c,1))/ref(c,1)<-0.01 and num=0 then
begin
buy(1,1,c);
num:=1;
end
variable:num=0;
if (c-ref(c,1))/ref(c,1)<-0.055 and num=0 then
begin
buy(1,1,c);
num:=1;
end
variable:num=0;
if (c-ref(c,1))/ref(c,1)>0.034 and num=0 then
begin
sell(1,holding,C);
num:=1;
end
?
-
金字塔客服:
代碼里面num是用來干什么的?
?
-
用戶回復:
控制每天每條只觸發一次。
?
-
網友回復:
variable:num1=0,num2=0;
if date<>ref(date,1) then begin
?num1:=0;
?num2:=0;
endif (c-ref(c,1))/ref(c,1)<-0.01 and num1=0 and holding=0 then
begin
buy(1,1,limitr,c);
num1:=1;
end
?
if (c-ref(c,1))/ref(c,1)<-0.055 and num2=0 and holding=0 then
begin
buy(1,1,limitr,c);
num2:=1;
end
if (c-ref(c,1))/ref(c,1)>0.034? thenbegin
sell(1,holding,limitr,C);
?
end
?
?
?
- 網友回復: 還是不能觸發開單,一單都出不來。
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 511411198 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容