> ## Documentation Index
> Fetch the complete documentation index at: https://docs.innova-trading.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit Indicator

> Submit trading signals to be displayed on the chart

## Request

<ParamField path="indicator_id" type="string" required>
  Unique identifier for your indicator. Use alphanumeric characters and underscores only.

  Examples: `my_signals`, `smart_money_v2`, `inside_bar_detector`
</ParamField>

### Body Parameters

<ParamField body="symbol" type="string" required>
  Trading symbol (e.g., `EURUSD`)
</ParamField>

<ParamField body="timeframe" type="integer" required>
  Timeframe in minutes (1, 5, 15, 60, 240, 1440)
</ParamField>

<ParamField body="indicator_name" type="string" required>
  Human-readable name displayed in the UI
</ParamField>

<ParamField body="version" type="string" default="1.0">
  Version of your indicator
</ParamField>

<ParamField body="points" type="array" required>
  Array of signal points to display on the chart

  <Expandable title="Point Object">
    <ParamField body="time" type="integer" required>
      Unix timestamp of the bar. **Must match a bar from the /bars endpoint.**
    </ParamField>

    <ParamField body="type" type="string" required>
      Position relative to the bar:

      * `high` - Above the candlestick
      * `low` - Below the candlestick
    </ParamField>

    <ParamField body="price" type="float" required>
      Price level where the point appears
    </ParamField>

    <ParamField body="label" type="string">
      Text label (e.g., `BUY`, `SELL`, `TP1`, `SL`)
    </ParamField>

    <ParamField body="color" type="string">
      Hex color code (e.g., `#22c55e` for green)
    </ParamField>

    <ParamField body="shape" type="string" default="circle">
      Shape: `circle`, `arrowUp`, `arrowDown`, `square`
    </ParamField>

    <ParamField body="size" type="integer" default="1">
      Size: 1 (small), 2 (medium), 3 (large)
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="lines" type="array">
  Array of horizontal lines to display on the chart (e.g., SL/TP levels that extend across multiple bars)

  <Expandable title="Line Object">
    <ParamField body="id" type="string" required>
      Unique identifier for the line (e.g., `signal_001_sl`)
    </ParamField>

    <ParamField body="price" type="float" required>
      Price level where the line is drawn
    </ParamField>

    <ParamField body="start_time" type="integer" required>
      Unix timestamp where the line starts
    </ParamField>

    <ParamField body="bars" type="integer" required>
      Number of bars the line extends forward
    </ParamField>

    <ParamField body="label" type="string">
      Text label (e.g., `SL`, `TP1`, `Entry`)
    </ParamField>

    <ParamField body="color" type="string">
      Hex color code (e.g., `#ef4444` for red)
    </ParamField>

    <ParamField body="style" type="string" default="solid">
      Line style: `solid`, `dashed`, `dotted`
    </ParamField>

    <ParamField body="width" type="integer" default="1">
      Line width: 1, 2, or 3
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="metadata" type="object">
  Optional metadata for your indicator (analytics, description, etc.)
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  Indicates if the signal was stored successfully
</ResponseField>

<ResponseField name="indicator_id" type="string">
  The indicator ID
</ResponseField>

<ResponseField name="points_received" type="integer">
  Number of points that were stored
</ResponseField>

<ResponseField name="lines_received" type="integer">
  Number of lines that were stored
</ResponseField>

<ResponseField name="symbol" type="string">
  The symbol
</ResponseField>

<ResponseField name="timeframe" type="integer">
  The timeframe
</ResponseField>

<ResponseField name="expires_at" type="string">
  ISO 8601 datetime when the data will expire (24 hours)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.innova-trading.com/api/external/indicators/my_signals" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "symbol": "EURUSD",
      "timeframe": 60,
      "indicator_name": "My Trading Signals",
      "points": [
        {
          "time": 1765540800,
          "type": "low",
          "price": 1.1725,
          "label": "BUY",
          "color": "#3b82f6",
          "shape": "arrowUp",
          "size": 2
        },
        {
          "time": 1765540800,
          "type": "low",
          "price": 1.1700,
          "label": "SL",
          "color": "#ef4444",
          "shape": "square",
          "size": 1
        },
        {
          "time": 1765540800,
          "type": "high",
          "price": 1.1750,
          "label": "TP1",
          "color": "#22c55e",
          "shape": "circle",
          "size": 1
        }
      ],
      "metadata": {
        "signal_type": "BUY",
        "strategy": "ICT"
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  signal = {
      "symbol": "EURUSD",
      "timeframe": 60,
      "indicator_name": "My Trading Signals",
      "points": [
          {
              "time": 1765540800,
              "type": "low",
              "price": 1.1725,
              "label": "BUY",
              "color": "#3b82f6",
              "shape": "arrowUp",
              "size": 2
          },
          {
              "time": 1765540800,
              "type": "low",
              "price": 1.1700,
              "label": "SL",
              "color": "#ef4444",
              "shape": "square",
              "size": 1
          },
          {
              "time": 1765540800,
              "type": "high",
              "price": 1.1750,
              "label": "TP1",
              "color": "#22c55e",
              "shape": "circle",
              "size": 1
          }
      ]
  }

  response = requests.post(
      "https://api.innova-trading.com/api/external/indicators/my_signals",
      json=signal,
      headers={
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
      }
  )
  ```

  ```javascript JavaScript theme={null}
  const signal = {
    symbol: "EURUSD",
    timeframe: 60,
    indicator_name: "My Trading Signals",
    points: [
      {
        time: 1765540800,
        type: "low",
        price: 1.1725,
        label: "BUY",
        color: "#3b82f6",
        shape: "arrowUp",
        size: 2
      },
      {
        time: 1765540800,
        type: "low",
        price: 1.17,
        label: "SL",
        color: "#ef4444",
        shape: "square",
        size: 1
      },
      {
        time: 1765540800,
        type: "high",
        price: 1.175,
        label: "TP1",
        color: "#22c55e",
        shape: "circle",
        size: 1
      }
    ]
  };

  const response = await fetch(
    "https://api.innova-trading.com/api/external/indicators/my_signals",
    {
      method: "POST",
      headers: {
        Authorization: "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
      },
      body: JSON.stringify(signal)
    }
  );
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response theme={null}
  {
    "success": true,
    "indicator_id": "my_signals",
    "points_received": 3,
    "symbol": "EURUSD",
    "timeframe": 60,
    "expires_at": "2025-12-13T12:00:00Z",
    "message": "Indicator data stored successfully"
  }
  ```

  ```json Validation Error theme={null}
  {
    "error": "validation_error",
    "message": "Point 0: type must be 'high' or 'low'",
    "point_index": 0
  }
  ```
</ResponseExample>

## Complete Trading Signal Example

A professional trading signal includes Entry, Stop Loss, and multiple Take Profits:

```json theme={null}
{
  "symbol": "EURUSD",
  "timeframe": 60,
  "indicator_name": "Smart Money Signals",
  "points": [
    {
      "time": 1765540800,
      "type": "low",
      "price": 1.1725,
      "label": "ENTRY",
      "color": "#3b82f6",
      "shape": "arrowUp",
      "size": 2
    },
    {
      "time": 1765540800,
      "type": "low",
      "price": 1.1695,
      "label": "SL",
      "color": "#ef4444",
      "shape": "square",
      "size": 1
    },
    {
      "time": 1765540800,
      "type": "high",
      "price": 1.1755,
      "label": "TP1",
      "color": "#22c55e",
      "shape": "circle",
      "size": 1
    },
    {
      "time": 1765540800,
      "type": "high",
      "price": 1.1785,
      "label": "TP2",
      "color": "#22c55e",
      "shape": "circle",
      "size": 1
    },
    {
      "time": 1765540800,
      "type": "high",
      "price": 1.1815,
      "label": "TP3",
      "color": "#22c55e",
      "shape": "circle",
      "size": 1
    }
  ],
  "metadata": {
    "signal_type": "BUY",
    "entry_price": 1.1725,
    "stop_loss": 1.1695,
    "risk_pips": 30,
    "risk_reward": "1:3",
    "strategy": "Order Block + FVG"
  }
}
```

## Color Reference

| Use Case     | Color  | Hex       |
| ------------ | ------ | --------- |
| Buy / Long   | Blue   | `#3b82f6` |
| Sell / Short | Orange | `#f97316` |
| Stop Loss    | Red    | `#ef4444` |
| Take Profit  | Green  | `#22c55e` |
| Neutral      | Yellow | `#eab308` |

## Shape Reference

| Shape       | Best For                    |
| ----------- | --------------------------- |
| `arrowUp`   | Buy signals                 |
| `arrowDown` | Sell signals                |
| `circle`    | Take profit levels          |
| `square`    | Stop loss, important levels |

<Warning>
  **Data expires after 24 hours.** Your service should re-submit signals periodically to keep them visible.
</Warning>

<Tip>
  You can submit multiple points with the same `time` to show Entry, SL, and TPs on the same candle.
</Tip>

## Using Lines for SL/TP Levels

Lines are perfect for showing Stop Loss and Take Profit levels that extend across multiple bars:

```json theme={null}
{
  "symbol": "EURUSD",
  "timeframe": 60,
  "indicator_name": "Inside Bar Signals",
  "points": [
    {
      "time": 1765540800,
      "type": "low",
      "price": 1.1725,
      "label": "BUY",
      "color": "#3b82f6",
      "shape": "arrowUp",
      "size": 2
    }
  ],
  "lines": [
    {
      "id": "signal_001_sl",
      "price": 1.1695,
      "start_time": 1765540800,
      "bars": 10,
      "label": "SL",
      "color": "#ef4444",
      "style": "dashed",
      "width": 1
    },
    {
      "id": "signal_001_tp1",
      "price": 1.1755,
      "start_time": 1765540800,
      "bars": 10,
      "label": "TP1",
      "color": "#22c55e",
      "style": "dotted",
      "width": 1
    },
    {
      "id": "signal_001_tp2",
      "price": 1.1785,
      "start_time": 1765540800,
      "bars": 10,
      "label": "TP2",
      "color": "#10b981",
      "style": "dotted",
      "width": 1
    },
    {
      "id": "signal_001_tp3",
      "price": 1.1815,
      "start_time": 1765540800,
      "bars": 10,
      "label": "TP3",
      "color": "#059669",
      "style": "dotted",
      "width": 1
    }
  ]
}
```

## Line Style Reference

| Style    | Best For                      |
| -------- | ----------------------------- |
| `solid`  | Entry levels, important zones |
| `dashed` | Stop Loss levels              |
| `dotted` | Take Profit targets           |

<Info>
  **Lines vs Points**: Use **points** for markers (arrows, circles) on specific candles. Use **lines** for horizontal levels that extend across multiple bars (SL/TP zones).
</Info>
