Navi Stream language expert for writing quantitative trading indicators and technical analysis scripts. Use when working with .nvs files, technical indicators, market data analysis, or financial computations. Navi Stream is a domain-specific language optimized for real-time streaming data processing and indicator calculations.
User guide and best practices for the Navi Stream language.
Navi Stream (.nvs) is a domain-specific language designed specifically for quantitative trading and technical analysis. It is optimized for real-time streaming data processing and technical indicator calculations.
Core Features:
navi-stream/
├── SKILL.md # Core skill (loaded when triggered)
├── references/ # Detailed documentation (load as needed)
│ ├── syntax.md # Complete syntax reference
│ ├── indicators.md # Technical indicator functions in detail
│ ├── plotting.md # Plotting system guide
│ └── patterns.md # Common patterns and strategies
├── examples/ # Runnable examples
│ ├── macd.nvs # MACD indicator
│ ├── ma_cross.nvs # Moving average crossover
│ ├── bollinger.nvs # Bollinger Bands
│ └── rsi.nvs # RSI indicator
└── README.md # This file
This skill automatically activates when you work with:
.nvs filesThe main SKILL.md provides:
Load reference files when you need detailed information:
Read ~/.claude/skills/navi-stream/references/syntax.md # Complete syntax
Read ~/.claude/skills/navi-stream/references/indicators.md # Technical indicators
Read ~/.claude/skills/navi-stream/references/plotting.md # Plotting system
Read ~/.claude/skills/navi-stream/references/patterns.md # Common patterns
// 1. Metadata
meta {
title = "My Indicator",
overlay = false,
}
// 2. Import modules
use quote, ta;
// 3. Parameters
param {
Period = 20,
}
// 4. Calculation
let ma = ema(close, Period);
// 5. Export
export let signal = close > ma;
use nvs.my_indicator;
let indicator = my_indicator.new();
indicator.execute(
time: timestamp,
close: price,
// ... other fields
);
println(`signal=${indicator.signal:?}`);
NVS code is streaming:
execute() processes one new data pointclose[1])close // Current close price
close[1] // Previous period close
close[n] // N periods ago close
export let signal = buy_signal; // Becomes output
export let value = calculated; // Accessible in Navi
Create custom technical indicators:
Generate trading signals:
Real-time data analysis:
SKILL.md quick referencereferences/syntax.md complete syntaxreferences/indicators.md technical functionsreferences/plotting.md visualizationreferences/patterns.md common strategiesexamples/ directory| Feature | Navi (.nv) | Navi Stream (.nvs) | |---------|------------|-------------------| | Purpose | General programming | Technical indicators/quantitative | | Data Model | Standard variables | Streaming time series data | | Built-in Modules | std.* | ta, quote | | Special Features | spawn, Worker | plot, historical data access | | Execution | Direct run | Called from Navi |
See examples/ directory for complete examples:
.nvsuse nvs.moduleTo improve this skill:
Principle: SKILL.md for quick reference, references/ for deep dives.
Based on Navi language documentation v0.10.0+ (January 2025)
This skill documentation follows the Navi language's license and usage terms.
Category:stocks-finance