Shena Mao
Shena Mao

性别: 注册于 2021-07-23

向TA求助
20金币数
640 经验值
1个粉丝
主页被访问 2574 次

46 个回答

0 赞同

multiple outputTable in ReactiveStateEngine and TimeSeriesEn...

One Engine could only output 1 result table. If you want to get multiple output tables, you should use multiple streaming engines, such as cascade. In the meantime, the output table could be subscribed by multiple engines or subscribers.

回答于 2022-01-04 15:27

0 赞同

Realtime data like tradingview or any other sites

Not really sure what you exactly want. You want to do data visulization on the result of the output table? 

回答于 2021-12-30 12:07

0 赞同

How to get VWAP using TimeSeriesEngine or ReactiveStateEngin...

I recommend you here using ReactiveStateEngine to convert cumulative volume to volume and then connecting two engines in series. Here is an example: tradesData = your_tick_data//define Trade Tablex=tradesData.schema().colDefsshare streamTable(100:0, x.name, x.typeString) as Trade//define OHLC outpu...

回答于 2021-12-29 17:47

0 赞同

条件取值,有什么高级写法吗?

可以用iif进行这种类型的条件取值: a = NULL NULL 1 2 3 4b = NULL 4 6 7 8 9iif(a != int(NULL) and b != int(NULL), min(a,b), iif(a == int(NULL) and b == int(NULL), -1, nullFill(a,1) *nullFill(b,1)))

回答于 2021-12-27 15:19

0 赞同

两个向量等长, 如何求a向量中值第一次>向量b中元素时的index?

可以用at去定位 譬如: a = 1..10b=10..1at(a>b)[0]//indexa[at(a>b)[0]]//value

回答于 2021-12-24 15:23

1 赞同

matrix和table怎么互相转换?矩阵和表怎么互相转换?

大概可以这样互相转换: a = table(2020.01.01..2020.01.05 as date1, 1..5 as price, 6..10 as vol) b = matrix(a[,1:]).rename!(a.date1,a.colNames()[1:]) c = table(b.rowNames() as date1,b)

回答于 2021-12-23 16:11

1 赞同

官网推荐用什么样的写法开发因子?

看情况你这边应该是对历史数据进行操作。 1. 首先,取决于你的这部分因子最后想要输出到哪里。如果你要存储到dfs库里,那么不建议你每个因子都写新的列,因为dfs库不建议增减新的列。但是如果你因子的个数都是一样的,限定好的,那么没有问题。 如果你的因子是输出到内存表中,暂时使用,那用 t["new_factor"]= xxx(向...

回答于 2021-12-23 14:41

0 赞同

https://ask.dolphindb.net/question/1073 计算结果不对

不好意思有一个地方忘记改了,改一下update的一个条件就可以了。 t = table(1 2 3 4 5 3 8 4 2 3 9 9 as volume)tt = select volume, iif(cumrank(volume) = (cumcount(volume)-1), cumrank(volume), 0) as newcount from ttmp = select volume, newcount , bfill(iif(deltas(volume)>=0, rowNo(volume), NULL)) as fla...

回答于 2021-12-17 12:18

0 赞同

https://ask.dolphindb.net/question/1070 计算结果不对

你看一下这样可以满足吗? t = table(1 2 3 4 5 3 8 4 2 3 9 9 as volume)tt = select volume, iif(cumrank(volume) = (cumcount(volume)-1), cumrank(volume), 0) as newcount from ttmp = select volume, newcount , bfill(iif(deltas(volume)>=0, rowNo(volume), NULL)) as flag from ttaa = select volume, newcoun...

回答于 2021-12-16 17:54

1 赞同

怎么不用循环计算这个列?

以下代码可以实现你这边的需求,请参考: t = table(10 7 13 6 4 8 7 3 6 as volume)tmp = select volume, iif(deltas(volume)>0, rowNo(volume), NULL) as flag from ttmp.bfill!()select volume, cumrank(volume) from tmp context by flag

回答于 2021-12-14 17:59