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
@@ -16,9 +16,7 @@
```tsl
SetSysParam(PN_Stock(), 'SZ000002');
SetSysParam(pn_date(), inttodate(20121017));
return BuySample();
// 输出:0
```
@@ -102,9 +100,7 @@ return portfolioCalcSys(
```tsl
SetSysParam(PN_CYCLE(), cy_day());
ReturnSelectStockIndex("SZ000541;SH600000", inttodate(20120620),
return SelectStockIndex("SZ000541;SH600000", inttodate(20120620),
inttodate(20120930), @BsByMACD(12, 26, 9, 2), @SsByMACD(12, 26, 9, 2), "SH000001", 1);
// 输出:股票组合array(SZ000541;SH600000)在2012-06-20到2012-09-30在给出的买入条件和卖出条件下的等比投资的交易情况
```
@@ -135,13 +131,9 @@ ReturnSelectStockIndex("SZ000541;SH600000", inttodate(20120620),
```tsl
StockArr := array("SH600460", "SZ000920", "SH600718");
BegT := inttodate(20120925);
EndT := inttodate(20121017);
Return SelectStockIndex_Call(StockArr,
BegT, EndT, @BsByMACD(12, 26, 9, 2), true, @SsByMACD(12, 26, 9, 2), false);
```
@@ -161,9 +153,7 @@ Return SelectStockIndex_Call(StockArr,
```tsl
SetSysParam(PN_Stock(), 'SZ000002');
SetSysParam(pn_date(), inttodate(20121017));
return sellSample(); // 判断万科A在2012-10-17在卖出策略sellSample()下是否卖出, 结果:0
```
@@ -187,7 +177,6 @@ return sellSample(); // 判断万科A在2012-10-17在卖出策略sellSample()下
```tsl
SetRetBuyPrice(20);
return GetSysParam('tmpBuyPrice');
// 输出:20
```
@@ -212,7 +201,6 @@ return GetSysParam('tmpBuyPrice');
```tsl
SetRetSellPrice(50);
return GetSysParam('tmpSellPrice');
// 输出:50
```
@@ -324,9 +312,7 @@ return stockBuyTime();
```tsl
SetStockBuyPrice('SZ000002', 8.04);
SetSysParam(PN_Stock(), 'SZ000002');
return StockBuyDiff();
// 输出:4.47761
```
@@ -347,11 +333,8 @@ return StockBuyDiff();
```tsl
SetStockBuyTime('SZ000002', inttodate(20121018));
SetSysParam(pn_date(), inttodate(20121022));
SetSysParam(PN_Stock(), 'SZ000002');
return StockBuyTimeDiff();
// 输出:4
```
@@ -460,9 +443,7 @@ return SelectStockIndex_Call(
```tsl
Return TSB_Data1("上证180", inttodate(20120625), inttodate(20121017),
"BK_UpPercent3()+Ref(BK_UpPercent3(),1)+Ref(BK_UpPercent3(),2)",
3, 20);
```
@@ -482,6 +463,5 @@ Return TSB_Data1("上证180", inttodate(20120625), inttodate(20121017),
```tsl
Return TSB_Data2("上证180;中证500", inttodate(20120925),
inttodate(20121017));
```