- 精华
- 0
- 在线时间
- 115 小时
- UID
- 113242
- 积分
- 3506
- 帖子
- 97
- 阅读权限
- 80
- 注册时间
- 2012-10-31
- 最后登录
- 2013-6-4
- 精华
- 0
- UID
- 113242
- 积分
- 3506
- 帖子
- 97
- 主题
- 11
- 阅读权限
- 80
- 注册时间
- 2012-10-31
- 最后登录
- 2013-6-4
|
还有 跨周期 读写文件能在指点文件输出数据,但是调用的时候又调用不出来。。。错误在哪里?求教
Vars
string strkey;
string strValue1;
string strValue2;
string strValue3;
string strValue4;
Begin
strKey = DateTimeToString(Date+Time);//索引 目录
strValue1 = Text(High);
SetTBProfileString2File("F:\\数据\\My5MinsHigh.txt","MyHigh",strKey,strValue1);
PlotNumeric("MyHigh",High);
strValue2 = Text(Low);
SetTBProfileString2File("F:\\数据\\My5MinsLow.txt","Mylow",strKey,strValue2);
PlotNumeric("Mylow",Low);
strValue3 = Text(Close);
SetTBProfileString2File("F:\\数据\\My5MinsClose.txt","MyClose",strKey,strValue3);
PlotNumeric("MyClose",Close);
strValue4= Text(Open);
SetTBProfileString2File("F:\\数据\\My5MinsOpen.txt","MyOpen",strKey,strValue4);
PlotNumeric("MyOpen",Open);
End
这能正常的输出出来。。但是下面的读写又读不出来,,
Vars
NumericSeries OpenValue;
StringSeries strKey;
string strValue;
Begin
If(IntPart(Minute%5)==0)
{
strKey = DateToString(Date+Time);
}Else
{
strKey =strKey[1];
}
strValue = GetTBProfileString2File("F:\\数据\\My5MinsOpen.txt","MyOpen",strKey);
If(strValue != InvalidString)
{
OpenValue = Value(strValue);
}Else
{
OpenValue = OpenValue[1];
}
PlotNumeric("My5MinsOpen",OpenValue);
End |
|