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

麦语言的各种指标公式和通达信一样不支持FOR循环和数组吗 #114

Open
weituo2002 opened this issue Jan 23, 2022 · 3 comments

Comments

@weituo2002
Copy link

看了函数文档貌似这个实现的麦语言的各种指标公式和通达信一样不支持FOR循环和数组咧,请问需要些循环语句的指标公式如何实现呢?其他的股票软件都支持for循环,除了这个通达信以外

@jones2000
Copy link
Owner

这个通达信的指标所有的数据都是数组, 数据操纵也是数组操作, 不需要单独写for. 如 T:C 返回一个所有的收盘价,是一个数组,
如:T:(H+L)/2 数组相加除以2,

@weituo2002
Copy link
Author

这个是对的,但是其他股票软件的序列变量也都是数组,但是还是可以另外显式地定义数组,甚至多维矩阵,而且FOR循环或者WHILE循环在其他股票软件中也都有,这样才可以写出比较复杂的公式,而通达信在这一块是相当地薄弱,怎么多年广受大家诟病,要实现复杂点的公式和策略都需要用到循环,通达信就只能用DLL扩展去做,您这个项目既然是全网第一个全新项目,衷心希望不要过多参考通达信落后的做法,应该更多借鉴TradeStation、MultiChart、MT4之类优秀的平台

@jones2000
Copy link
Owner

支持后台指标数据, 如果用其他语言,可以在后台做一个webapi, 把公式给后台计算,返回hqchart格式的数据,就可以在前端显示图形了。

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

No branches or pull requests

2 participants