if 开仓条件 and 持仓判断 then begin
buy......;
debugfile........;
end
if 平仓条件 and 持仓判断 then begin
sell........;
debugfile.......;
我是用的 逐k模式。
就是按照你的方法写的,
但现在的输出结果是开平仓的那个周期内,
debugfile一直输出。
一分钟输出十几次。