- 精华
- 0
- 在线时间
- 396 小时
- UID
- 7277
- 积分
- 938
- 帖子
- 207
- 阅读权限
- 60
- 注册时间
- 2010-3-11
- 最后登录
- 2016-5-4
- 精华
- 0
- UID
- 7277
- 积分
- 938
- 帖子
- 207
- 主题
- 44
- 阅读权限
- 60
- 注册时间
- 2010-3-11
- 最后登录
- 2016-5-4
|
3分钟周期内求15分钟的数据,怎么求?
Params
Numeric length(10);
Vars
Numeric Myclose;
string strkey;
string strValue;
Begin
Myclose = Close;
strKey = TimeToString(Time);
strValue = Text(Myclose);
SetTBProfileString("DayMA",strKey,strValue);
PlotNumeric("Myclose",Myclose);
End
Vars
NumericSeries DayMAValue;
Numeric nMinSet(3);
StringSeries strKey;
string strValue;
Begin
If(Minute==00||Minute==15||Minute==30||Minute==45)
{
strKey = TimeToString(Time);
}Else
{
strKey = strKey[1];
}
strValue = GetTBProfileString("DayMA",strKey);
If(strValue != InvalidString)
{
DayMAValue = Value(strValue);
}Else
{
DayMAValue = DayMAValue[1];
}
PlotNumeric("DayMA",DayMAValue);
End |
附件: 你需要登录才可以下载或查看附件。没有帐号?注册
|