如下程式可否指導該如何修改??
只要在當日第一根K棒(5分K)發生時出現指標就好,後面的K棒即使條件成立也不要畫出。
if condition11 and close > value1 then begin
plot5(1) ;
 
        
        
如下程式可否指導該如何修改??
只要在當日第一根K棒(5分K)發生時出現指標就好,後面的K棒即使條件成立也不要畫出。
if condition11 and close > value1 then begin
plot5(1) ;
if date<>date[1] then
if condition11 and close > value1 then plot5(1) ;
Hello eng12345h,
您可以用變數紀錄條件達成的次數,如果超過限定的次數就不要畫出。
舉例來說,在分鐘頻率的狀況下:
var: count(0);
condition1 = ...您的條件...;
if issessionfirstbar then count = 0;
if condition1 then begin
count += 1;
if count < 2 then plot5(1) else noplot(5);
end;
感謝 虎科大許教授 的熱心回覆。
2 評論