- 精华
- 0
- 在线时间
- 70 小时
- UID
- 225653
- 积分
- 31
- 帖子
- 14
- 阅读权限
- 10
- 注册时间
- 2015-12-24
- 最后登录
- 2020-11-10
- 精华
- 0
- UID
- 225653
- 积分
- 31
- 帖子
- 14
- 主题
- 9
- 阅读权限
- 10
- 注册时间
- 2015-12-24
- 最后登录
- 2020-11-10
|
发表于 2017-12-13 22:11:37
|显示全部楼层
Params
Vars
Numeric hh;
Numeric ll;
Numeric i;
Numeric closetest;
Numeric hht;
Numeric llt;
Begin
If (CurrentBar% 10 == 0) PlotString("Bar#",Text(CURRENTBAR));
If (BarStatus == 0)
{
For i = 0 to 4
{
SetGlobalVar(i,0);
}
}
If(CurrentBar% 10 == 0)
{
SetGlobalVar(0,CurrentBar);
For i = 0 to 3
{
SetGlobalVar(4-i,GetGlobalVar(3-i));
}
}
closetest = CurrentBar - GetGlobalVar(2);
Commentary("closetest="+text(closetest));
Commentary("var0="+text(getglobalvar(0)));
Commentary("var1="+text(getglobalvar(1)));
Commentary("var2="+text(getglobalvar(2)));
Commentary("var3="+text(getglobalvar(3)));
Commentary("var4="+text(getglobalvar(4)));
hh = Highest(close[CurrentBar-GetGlobalVar(2)],5);
ll = Lowest(close[CurrentBar-GetGlobalVar(2)],5);
PlotNumeric("hh",hh,0,-1,0);
PlotNumeric("ll",ll,0,-1,0);
hht = Highest(close[10],5);
llt = Lowest(close[10],5);
Commentary("hht="+text(hht));
Commentary("llt="+text(llt));
End
跪求各位高手,上面hh的取值不正确,为了对照,我做了hht,照理说,应该在每个10的倍数位置,hh应该等于hht,但是实际不是,可以复制公式代码输出一下更直观。我截了图,但是不知道如何上传。
求高手解决问题,谢谢! |
|