- 精华
- 0
- 在线时间
- 118 小时
- UID
- 212247
- 积分
- 128
- 帖子
- 83
- 阅读权限
- 40
- 注册时间
- 2015-6-28
- 最后登录
- 2019-11-15
- 精华
- 0
- UID
- 212247
- 积分
- 128
- 帖子
- 83
- 主题
- 23
- 阅读权限
- 40
- 注册时间
- 2015-6-28
- 最后登录
- 2019-11-15
|
想在早上十点的时候,取 9-10点之间的 最高价与最低价, 用了两种方法写,感觉上是都是可行的,第一种方法得出的结论不对,只是当前K线的高低点。
Params
Vars
Numeric high10;
numeric low10;
Begin
If(time==0.1000)
{
High10=Highest(high,59);
Low10=Lowest(low,59);
SetGlobalVar(0,High10);
SetGlobalVar(1,Low10);
PlotNumeric("aa",high10,0,-1,0);
PlotNumeric("bb",low10,0,-1,0);
}
//PlotString("H10",text(high10),h,-1,0);
//PlotString("L10",text(low10),l,-1,0);
End
上面这种方法得出的是 10点根K线的最高最低价。
Params
Vars
Numeric high10;
numeric low10;
Begin
High10=Highest(high,59);
Low10=Lowest(low,59);
If(time==0.1000)
{
SetGlobalVar(0,High10);
SetGlobalVar(1,Low10);
PlotNumeric("aa",high10,0,-1,0);
PlotNumeric("bb",low10,0,-1,0);
}
//PlotString("H10",text(high10),h,-1,0);
//PlotString("L10",text(low10),l,-1,0);
End
把最高价最低价定义 放在时间外,又正常了,这是为何?
|
|