if SDL[9] < rfline[9] and SDL[8] > rfline[8] then condition2 = true;
if SDL[8] < rfline[8] and SDL[7] > rfline[7] then condition2 = true;
if SDL[7] < rfline[7] and SDL[6] > rfline[6] then condition2 = true;
if SDL[6] < rfline[6] and SDL[5] > rfline[5] then condition2 = true;
if SDL[5] < rfline[5] and SDL[4] > rfline[4] then condition2 = true;
你們好,這是我的語法,
我的想法是我有1條判斷線 rfline 和1個值 SDL,
當上週的 SDL值任一天 (n-5 ~ n-9)有越過 rfline時,則條件成立,
這5天任何一天有越過就會觸發條件成立,
但是我這樣子寫好像會使 condition 一直是 false,
請問我該怎麼修正才能達到我想要結果呢?
謝謝
1 評論