> Every Taji docs page as Markdown: https://docs.taji.is/llms.txt

# Cookbook

The cookbook has 11 recipes in five groups: indicators, which draw on a chart; your agent, which drives Taji over MCP; the wire, which reads your own Taji from a script; plugins, which add a data source; and advanced, which chart what a plugin computes. Each is a short task with everything it needs to run: its full source, the picture it draws on a chart, the real output Taji gave when it was captured, and what to change to make it yours.

A recipe page has the same sections each time: a title that says what it does, one sentence, a "You need" line, the source in one fence, the picture and the kernel's answers, numbered notes on each line that matters, `## Change it` with two or three variations as small diffs, and `## Next`. Read the source and the notes first, then run it with your [connected agent](https://docs.taji.is/guide/agent.md) or by hand.

## Indicators

| Recipe | What it does | What it teaches |
| --- | --- | --- |
| [Mark where two EMAs cross](https://docs.taji.is/cookbook/ema-cross.md) | Draws a fast and a slow EMA over the price, with a triangle at each cross | Inputs, `ta` handles made in `setup`, and a marker that draws only where `next` returns a number |
| [Draw the prior day's high, low and close](https://docs.taji.is/cookbook/prior-day-levels.md) | Draws the previous session's three levels as flat lines over an intraday chart | A session anchor input and state that carries one session's values into the next |
| [Colour the volume bars that spike](https://docs.taji.is/cookbook/volume-spike.md) | Draws volume as a column, orange where it passes a multiple of its average | A pane of its own, a column plot with a unit, and a palette slot chosen per bar |
| [Backtest a 200-day reclaim on every bar the chart holds](https://docs.taji.is/cookbook/backtest-200-day-reclaim.md) | Tests a rule over every bar the chart holds and shows its trades, wins and average return | A rule run as an indicator, with open trades and totals kept in state, and a card read on the last bar |

## Your agent

| Recipe | What it does | What it teaches |
| --- | --- | --- |
| [Have your agent write an indicator](https://docs.taji.is/cookbook/agent-writes-an-indicator.md) | Your agent writes, checks, binds and reads back an indicator from one prompt | The `call` and `read` tools and the routes each makes, in order |
| [Have your agent place a `taji_sim` order](https://docs.taji.is/cookbook/agent-sim-order.md) | Your agent stages and places a simulated order, which waits for your approval | Agent approvals: the stage, place and approval reads that park an order until you approve it |

## The wire

| Recipe | What it does | What it teaches |
| --- | --- | --- |
| [Read bars over the wire with curl](https://docs.taji.is/cookbook/wire-read-bars.md) | Reads a symbol's last five daily bars from your own Taji | The port and token files, the `x-taji-token` header and decoding an Arrow answer |
| [Stream live quotes over the wire](https://docs.taji.is/cookbook/wire-stream-quotes.md) | Subscribes to SPY quotes on the market socket and prints the frames it sends | The market WebSocket's ask and its binary frames: a JSON header, then Arrow rows |

## Plugins

| Recipe | What it does | What it teaches |
| --- | --- | --- |
| [Chart your own CSV of daily bars](https://docs.taji.is/cookbook/python-csv-source.md) | Serves a CSV file's bars to a chart through a Python plugin | A source plugin: a `bars` handler, its manifest, and pinning a chart to it with `set_provider` |

## Advanced

| Recipe | What it does | What it teaches |
| --- | --- | --- |
| [Chart dealer gamma exposure on SPY](https://docs.taji.is/cookbook/gex-profile.md) | Draws the GEX plugin's levels, profile and curve on a chart and reads the same figures over the wire | Binding a plugin's layers with `add_indicator`, and reading its products from a streamed chain |
| [Draw an order-flow heatmap with trade bubbles and cumulative delta](https://docs.taji.is/cookbook/orderflow-heatmap.md) | Draws the Order flow plugin's heatmap, prints, book and delta from its recorded sample | Playing a plugin's recording with `taji plugin dev`, and reading span-keyed products with `from` and `to` |

## Run any recipe

1. You need a running Taji: the app, or a headless kernel on throwaway state, which [Your first indicator](https://docs.taji.is/indicators/first-indicator.md) boots in its first step.
2. Give the recipe's source to your [connected agent](https://docs.taji.is/guide/agent.md) and ask it to write and bind it, or make the same calls yourself as that page does.
3. Your numbers and picture differ from the page's: a recipe is captured on a made-up market, and your Taji reads the real one.

## How a recipe is captured

Nobody types or pastes a recipe's output. A harness boots its own keyless headless kernel, makes the recipe's calls, writes each answer and the picture, and records the date, the commit and a hash of every file, so a test fails a page whose output was edited by hand. [Writing Taji docs](https://docs.taji.is/contribute/docs.md) has the page template and the harness.

## See also

- [Build with AI](https://docs.taji.is/ai.md): the doors an agent uses to reach Taji.
- [Indicators](https://docs.taji.is/indicators.md): what an indicator is and the language it is written in.
- [Writing Taji docs](https://docs.taji.is/contribute/docs.md): add a recipe.
