?
你可以定義百分比,例如本根k線的20日均線比上根漲了10%就買入。
ma20:ma(c,20);if (ma20-ref(ma20,1))/ma20>=0.2 and holding=0 then buy();