Skip to content

Indicator Build Guide

How to document, build, and standardise each TradingView indicator for MCP and UI integration.


Process

Step Action Why
1 Document the indicator with a short spec Stops spaghetti before coding starts
2 Choose: build from scratch or adapt open source Keeps logic and ownership clear
3 Build or edit the Pine Script Implementation
4 Document outputs and edge cases Prepares MCP and UI mapping
5 Standardise outputs across indicators Makes the stack consistent

Decision Rule

  • Simple and core to your system → build from scratch
  • Good open-source version exists → adapt it, but align outputs/naming/behaviour to the stack

Key rule: spec first, then build or adapt, then standardise.

Spec Template

Use this for every indicator:

Field What to fill in
Indicator name e.g., FVG + OB + MSS, Next Candle Bias, SMT, etc.
Purpose What it detects in one sentence
Timeframes Which timeframes it works on
Inputs Key settings or parameters
Output fields Only the values the system actually needs
Signal logic What makes it bullish, bearish, active, inactive, valid, invalid
UI display What the dashboard should show from it
MCP read requirement What must be captured from TradingView
Edge cases Repainting, candle-close only, session limits, overlapping zones, resets

Prompt Template

When working with Claude to build or adapt an indicator:

Use this indicator spec to either build the Pine indicator from scratch or adapt the attached open-source indicator to fit my TradingView → MCP → UI stack. Keep the output fields clean and consistent. Return: (1) Pine code, (2) plain-English explanation, (3) output field list, (4) MCP-readable summary, and (5) UI display notes.

Delivery Format

When an indicator is ready, provide one of:

Option What to send
A Pine script + short note describing outputs
B Short indicator spec (for design help before code)
C Open-source script + changes needed

Build Sequence

  1. Make the short spec for one indicator
  2. Build or adapt it with Claude
  3. Confirm the outputs
  4. Repeat one by one
  5. After the indicator set is stable, connect through TradingView MCP
  6. Wire real outputs into the FATBot UI

Discipline: Do not try to build the full system yet. Document and standardise each indicator so every later step — MCP, UI, scoring, and intelligence — has a clean base.

Indicator Set

All being rebuilt from scratch. No existing indicators to adapt.

Indicator Timeframes Route
FVG + OB + MSS All TF Build / adapt open source
Next Candle Bias All TF Build
SMT All TF Build
Session Bias Intraday Build
Macro Intraday Build
Economic Calendar Intraday Build / adapt
EMA Daily+ Build