用个全局变量记录一下
if 开多条件 and 持仓判断 then begin
开多语句;
extgbdataset('kaiduo',tenterprice);
end
if 开空语句and 持仓判断 then begin
开空语句;
extgbdataset('kaikong',tenterprice);
end
这样要获取上一次的开多开空价格,那么就用extgbdata('kaiduo') extgbdata('kaikong') 来调用
但是在后台只能保存上一次的开多开空价格,历史价格不能被记录