maxProfit:tENTERPRICE-llv(l,tENTERBARS);
maxProfit1:HHV(H,tENTERBARS)-tENTERPRICE;
if maxProfit>10*mindiff and tholding<0 and tENTERBARS>0 and C>MA(C,10) then 止盈b:tsellshort(1,tholding,market);
if maxProfit1>10*mindiff and tholding>0 and tENTERBARS>0 and C<MA10 then 止盈b1:tsell(1,tholding,market);
最简单的改法就是把图表的交易函数改为后台的。不过还是属于图表的处理思路。对于后台的移动止损,你可以参考系统自带的后台移动止损模块代码