等级: 专业版
- 注册:
- 2022-10-26
- 曾用名:
|
CLOSEPOSMODE:1; //指定图表理论平仓模式为优先平老仓
ODDLOTSMODE:1; //不允许零股交易,例如股票将按照最小100股单位调整
k1:=200;
k:holding/k1,NODRAW;
variable:ma2=ma(c,n);
beishu:abs((close/ma2-1)*100)/(z/2);
bsh:sum(beishu,ENTERBARS);
N:if(k=0,N2,if(k>0 and close<enterprice,N2/K,N2/k-y*bsh/k));
jq:if(ENTERBARS>0 and k>0,enterbars,0),NODRAW;
ma1:=ma(c,N1);
ma2:=ma(c,n);
ma3:=ma(high,N*0.75);
可平:=HOLDING-DAYHOLDING;
zdz:=max(max(ma1,ma2),ma3);
这段代码的第5行提示我未定义的变量N,可问题是如果我把第11行N放在前,又在提示我未定义的变量bsh,所以这段代码我该怎么改才能能够正常运行?
|
|