{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "longsurf-ai-openchart--write-custom-indicator-in-tea",
 "repo": "longsurf-ai/openchart",
 "repo_url": "https://github.com/longsurf-ai/openchart",
 "repo_slug": "longsurf-ai-openchart",
 "title": "Write a custom indicator in Tea",
 "page_title": "How to write a custom indicator in Tea with Openchart",
 "summary": "Code your own indicator or condition in Tea using functions, loops, state, and collections.",
 "who": "A developer or quant who wants a market indicator that the built-in studies do not provide.",
 "problem": "Off-the-shelf indicators may not match the exact logic you want to test.",
 "outcome": "A custom Tea indicator that evaluates as market data flows in, running inside OpenChart.",
 "steps": [
  "Clone the repo with `git clone https://github.com/longsurf-ai/openchart.git`, then run `cd openchart`.",
  "Run `just install --frozen-lockfile`, which also initializes and builds Tea.",
  "Read the Tea compiler and runtime at https://github.com/longsurf-ai/tea and write your indicator with functions, loops, state, and collections.",
  "Run `just desktop` and load the indicator on a chart to check how it evaluates as data arrives."
 ],
 "agent_prompt": "In the openchart repo, write a Tea indicator that computes <your logic> on the <symbol> chart. Expected output: a Tea source file that compiles and draws the indicator on the chart. Verify by loading it with `just desktop` and checking the values against a few bars you calculate by hand.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "2 hours",
 "basis": "readme",
 "caveat": "The README lists the Tea language features but does not document Tea syntax, so the Tea repo is the source of truth for writing indicators.",
 "category": "Money",
 "tags": [
  "Money"
 ],
 "lang": "typescript",
 "requirements": [
  "macOS on Apple Silicon for the packaged Desktop app, or Node.js 24, npm 11.11.1, Bun 1.4.2, and Just for a source build",
  "An account with your agent provider (Claude, Codex, or Gemini models) to power the agent features",
  "Optional: OpenChart Cloud market data, which is priced separately",
  "Git, for cloning the repository in the source build path"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/longsurf-ai-openchart/write-custom-indicator-in-tea/",
 "md": "https://dedupedai.com/use-cases/longsurf-ai-openchart/write-custom-indicator-in-tea/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/longsurf-ai-openchart--write-custom-indicator-in-tea.json",
 "api_version": "v1"
}
