DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to write a custom indicator in Tea with Openchart

Code your own indicator or condition in Tea using functions, loops, state, and collections.

Short answer: Clone the repo with git clone https://github.com/longsurf-ai/openchart.git, then run cd openchart; then 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. All steps.

  • Money
  • Advanced
  • 2 hours
  • From the README
  • Any agent

Who it is forA developer or quant who wants a market indicator that the built-in studies do not provide.

The problemOff-the-shelf indicators may not match the exact logic you want to test.

The outcomeA custom Tea indicator that evaluates as market data flows in, running inside OpenChart.

What you need first

  • 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

Steps

  1. Clone the repo with git clone https://github.com/longsurf-ai/openchart.git, then run cd openchart.
  2. Run just install --frozen-lockfile, which also initializes and builds Tea.
  3. Read the Tea compiler and runtime at https://github.com/longsurf-ai/tea and write your indicator with functions, loops, state, and collections.
  4. Run just desktop and load the indicator on a chart to check how it evaluates as data arrives.

Prompt for your agent

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.

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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for longsurf-ai/openchart and "Write a custom indicator in Tea"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer