建议用户在发帖前可以先搜索下,连亏这种比较普遍的问题在论坛有很多历史帖可供参考的哦
http://weistock.com/bbs/dispbbs.asp?BoardID=2&ID=58828&skin=0
variable:num=0; //定义一个全局变量
a:=asset-ref(asset,todaybar-1) ;
if time>145500 then //判断当天收盘前资金减去开盘时的资金。
begin
if a<0 then
num:=num+1;
else
num:=0;
else
if num=2 then
buy(); //你加仓的代码