Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tdx findhigh findlow #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

AimLuo
Copy link

@AimLuo AimLuo commented Oct 9, 2022

新增了几个通达信的函数和宽表模式:

COS
EXP
MOD
SIN
TAN
DMA
FINDHIGH
FINDHIGHBARS
FINDLOW
FINDLOWBARS
SMA
DEVSQ
FORCAST
SLOPE

@wukan1986 wukan1986 self-requested a review October 9, 2022 04:58
@@ -217,7 +217,28 @@ def densify(x):
return x


def cos_(x):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 这类的指标感觉 transformational 项目下更合适,与arc_cos一类的更接近
  2. 也有可能放在tdx下面更好,因为wq的帮助文档中没有这类函数
  3. 我加下划线的原因是与python内置函数冲突,没有冲突的是不建议加的

@@ -137,3 +137,35 @@ def _bars_since_n_nb(a, n):
return 0

return numpy_rolling_apply([pd_to_np(cond)], timeperiod, _rolling_func_1_nb, _bars_since_n_nb, timeperiod)


def FINDHIGH(var, n, m, t):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

通达信指标很多其实是带时序滚动计算的,但您在这里是全量计算。
时序方向的全量计算会引入未来函数

@wukan1986
Copy link
Owner

下次请pull到dev分支吧

@AimLuo
Copy link
Author

AimLuo commented Oct 9, 2022

OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants