设为首页收藏本站

 找回密码
 注册
查看: 1722|回复: 0
打印 上一主题 下一主题

请教一下各位,这里获取数据库数据获取不到,是哪有问题 [复制链接]

Rank: 1

精华
0
UID
263994
积分
5
帖子
2
主题
1
阅读权限
10
注册时间
2018-3-31
最后登录
2018-4-28
跳转到指定楼层
1#
发表于 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
附件: 你需要登录才可以下载或查看附件。没有帐号?注册
您需要登录后才可以回帖 登录 | 注册

bottom

静态版|手机版|联系我们|交易开拓者 ( 粤ICP备07044698   

GMT+8, 2024-4-26 13:04

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部