这个不能分割的来看,得整合到系统里面去写到一起
以多头为例,盈利10%用多头来表述
variable:n=0;
variable:biaoji=0;
if 下单条件 and biaoji =0 and 持仓判断 then begin
下单语句;
n:=asset;
end
if asset>n then n:=asset;
if (c-enterprice)/enterprice>0.1 then biaoji:=1;
if (n-asset)/asset>0.05 then biaoji:=0;