Skip to main content
The AI Assistant can work directly with the TakeProfit IDE, helping you write, edit, debug, and refactor Indie® code without leaving your workspace. Use it to:
  • Generate Indie® indicators or strategies from a prompt
  • Convert or port legacy scripts from other languages into Indie®
  • Modify selected code blocks inline
  • Troubleshoot console errors
  • Refactor existing logic
  • Explain parts of an indicator
  • Iterate faster while developing custom tools

Working with the IDE

The assistant can interact with the IDE Widget as part of your workspace. To use it:
  1. Add or open the IDE Widget
  2. Open an existing Indie® script or create a new one
  3. Open the AI Assistant panel
  4. Select the IDE as the working context
  5. Describe what you want to create, change, or debug
You can ask the assistant to work with the current script, selected code, or visible console errors. Examples:
  • Create an RSI-based indicator with overbought and oversold zones
  • Convert this logic into Indie®
  • Explain what this function does
  • Refactor this block to make it easier to read
  • Fix the console error and update the code
The assistant works best when the IDE, chart, and related widgets are visible in the same workspace. This gives the assistant clearer context for code, output, and chart behavior.

Convert Legacy Scripts to Indie®

You can port indicators written in other languages — such as Pine Script, MQL5, or ThinkScript — into Indie® using the AI Assistant right inside the IDE. Paste the original script, ask the assistant to convert it, and it rewrites the logic as valid Indie® code you can run, refine, and publish — no need to start from a blank file. To convert a script:
  1. Open the IDE Widget and create or open a script to hold the converted code.
  2. Open the AI Assistant panel and select the IDE as the working context.
  3. Paste the legacy script and describe the target language, for example “Convert this Pine Script to Indie®.”
  4. Review the generated Indie® code, then use Add to Chart to test the output.
  5. Ask the assistant to fix any console errors or adjust the logic until the behavior matches the original.
Example prompts:
Complex conversions may take several iterations. Always validate the converted indicator on multiple symbols and timeframes before relying on it or publishing it to the Marketplace.

Quick Edit

Quick Edit allows you to modify selected code directly inside the IDE. To use Quick Edit:
  1. Highlight a code block in the IDE
  2. Press the Quick Edit shortcut or use the inline action
  3. Describe the change you want
  4. Review the suggested modification
  5. Accept or reject the change
Quick Edit is useful for small, targeted changes such as:
  • Renaming variables
  • Rewriting conditions
  • Simplifying calculations
  • Adding comments
  • Replacing repeated logic
  • Adjusting Indie® syntax
  • Fixing a specific block without rewriting the full script
Example prompts:
Quick Edit only changes the selected code block. For broader changes across the full script, use the main AI Assistant input instead.

Debug and Refactor

The assistant can help identify and resolve IDE console errors. When your Indie® script fails to compile or run:
  1. Open the Console in the IDE
  2. Select the related code block or keep the full script in context
  3. Ask the assistant to inspect the error
  4. Review the suggested fix
  5. Accept the edit or continue troubleshooting
The assistant can help with issues such as:
  • Undefined symbols
  • Incorrect variable references
  • Invalid Indie® syntax
  • Type mismatches
  • Incorrect series usage
  • Missing imports
  • Broken indicator logic
  • Runtime errors caused by unsafe calculations
You can switch between two modes:
  • Ask — use this when you want an explanation or debugging guidance
  • Edit — use this when you want the assistant to generate or apply code changes

Example prompts


Accepting AI Suggestions

When the assistant proposes a code change, you can review it before applying. The IDE shows the difference between the current code and the suggested version:
  • Removed lines are highlighted
  • Added lines are highlighted
  • You can accept the change
  • You can reject the change
  • You can continue the conversation with a follow-up request
This makes it easier to keep control over your script while using AI for faster development.

Selecting AI Models

The assistant supports system models and optional connected models through your own API key. Open the Models settings to:
  • View available system models
  • Connect an Anthropic API key
  • Enable external Claude models
  • Choose which model should be used by the assistant
When an Anthropic API key is connected, it can be used for Claude models available through your key.
Keep your API key private. Do not share screenshots or workspace recordings that expose sensitive credentials.

For indicator development, use this workflow:
  1. Create or open an Indie® script
    • Start from a blank script, fork an existing indicator, or open your own code.
  2. Generate or modify logic
    • Ask the assistant to create a first version or edit a selected block.
  3. Add the indicator to a chart
    • Use the IDE’s Add to Chart button to test the output visually.
  4. Check the console
    • If there are errors, ask the assistant to explain or fix them.
  5. Refine the code
    • Use Quick Edit for small changes.
    • Use the main assistant input for larger structural changes.
  6. Validate behavior on the chart
    • Compare the output with your expected trading logic.
    • Test different symbols and timeframes.
  7. Save or publish
    • Once the script works correctly, save it or prepare it for publishing.

Best Practices

  • Use clear prompts with specific goals.
  • Select only the code block you want to change when using Quick Edit.
  • Include the error message when asking for debugging help.
  • Ask the assistant to preserve logic when refactoring existing indicators.
  • Test generated code on multiple symbols and timeframes.
  • Review all changes before accepting them.
  • Avoid applying large edits blindly if the indicator already contains complex logic.

Good Prompt Examples


Limitations

AI-generated code may still require manual review. Possible limitations include:
  • The assistant may misunderstand incomplete logic.
  • Some generated code may need additional validation.
  • Runtime behavior should always be checked on the chart.
  • Complex indicator conversions may require several iterations.
  • External model availability depends on the connected provider and your API key.
Use the AI Assistant as a development helper, not as a replacement for testing. Always validate custom indicators before using them in live analysis or publishing them to the Marketplace.