如果我希望我的警示脚本的啓動時間是10點至11點期間,我應該怎麽寫呢?以下為我的脚本
input: length(20); setinputname(1,"均量期數");
input: VolumeXtime(3); setinputname(2,"量增倍數");
var: intrabarpersist oncePerBar(0);
settotalbar(3);
setbarback(Length);
once(volume > Average( volume[1],length)* VolumeXtime and GetInfo("IsRealTime") = 1 and oncePerBar<> currentbar)
begin
ret=1;
Print(file("C:\print\print.log"),"成交量突破3倍",FormatDate("yyyy/MM/dd", currentDate),FormatTime("HH:mm:ss", currentTime),symbol,symbolName,"價格=",numToStr(close,2),"成交量=",numtostr(volume,0));
oncePerBar= currentbar; //若當根Bar已經執行過,limit就會記錄當根Bar的編號避免再度執行。
end;
1 評論