variable:n=100000000;
if 开多条件 and holding=0 then begin
buy(.......);
if isdown and c<n then n:=c;
end
if isdown and c<n and holding>0 then n:=c;
n即为所求值,holding>0这个判断,加不加取决于你是算平仓前还是平仓后的:开仓后到平仓前的最小c要加;开仓之后到下次开仓之前的,不要加
是求图中间那根阴线的c
开多条件较多
可否用type?
开多条件多就逐一添加上述的代码
你的要求不适用type