- 精华
- 0
- 在线时间
- 3 小时
- UID
- 213916
- 积分
- 2
- 帖子
- 1
- 阅读权限
- 10
- 注册时间
- 2015-7-15
- 最后登录
- 2020-7-30
- 精华
- 0
- UID
- 213916
- 积分
- 2
- 帖子
- 1
- 主题
- 1
- 阅读权限
- 10
- 注册时间
- 2015-7-15
- 最后登录
- 2020-7-30
|
Params
Vars
//此处添加变量
NumericSeries OH(0);
NumericSeries OL(0);
Numeric PP_LOW(0);
Numeric KK(0);
Numeric i(0);
Begin
i = CurrentBar;
//HBarIndex = HighestBarIndex(High);
//LBarIndex = LowestBarIndex(Low);
//OH = H;
//OL = L;
FileAppend("C:\\Formula-7.log","i-----------= "+Text(i));
//TestA(CurrentBar,PP_LOW);
Test_HH(HBarIndex,LBarIndex,OH,OL,i);
//HFenXing(HBarIndex,LBarIndex,OH,OL,i,PP_TOP);
//Test_HH(HBarIndex,LBarIndex,OH,OL,i);
//Test_HH(HBarIndex,LBarIndex,OH,OL,i);
if(PP_LOW > 2){
FileAppend("C:\\Formula-7.log","i= "+Text(i));
FileAppend("C:\\Formula-7.log","----- ");
FileAppend("C:\\Formula-7.log","PP_LOW= "+Text(PP_LOW));
while(i >=0 ){
FileAppend("C:\\Formula-7.log","Index000000= "+Text(i));
FileAppend("C:\\Formula-7.log","LBarIndex-0000000= "+Text(Low[i]));
i = i -1;
}
Test_HH(High,Low,High,Low,CurrentBar);
i = CurrentBar;
while(i >=0 ){
FileAppend("C:\\Formula-7.log","Index000000= "+Text(i));
FileAppend("C:\\Formula-7.log","LBarIndex-0000000= "+Text(Low[i]));
i = i -1;
}
}
End
上边是我的测试程序, 发现 在加了 if (PP_low > 2 ){
Test_HH(High,Low,High,Low,CurrentBar);
}
这个 Test_HH 的 high 序列会丢失数据
这个是第一次调用 Test_HH(HBarIndex,LBarIndex,OH,OL,i); 在 最开始的地方, Index000000= 3
LBarIndex-0000000= 3759
Index000000= 2
LBarIndex-0000000= 3763
Index000000= 1
LBarIndex-0000000= 3772
Index000000= 0
LBarIndex-0000000= 3780
而 if 里边的数据同样的函数 输出会变成
Index000000= 3
LBarIndex-0000000= 3780
Index000000= 2
LBarIndex-0000000= 3780
Index000000= 1
LBarIndex-0000000= 3780
Index000000= 0
LBarIndex-0000000= 3780
数据全部变成了 0 索引的那个数据, 为啥
有什么特殊的要求么 这个语言 。
|
|