if date<>ref(date,1) then extgbdataset('asset',tasset);
if todaybar>1 and extgbdata('asset')<=1000000 and extgbdata('asset')-tasset>100000 then tsell(1,0,mkt);//用全局变量记录每天开市时的资金,然后判断当前k线是否有亏损超过10万,超过就平仓
1000万资金亏20万的同理,只要改第二句里面的100万和10万
[此贴子已经被作者于2013/11/20 10:50:52编辑过]
也行,这个看自己的需求