diff --git a/docs/.vitepress/theme/components/AppFooter.vue b/docs/.vitepress/theme/components/AppFooter.vue index 7c9b5048..cfb6c2e3 100644 --- a/docs/.vitepress/theme/components/AppFooter.vue +++ b/docs/.vitepress/theme/components/AppFooter.vue @@ -64,6 +64,7 @@ const year = new Date().getFullYear()
  • CLI
  • MCP
  • LLMs
  • +
  • Navi
  • diff --git a/docs/.vitepress/theme/components/HomePage/Footer.vue b/docs/.vitepress/theme/components/HomePage/Footer.vue index 6dec13f1..25650c7d 100644 --- a/docs/.vitepress/theme/components/HomePage/Footer.vue +++ b/docs/.vitepress/theme/components/HomePage/Footer.vue @@ -69,6 +69,7 @@ const rightLinks = computed(() => [ { href: '/docs/cli', label: 'CLI' }, { href: '/docs/llm', label: 'LLM' }, { href: '/docs/assets', label: t('footer.assets') }, + { href: 'https://navi-lang.org', label: 'Navi' }, { href: 'https://github.com/longbridge/developers/issues', label: 'Feedback' }, ]) diff --git a/docs/.vitepress/theme/components/NewHomePage/Footer.vue b/docs/.vitepress/theme/components/NewHomePage/Footer.vue index e670c30e..598eb69a 100644 --- a/docs/.vitepress/theme/components/NewHomePage/Footer.vue +++ b/docs/.vitepress/theme/components/NewHomePage/Footer.vue @@ -70,6 +70,7 @@ const rightLinks = computed(() => [ { href: '/docs/cli', label: 'CLI' }, { href: '/docs/llm', label: 'LLM' }, { href: '/docs/assets', label: t('footer.assets') }, + { href: 'https://navi-lang.org', label: 'Navi' }, { href: 'https://github.com/longbridge/developers/issues', label: 'Feedback' }, ]) diff --git a/docs/en/docs/cli/quant/index.md b/docs/en/docs/cli/quant/index.md index 23475946..e4a75ed4 100644 --- a/docs/en/docs/cli/quant/index.md +++ b/docs/en/docs/cli/quant/index.md @@ -27,13 +27,13 @@ Pipe a file instead of using `--script`: cat strategy.pine | longbridge quant run TSLA.US --start 2024-01-01 --end 2024-12-31 ``` -## Script Language — OpenPine +## Script Language — Navi -Scripts are written in **OpenPine** — an independent indicator scripting language compatible with most **PineScript V6** syntax. Existing Pine scripts work with little to no modification. +Scripts are written in **Navi** — an independent indicator scripting language for quantitative analysis. ### Script Types -Every OpenPine script must begin with one of these declarations — it determines the execution mode: +Every Navi script must begin with one of these declarations — it determines the execution mode: | Declaration | Purpose | | ----------- | ------- | diff --git a/docs/en/docs/cli/quant/indicator.md b/docs/en/docs/cli/quant/indicator.md index 1726fa7f..9e8c12d1 100644 --- a/docs/en/docs/cli/quant/indicator.md +++ b/docs/en/docs/cli/quant/indicator.md @@ -133,3 +133,22 @@ plot(ta.rsi(close, period), "RSI") ``` Parameters are matched positionally: `[21]` replaces the first `input.*()` call. + +## Navi — The Script Language + +Scripts run on [Navi](https://navi-lang.org) — a scripting language +designed for quantitative analysis. + +Install the Navi CLI to validate scripts locally before running them on Longbridge servers: + +```bash +curl -fsSL https://navi-lang.org/install.sh | sh +``` + +Once installed, run a script file directly: + +```bash +navi run my_indicator.pine +``` + +This lets you catch syntax errors locally without a network round-trip to `longbridge quant run`. diff --git a/docs/zh-CN/docs/cli/quant/index.md b/docs/zh-CN/docs/cli/quant/index.md index 6709ff94..25263f42 100644 --- a/docs/zh-CN/docs/cli/quant/index.md +++ b/docs/zh-CN/docs/cli/quant/index.md @@ -27,13 +27,13 @@ longbridge quant run \ cat strategy.pine | longbridge quant run TSLA.US --start 2024-01-01 --end 2024-12-31 ``` -## 脚本语言 — OpenPine +## 脚本语言 — Navi -脚本使用 **OpenPine** 编写 — 一种独立的指标脚本语言,兼容大部分 **PineScript V6** 语法,现有 Pine 脚本无需或只需少量修改即可直接运行。 +脚本使用 **Navi** 编写 — 一种面向量化分析的独立指标脚本语言。 ### 脚本类型 -每个 OpenPine 脚本必须以其中一个声明开头,它决定了脚本的执行模式: +每个 Navi 脚本必须以其中一个声明开头,它决定了脚本的执行模式: | 声明 | 用途 | | ---- | ---- | diff --git a/docs/zh-CN/docs/cli/quant/indicator.md b/docs/zh-CN/docs/cli/quant/indicator.md index 7bc6c49e..b9933750 100644 --- a/docs/zh-CN/docs/cli/quant/indicator.md +++ b/docs/zh-CN/docs/cli/quant/indicator.md @@ -133,3 +133,21 @@ plot(ta.rsi(close, period), "RSI") ``` 参数按位置匹配:`[21]` 覆盖第一个 `input.*()` 调用。 + +## Navi — 脚本语言 + +脚本运行于 [Navi](https://navi-lang.org)——这是一门专为量化分析设计的脚本语言。 + +安装 Navi CLI,在将脚本提交至 Longbridge 服务器前先在本地验证: + +```bash +curl -fsSL https://navi-lang.org/install.sh | sh +``` + +安装完成后,可直接运行脚本文件: + +```bash +navi run my_indicator.pine +``` + +这样可以在本地捕获语法错误,避免每次都需要通过 `longbridge quant run` 远程执行。 diff --git a/docs/zh-HK/docs/cli/quant/index.md b/docs/zh-HK/docs/cli/quant/index.md index a54f1751..a60ce96e 100644 --- a/docs/zh-HK/docs/cli/quant/index.md +++ b/docs/zh-HK/docs/cli/quant/index.md @@ -27,13 +27,13 @@ longbridge quant run \ cat strategy.pine | longbridge quant run TSLA.US --start 2024-01-01 --end 2024-12-31 ``` -## 腳本語言 — OpenPine +## 腳本語言 — Navi -腳本使用 **OpenPine** 編寫 — 一種獨立的指標腳本語言,兼容大部分 **PineScript V6** 語法,現有 Pine 腳本無需或只需少量修改即可直接運行。 +腳本使用 **Navi** 編寫 — 一種面向量化分析的獨立指標腳本語言。 ### 腳本類型 -每個 OpenPine 腳本必須以其中一個聲明開頭,它決定了腳本的執行模式: +每個 Navi 腳本必須以其中一個聲明開頭,它決定了腳本的執行模式: | 聲明 | 用途 | | ---- | ---- | diff --git a/docs/zh-HK/docs/cli/quant/indicator.md b/docs/zh-HK/docs/cli/quant/indicator.md index 5d126fa0..bdf1eb87 100644 --- a/docs/zh-HK/docs/cli/quant/indicator.md +++ b/docs/zh-HK/docs/cli/quant/indicator.md @@ -133,3 +133,21 @@ plot(ta.rsi(close, period), "RSI") ``` 參數按位置匹配:`[21]` 覆蓋第一個 `input.*()` 調用。 + +## Navi — 腳本語言 + +腳本運行於 [Navi](https://navi-lang.org)——這是一門專為量化分析設計的腳本語言。 + +安裝 Navi CLI,在將腳本提交至 Longbridge 伺服器前先在本地驗證: + +```bash +curl -fsSL https://navi-lang.org/install.sh | sh +``` + +安裝完成後,可直接執行腳本檔案: + +```bash +navi run my_indicator.pine +``` + +這樣可以在本地捕獲語法錯誤,避免每次都需要透過 `longbridge quant run` 遠端執行。