开拓者期货期权程序化系统交易论坛
标题:
请教一下各位,这里获取数据库数据获取不到,是哪有问题
[打印本页]
作者:
L1512289894
时间:
2018-4-13 15:06:21
标题:
请教一下各位,这里获取数据库数据获取不到,是哪有问题
Params
//Numeric FastLength(5);
//Numeric SlowLength(20);
Numeric BuyLots(1);
//Numeric SellLots(2);
Vars
//NumericSeries AvgValue1;
//NumericSeries AvgValue2;
String strKey1;
String strKey2;
String strKey;
string strValue;
String kong;
String mysecont;
Numeric tep;
Numeric yearNum;
Numeric MonthNum;
Numeric DayNum;
Numeric hourNum;
Numeric MinuteNum;
Numeric SecondNum;
Begin
//AvgValue1 = AverageFC(Close,FastLength);
//AvgValue2 = AverageFC(Close,SlowLength);
//strKey1 = DateToString(Date);
strKey2 = TimeToString(Time);
kong = " ";
//strKey = strKey1+kong+strKey2;
yearNum = Year();
MonthNum = Month();
DayNum = Day();
// hourNum = Hour();
// MinuteNum = Minute();
strKey = Text(yearNum)+"/"+Text(MonthNum)+"/"+Text(DayNum)+kong+strKey2;
mysecont = "test";
strValue = GetTBProfileString(mysecont,strKey);//此处想获取数据库里面的值发现获取不到,数据库的设置方式:文件->数据管理->配置工具->添加模块
//tep = Value(strValue);
tep = Minute();
If(tep == 30)
{
If(strValue != InvalidString)
{
PlotString ("tep",strValue,high+10,Yellow);
}
Else
{
PlotString ("tep","没有数据",high+10,Yellow);
}
}
If(tep == 0)
{
If(strValue != InvalidString)
{
PlotString ("other",strValue,high+10,Cyan);
}
Else
{
PlotString ("other","没有数据",high+10,Cyan);
}
}
End
欢迎光临 开拓者期货期权程序化系统交易论坛 (http://bbs.tb18.net/)
Powered by Discuz! X2