公式用于股票日内K线:
今天的第一根K线收盘价高于昨天的收盘价时,买入,如果今天的第一根K线收盘价低于昨天的收盘价时,卖出。中间连续呈现买入时,不操作,连续呈现卖出时,不操作。
if c>ref(c,1) and todaybar=1 then buy();
if c<ref(c,1) and todaybar=1 then sell();
if c>ref(c,1) and todaybar=1 then buy(1,100,market); if c<ref(c,1) and todaybar=1 then sell(1,100,market); |
调试中,提示说,是交易系统函数,但不是交易系统公式。一脸的懵逼。跪求!!!