设为首页收藏本站

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

老师看一下这一段是什么意思? [复制链接]

Rank: 1

精华
0
UID
225117
积分
13
帖子
8
主题
5
阅读权限
10
注册时间
2015-12-15
最后登录
2021-11-19
跳转到指定楼层
1#
发表于 2019-1-7 12:34:12 |只看该作者 |倒序浏览
//        Commentary("amphigh="+text(amphigh));
//        Commentary("amplow="+text(amplow));
        PlotNumeric("jjx", dayavg);
        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
        if ((time[1]<0.20 and time>=0.21) or (((time[1]>0.13 and time[1]<=0.15) or time[1]<0.08 or time[1]>=0.2230) and time>=0.09 and time<0.10) or (time[1]<0.12 and time>=0.1330)) {
                barnum = 1;
                if (close>open) {upspeed = (high-low)/low*100; dnspeed =(high-close)/high*100;}
                else if (close<open){dnspeed = (high-low)/high*100; upspeed =(close-low)/low*100;}
                else {dnspeed = (high-low)/high*100; upspeed = (high-low)/low*100;}
                if ((time[1]>0.1400 and time[1]<=0.1500 and (time<=0.1000 or time>=0.2100))) {muspeed = upspeed; mdspeed = dnspeed;}
                usdis = 0; dsdis = 0; hipoint = 0; lopoint = 0; tnum = Mod(value(left(text(n), 4)),50)-2;         老师主要是这一行代码,是什么意思呢?
        } else {
                barnum = barnum[1] + 1;
        }
//        Commentary("barnum="+text(barnum));

Rank: 10Rank: 10Rank: 10

精华
3
UID
5
积分
26584
帖子
12686
主题
49
阅读权限
200
注册时间
2007-7-20
最后登录
2021-11-3
2#
发表于 2019-1-7 14:00:31 |只看该作者
这一行是对5个变量进行了赋值 ,其中前面四个变量都赋值 为0.
最后一个变量有一定的计算结算进行赋值,具体的可以看一下帮助文档里,mod,value,left,text等几个函数的用法。

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

bottom

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

GMT+8, 2024-4-25 21:07

Powered by Discuz! X2 LicensedChrome插件扩展

© 2011-2012 交易开拓者 Inc.

回顶部