1)当前收盘价为:3000,我要在下根K线发一个限价单,如果触及3005,做多1手? 2)当期最低价是:3000,我要在下根K线发一个限价单如果触及2995,做空一手? 3)止损为亏损是个点,bar内止损平仓? |
也就是上一根,k线收盘价为3000,下一根k线价格到了3005就下单吗?
|
使用固定时间间隔模式,间隔设置为1秒
if ref(close,1)=3000 and close>=3005 then buy(holding=0,1,marketr);
if ref(low,1)=3000 and close<=2995 then buyshort(holding=0,1,marketr);
if holding>0 and l<enterpcie-10 then sell(1,0,marketr);
if holding<0 and h>enterprice+10 then sellshort(1,0,marketr);