急,在线求指导 - TradeBlazer公式 [开拓者 TB]
- 咨询内容:
Vars
Numeric N;
Numeric M;
Numeric Count;
NumericSeries AvgLine;
Bool Buyday (False);
Bool Sellday(False);
Begin
for N = 1 to 20
{
AvgLine(N-1) = Average(Close,N);
}
M ==0;
Count ==0;
while (M <=19)
{if (AvgLine(M)>AvgLine[M][1])
{
Count=Count+5;
}else
{
Count=Count;
M=M+1;
}
}
if (marketposition[1]==0 and Count>60) buy(1,high+0.2);
if (marketposition[1]==0 and Count<15) sellshort(1,low-0.2) ;
if (marketposition[1]==1 and Count<55) sell(1,low-0.2);
if (marketposition[1]==-1 and Count>25) buytocover(1,high+0.2);
End
求指导哪里出错了。一直提示的是
for N = 1 to 20
{
AvgLine(N-1) = Average(Close,N);
}
缺少分号 - TB技术人员:
回复 1# greywu
AvgLine(N-1) = Average(Close,N);
这里不能这么写,Average(Close,N)只能赋值给变量,不能赋值给函数 - TB客服:
回复 2# lh948
那请问该如何修改呢?新手,见谅 - 网友回复:
Vars
Numeric M;
Numeric Count;
Bool Buyday (False);
Bool Sellday(False);
Begin
M ==0;
Count ==0;
while (M <=19)
{if (Average(Close,M+1))>Average(Close,M+2))
{
Count=Count+5;
}else
{
Count=Count;
M=M+1;
}
}
if (marketposition[1]==0 and Count>60) buy(1,high+0.2);
if (marketposition[1]==0 and Count<15) sellshort(1,low-0.2) ;
if (marketposition[1]==1 and Count<55) sell(1,low-0.2);
if (marketposition[1]==-1 and Count>25) buytocover(1,high+0.2);
End - 网友回复:
回复 4# zzzlondon
谢谢了,但是你那个if语句提示说无法识别呢。。
相关文章
-
没有相关内容