📝 docs(tsl): rebuild canonical syntax and routing manual

This commit is contained in:
csh
2026-04-22 16:59:20 +08:00
parent 3ed5052e61
commit 96b705b00b
83 changed files with 46446 additions and 323 deletions
+40
View File
@@ -0,0 +1,40 @@
# Market Data Context
文档类型:业务骨架
是否可直接用于生成代码:否
是否含已验证可执行示例:否
是否含已验证反例:否
遇到不确定时跳转到:[series_and_indicator_model.md](series_and_indicator_model.md)、[../syntax/index.md](../syntax/index.md)、[../modules/tsbacktesting.md](../modules/tsbacktesting.md)
本页用于判断金融脚本运行时的数据语境,不提供独立语法模板。
这一篇整理金融场景中的市场数据语境与执行环境。
## 这一篇解决什么问题
回答“金融脚本运行时的数据上下文是什么、哪些概念属于业务层而不是语言层”。
## 必须记住的规则
- 这里讨论的是市场数据语境,不是语言语法。
- 当问题变成“`if` / `function` / `array` 怎么写”时,应回到 syntax 层。
- 当问题变成“当前 bar、序列窗口、市场字段从哪里来”时,才留在 finance 层。
## 适用边界
- 本文不新增语法规则,语法仍以 `docs/tsl/syntax/` 为准。
## 为什么这里不放独立示例
- 本文不放单独的语法示例,避免把业务上下文误写成语言规则。
## 常见误写
- 把市场数据上下文误当成所有 TSL 文件默认自带的语言能力。
- 在还没确认数据语境前,先去排查语法。
## 跳转指引
- 回到语法层:见 [../syntax/03_core_model.md](../syntax/03_core_model.md)
- 看指标与序列:见 [series_and_indicator_model.md](series_and_indicator_model.md)
- 参考现有业务资料:见 [../modules/tsbacktesting.md](../modules/tsbacktesting.md)