目前的寫法如下,條件5成立後,分數為1,當前支K棒分數為1,且條件六成立,
則顯示正式做多訊號。前述部分目前皆能正常的出現訊號。
condition5 = value13 cross over value16 and close > value16;
condition6 = low - value16 <=60;
If condition5 then begin
count1 +=1;
(value21 = currentbar ;//後來新增的部分)
end;
If count1[1]=1 and condition6 (and currentbar- value21 <=12) then begin
count1 = 0;
plot12(close);//正式做多訊號
end;
之後為了限制得在條件6必須在條件5成立後12支K棒內出現,才算是正式的做多,超過12支K棒就不顯示訊號,
便增加了value21來訊號紀錄K棒的編號,在條件6後新增and currentbar- value21 <=12,
但卻變成沒有任何訊號,請問該怎麼修改才能達成目的呢?
6 評論