金字塔客服:
相對(duì)于昨日收盤(pán)?
r1:=callstock('if00',vtclose,6,-1);
//參考了3樓回復(fù),圖表改為以下
if (c-r1)/r1>0.01 and ((currenttime>=145500 and islastbar) or (not(islastbar) and time>=145500)) then buy(holding=0,1,market);
//以下為后臺(tái)程序化交易,寫(xiě)法
r1:=callstock('if00',vtclose,6,-1);
if (c-r1)/r1>0.01 and currenttime>=145500 then tbuy(tholding=0,1,mkt);
節(jié)日快樂(lè)!
用戶(hù)回復(fù):
這樣寫(xiě)圖表不妥,還要加個(gè)條件限定
if (c-r1)/r1>0.01 and (currenttime>=145500 and islastbar) or (not(islastbar) and time>=145500) then buy(holding=0,1,thisclose);