比方想要得到在1分鐘頻率裡,close穿越value1的時間。
var:atime(0);
if close cross under value1 then atime=currenttime;
但在實際應用上,卻無法固定住atime的時間,求解,謝謝您
比方想要得到在1分鐘頻率裡,close穿越value1的時間。
var:atime(0);
if close cross under value1 then atime=currenttime;
但在實際應用上,卻無法固定住atime的時間,求解,謝謝您
謝謝musashi大熱心回覆:
小弟先前表達不太完整,應該說,希望把時間定為一常數,以便盤中運算,比方說...
var:atime(0);
if close cross under value1 then atime=currenttime;
if atime > 091000 then begin // 利用atime來限定之後運算時間
if close > value1 then begin
ret=1;
end;
end;
謝謝您
好的 謝謝您
Hello 胖胖仔,
if close cross under value1 then atime=currenttime;
這樣的話,atime 只會在 close 向下穿越 value1 的時候更新數值。
小幫手建議您可以搭配 print 函數來確認運算資訊,會比較容易理解。
感謝 musashi 的熱心回覆。
5 評論