[原創]歷史測試和實時交易收盤平倉 [金字塔]
- 咨詢內容:
if date<refx(date,1) then begin
sell(1,holding,limitr,close);
sellshort(1,holding,limitr,close);
end else begin
if(date=currentdate and time=145500 and currenttime>=145900) begin
sell(1,holding,limitr,close);
sellshort(1,holding,limitr,close);
end
end - 金字塔客服:
好像上半段程序已經可以完成收盤平倉啦,請問下半截程序的用途是什么?
end else begin
if(date=currentdate and time=145500 and currenttime>=145900) begin
sell(1,holding,limitr,close);
sellshort(1,holding,limitr,close);
end
end - 用戶回復:
上半段和下半段是條件不一樣吧
上半段滿足此條件平倉if date<refx(date,1)
下半段滿足此條件平倉if(date=currentdate and time=145500 and currenttime>=145900)
時間的限制有區別,一個平歷史,一個平當前的
如果以上指標公式不適用于您常用的行情軟件
或者您想改編成選股公式,以便快速選出某種形態個股的話,
相關文章
-
沒有相關內容