如何在下面這個日內交易模型(五分鐘周期)加上提前5秒下單 。 [金字塔]
- 咨詢內容:
請教:如何在下面這個日內交易模型(五分鐘周期)加上提前5秒下單 。
T1:=TIME>090000 AND TIME <145000;
pkkd:=cross(c,ma(c,5)) and t1;pdkk:=cross(ma(c,5),c) and t1;
if pkkd then
begin
sellshort(holding < 0, 1, limitr,open);
buy(holding = 0, 1, limitr,c+5*mindiff);
endif pdkk then
begin
sell(holding > 0, 1, limitr,open);
buyshort(holding = 0, 1, limitr,c-5*mindiff);
end - 金字塔客服:
T1:=TIME>090000 AND TIME <145000;
nn:=timetot0(time)-timetot0(dynainfo(207));
pkkd:=cross(c,ma(c,5)) and t1;pdkk:=cross(ma(c,5),c) and t1;
if pkkd and nn<=5 and islastbar or (pkkd and not(islastbar)) then
begin
sellshort(holding < 0, 1, limitr,open);
buy(holding = 0, 1, limitr,c+5*mindiff);
endif pdkk and nn<=5 and islastbar or (pdkk and not(islastbar)) then
begin
sell(holding > 0, 1, limitr,open);
buyshort(holding = 0, 1, limitr,c-5*mindiff);
end - 用戶回復:
nn:=timetot0(time)-timetot0(dynainfo(207));這句話中timetot0(time)返回什么時間?
- 網(wǎng)友回復:
timetot0(time): 括號中的時間距離當日0點的秒數(shù)。
括號中的time是k線時間,例如5分鐘周期第一根k線的time是090500 轉換成秒,返回結果是32700秒。
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯(lián)系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容