全部 智大领峰 TBQuant功能 TBL语言 TB开户 问答专区 高手圈 其他
求众数
jswxyfx 分享到
2021-08-23 10:41

日线在N周期内大于一个固定值A1,小于一个固定值A2,求这范围内开盘价、收盘价、最高价、最低价,求4个价合并在一起的众数

jswxyfx

请老师指导下公式,是否可用数组来实现?

2021-08-23 10:47
jswxyfx

2021-08-23 10:56
jswxyfx

是用 ArrayInsertRange 函数吗?数组合并后,求数组的众数

2021-08-23 15:59
jswxyfx

2021-08-24 08:47
jswxyfx
2021-08-25 10:07
jswxyfx

OnBar(ArrayRef<Integer> indexs)
    {
        Range [0:1]
        numericstoarray(Open,Length,myarray,True);
        
        myarray[0];
       print(Text(myarray[0]));
       }

2021-08-25 10:09
jswxyfx

Params
    Series<Numeric>valuel(1);
    Numeric        length(5);
    ArrayRef<Numeric>myarray;
    Bool mark(True);

Vars
    Numeric i;

Begin
    If(mark==True)
    {
        for i = 0 to length-1
        {
            myarray[i]=valuel[i];
        }
    }Else
    {
        for i = 0 to length-1
        {
            myarray[i] = valuel[length-1-i];
        }
    }
    Return  true;
    End

2021-08-25 10:10
jswxyfx

实盘时结果为什么不一样,错在那,求大神指点

2021-08-25 10:15
jswxyfx
@jswxyfx

OnBarClose(ArrayRef<Integer> indexs)原来是放这里laugh

2021-08-25 10:40
jswxyfx
2021-08-25 10:16
jswxyfx

indecision

2022-02-18 09:07
您未登录,请先 登录注册 后发表评论
顶部