feat(tsl-api-reference): add class and framework API lookup

This commit is contained in:
csh
2026-08-20 13:49:55 +08:00
parent 7233646398
commit 651c1f68d2
637 changed files with 25498 additions and 36673 deletions
@@ -50,7 +50,7 @@ SetSysParam(pn_date(), 20180801t);
return ContinuedMatchOfNDay(@close(), 3);
```
## `correlOfNDay(exp_1, exp_2, n, cache_str)`
## `correlOfNDay(exp_1, exp_2, n[, cache_str])`
声明:function
@@ -63,7 +63,7 @@ return ContinuedMatchOfNDay(@close(), 3);
| `exp_1` | string | 字符串。统计表达式1 |
| `exp_2` | string | 字符串。统计表达式2 |
| `n` | int | 整数。天数 |
| `cache_str` | string | 字符串缓存串 |
| `cache_str` | string | 可选。字符串缓存串 |
返回:float
@@ -156,7 +156,7 @@ SetSysParam(pn_date(), 20231010T);
return CovOfNDay(@close(), 10, "SH000001");
```
## `decayAvgOfNDay(exp, n, cache_str)`
## `decayAvgOfNDay(exp, n[, cache_str])`
声明:function
@@ -168,7 +168,7 @@ N日线性衰减加权平均,与系统参数(股票,日期,周期,复权
| ----------- | ------ | ------------------ |
| `exp` | string | 字符串。统计表达式 |
| `n` | int | 整数。天数 |
| `cache_str` | string | 字符串缓存串 |
| `cache_str` | string | 可选。字符串缓存串 |
返回:float
@@ -285,7 +285,7 @@ SetSysParam(pn_date(), 20231010T);
return GrowthWithLowestOfNDay(@close(), 100, 0);
```
## `hhvBarsOfNDay(exp, n, cache_str)`
## `hhvBarsOfNDay(exp, n[, cache_str])`
声明:function
@@ -297,7 +297,7 @@ N日最高点到当前的周期数。N日表示市场交易日,当日最低为
| ----------- | ------ | ------------------ |
| `exp` | string | 字符串。统计表达式 |
| `n` | int | 整数。天数 |
| `cache_str` | string | 字符串缓存串 |
| `cache_str` | string | 可选。字符串缓存串 |
返回:int
@@ -414,7 +414,7 @@ SetSysParam(pn_date(), 20231010T);
return KurtosisOfNDay(@close(), 100);
```
## `llvBarsOfNDay(exp, n, cache_str)`
## `llvBarsOfNDay(exp, n[, cache_str])`
声明:function
@@ -426,7 +426,7 @@ N日最低点到当前的周期数。N日表示市场交易日,当日最低为
| ----------- | ------ | ------------------ |
| `exp` | string | 字符串。统计表达式 |
| `n` | int | 整数。天数 |
| `cache_str` | string | 字符串缓存串 |
| `cache_str` | string | 可选。字符串缓存串 |
返回:int
@@ -436,9 +436,7 @@ N日最低点到当前的周期数。N日表示市场交易日,当日最低为
```tsl
SetSysParam(pn_stock(), "SH600585");
SetSysParam(pn_date(), 20231030T);
return LLVBarsOfNDay(@close(), 10, "");
// 输出:4
```
@@ -518,7 +516,7 @@ SetSysParam(pn_date(), 20180801t);
return OccuredOfNDay(@close(), 10);
```
## `percentRankOfNDay(exp, n, cache_str)`
## `percentRankOfNDay(exp, n[, cache_str])`
声明:function
@@ -530,7 +528,7 @@ return OccuredOfNDay(@close(), 10);
| ----------- | ------ | ------------------ |
| `exp` | string | 字符串。统计表达式 |
| `n` | int | 整数。天数 |
| `cache_str` | string | 字符串缓存串 |
| `cache_str` | string | 可选。字符串缓存串 |
返回:float
@@ -544,7 +542,7 @@ SetSysParam(pn_date(), 20231030T);
return PercentRankOfNDay(@close(), 10, "");
```
## `productOfNDay(exp, n, cache_str)`
## `productOfNDay(exp, n[, cache_str])`
声明:function
@@ -556,7 +554,7 @@ return PercentRankOfNDay(@close(), 10, "");
| ----------- | ------ | ------------------ |
| `exp` | string | 字符串。统计表达式 |
| `n` | int | 整数。天数 |
| `cache_str` | string | 字符串缓存串 |
| `cache_str` | string | 可选。字符串缓存串 |
返回:float
@@ -590,7 +588,7 @@ return ProductOfNDay(@close(), 3, "");
范例01:调用函数
```tsl
返回上证指数在2018年7月18号的收盘价
// 返回上证指数在2018年7月18号的收盘价
SetSysParam(pn_stock(), 'SH000001');
SetSysParam(pn_date(), 20180801t);
return RefValue(@close(), 10);
@@ -850,7 +848,7 @@ return SumifofNday(@open(), 30, "@open()>@close()", "");
范例01:调用函数
```tsl
计算平安银行截止2018年8月1日最近10个交易日的成交量和
// 计算平安银行截止2018年8月1日最近10个交易日的成交量和
SetSysParam(pn_stock(), 'SZ000001');
SetSysParam(pn_date(), 20180801t);
return SumOfNDay(@vol(), 10);