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

# Indicator code editor for Indie

> Write and edit Indie® indicators in the built-in code editor, work on several at once, and publish what you build to the marketplace.

The indicator code editor (IDE) enables you to create new technical indicators or modify existing ones. It provides a complete development environment for working with indicators on the TakeProfit platform. You can also add the indicators you have developed to the Indicators Marketplace and earn commission from sales and/or purchases of referrals.

## Adding the editor

<video autoPlay muted loop playsInline src="https://mintcdn.com/takeprofit-a5dc0462/67XMQdOAlONNWB1u/images/guide/platform/IDE-widget/2.11.2_Adding_IDE_Widget.mp4?fit=max&auto=format&n=67XMQdOAlONNWB1u&q=85&s=f4d5cde6286de59009c77d1a49cddaa2" />

Two ways to access the IDE:

* Drag from Widget Hub to your workspace
* Click **Open Source Code** on any open-source indicator. It opens read-only; click **Fork** to get your own copy you can edit.

## Creating New Indicators

### Initial Setup

<video autoPlay muted loop playsInline src="https://mintcdn.com/takeprofit-a5dc0462/67XMQdOAlONNWB1u/images/guide/platform/IDE-widget/2.11.3_Initial_Setup.mp4?fit=max&auto=format&n=67XMQdOAlONNWB1u&q=85&s=4ec601443630e13e2d60c3d4948f8439" />

1. Start with an **Unsaved Script**. It autosaves as a **Draft** while you type.
2. Click the save icon and name the script to save it. Saved scripts get versions: **v1**, **v2**, and so on.
3. Click the script name to open the **Scripts** panel, with built-in indicators, your marketplace purchases, and your own scripts. **New indicator** starts a blank script, and the arrow next to it has **Create New Strategy**.
4. Built-in and open-source scripts open read-only. Click **Fork** to make an editable copy.
5. To rename a script, open the **⋯** menu next to its name and pick **Edit**.

## Key Features

![](https://mintcdn.com/takeprofit-a5dc0462/TlwpkqusjbenzX-5/images/guide/platform/IDE-widget/2.11.1_Key_Features.png?fit=max\&auto=format\&n=TlwpkqusjbenzX-5\&q=85\&s=4fc1df75215d745b358275cb39315998)

### Top Controls

* Widget header:
  * Script name: click it to open the **Scripts** panel
  * **⋯** menu: **Edit** (rename), **Fork**, **Delete Script**
  * **Publish** to submit the script to the marketplace. It is off for drafts, so save first
  * **Docs** opens the Indie<sup>®</sup> language documentation

* Editor toolbar:
  * Undo and redo
  * Save icon for an unsaved draft
  * **Draft**, or the version number (**v3**) for a saved script. Changes to a saved script autosave as new versions; click the version to open **Version History** and **Restore** an older one
  * **Fork** for built-in and open-source scripts
  * Find and Replace
  * **Add to Chart** (**⌘D** / **Ctrl+D**) and **Update on Chart** (**⌘R** / **Ctrl+R**) for an indicator, or **Open Report** (**⌘D** / **Ctrl+D**) for a strategy. Select the target chart first; the editor asks you to if none is selected

### Standard Widget Controls

* Delete widget
* Duplicate widget (creates renamed copy).

### Bottom Panel

The console button at the bottom opens the console:

* **Output** shows the script's logs
* **Errors** lists compile and runtime errors, with **Quick Fix** to let the [AI assistant](https://takeprofit.com/docs/guide/platform/ai-assistant/AI-assistant-IDE.md) fix them

> [!TIP]
>
> **Ctrl + D** (**⌘ + D** on Mac) adds the indicator to the chart, **Ctrl + R** updates it there, and **Ctrl + /** comments out a line. You can also set your own keys to open the editor, save the script, and open My Scripts, Version History or the console: see the **Indicator Code Editor (IDE)** tab of [Keyboard Hotkeys](https://takeprofit.com/docs/guide/getting-started/Workspaces.md#keyboard-hotkeys).

## Working with Multiple IDEs

<video autoPlay muted loop playsInline src="https://mintcdn.com/takeprofit-a5dc0462/67XMQdOAlONNWB1u/images/guide/platform/IDE-widget/2.11.4_Multiple_IDEs.mp4?fit=max&auto=format&n=67XMQdOAlONNWB1u&q=85&s=8094ed4a952c5a86eb5447521704c6e1" />

You can work with several indicators simultaneously by opening multiple IDE widgets. This is particularly useful when:

* Developing related indicators
* Comparing different versions
* Testing multiple approaches.

### Multiple Charts Workflow

<video autoPlay muted loop playsInline src="https://mintcdn.com/takeprofit-a5dc0462/67XMQdOAlONNWB1u/images/guide/platform/IDE-widget/2.11.5_Multiple_Charts_Workflow.mp4?fit=max&auto=format&n=67XMQdOAlONNWB1u&q=85&s=277ddc2bbd9e4f47565f2e759dbc3963" />

* Before adding any indicator, click on your target chart to select it
* Make sure the chart is highlighted (active)
* Use Add to Chart to apply the indicator
* Repeat for other charts as needed.

### Working with Linked Charts

<video autoPlay muted loop playsInline src="https://mintcdn.com/takeprofit-a5dc0462/67XMQdOAlONNWB1u/images/guide/platform/IDE-widget/2.11.6_Linked_Charts.mp4?fit=max&auto=format&n=67XMQdOAlONNWB1u&q=85&s=87b13033cdef305e93d9179750cde525" />

Linked charts have independent indicators. Although charts can sync for symbols and timeframes, you must select each chart individually to add indicators, as each chart has its own set.

> [!NOTE]
>
> Keep your workspace organized by arranging IDE widgets near their corresponding charts for easier management.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.