请教怎么编一下情况
if n<=5 then
if c<平仓数值 then sellshort(holding<0,1,thisclose) ;
当平仓时 n:=0 否则n 不变
else (也就是n>6)
if 平仓条件 then sellshort(holding<0,1,thisclose) ;
当平仓时 n:=0 否则n 不变
这里平仓数值是数值变量, 平仓条件是逻辑变量 本来想用这个形式 if(n<=5,平仓数值,平仓条件),感觉不对
是n小于5用平仓数值,大于6用平仓条件?那么你写的是可以的