兩個問題
1.因為大大是用大於,如果沒設進場次數,會一直買
2.因為close會一直變動,所以如果一直漲,close+30會一直變高,所以永遠買不到
建議可以考慮改三個條件裡面的其中,變成cross over
例如
if close cross over opend(0)+30 and close>open and close>Average(close,20) then buy
或是
if close > opend(0)+30 and close>open and close cross over Average(close,20) then buy
之類的。