- 精华
- 2
- 在线时间
- 2808 小时
- UID
- 4130
- 积分
- 20906
- 帖子
- 6519
- 阅读权限
- 200
- 注册时间
- 2009-4-15
- 最后登录
- 2019-4-12
- 精华
- 2
- UID
- 4130
- 积分
- 20906
- 帖子
- 6519
- 主题
- 17
- 阅读权限
- 200
- 注册时间
- 2009-4-15
- 最后登录
- 2019-4-12
|
回复 2# jiaoyizhe
有的
定义用户函数BarTypeStr,自动获取当前的周期的字符串表达式
周期的值分别为T1,T10,M1,M5,M15,M30,M60,M240,D1,W1,MON1。表示从Tick到月线的各种周期。- Vars
- String strKey;
- String str1;
- String str2;
- Begin
- if(BarType == 0)
- {
- str1 = "D";
- }else if(BarType==1)
- {
- str1 = "M";
- }Else if(BarType==2)
- {
- str1 = "T";
- }else if(BarType==3)
- {
- str1 = "V";
- }else if(BarType==4)
- {
- str1 = "W";
- }else if(BarType==5)
- {
- str1 = "MON";
- }
- str2 = Text(BarInterval);
- strKey=str1+str2;
- Return strKey;
- End
复制代码 |
|