Skip to main content

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 or by hand.

Indicators​

RecipeWhat it doesWhat it teaches
Mark where two EMAs crossDraws a fast and a slow EMA over the price, with a triangle at each crossInputs, ta handles made in setup, and a marker that draws only where next returns a number
Draw the prior day's high, low and closeDraws the previous session's three levels as flat lines over an intraday chartA session anchor input and state that carries one session's values into the next
Colour the volume bars that spikeDraws volume as a column, orange where it passes a multiple of its averageA 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 holdsTests a rule over every bar the chart holds and shows its trades, wins and average returnA rule run as an indicator, with open trades and totals kept in state, and a card read on the last bar

Your agent​

RecipeWhat it doesWhat it teaches
Have your agent write an indicatorYour agent writes, checks, binds and reads back an indicator from one promptThe call and read tools and the routes each makes, in order
Have your agent place a taji_sim orderYour agent stages and places a simulated order, which waits for your approvalAgent approvals: the stage, place and approval reads that park an order until you approve it

The wire​

RecipeWhat it doesWhat it teaches
Read bars over the wire with curlReads a symbol's last five daily bars from your own TajiThe port and token files, the x-taji-token header and decoding an Arrow answer
Stream live quotes over the wireSubscribes to SPY quotes on the market socket and prints the frames it sendsThe market WebSocket's ask and its binary frames: a JSON header, then Arrow rows

Plugins​

RecipeWhat it doesWhat it teaches
Chart your own CSV of daily barsServes a CSV file's bars to a chart through a Python pluginA source plugin: a bars handler, its manifest, and pinning a chart to it with set_provider

Advanced​

RecipeWhat it doesWhat it teaches
Chart dealer gamma exposure on SPYDraws the GEX plugin's levels, profile and curve on a chart and reads the same figures over the wireBinding 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 deltaDraws the Order flow plugin's heatmap, prints, book and delta from its recorded samplePlaying 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 boots in its first step.
  2. Give the recipe's source to your connected agent 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 has the page template and the harness.

See also​