> ## 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.

# How to Work with AI Tools

The AI Assistant can use different tools depending on your task.

You can keep the tool selector in **Auto** mode or manually choose a specific tool when you want a more focused answer.

## Tool selector

<video
  autoPlay
  muted
  loop
  playsInline
  className="w-full rounded-2xl"
  style={{
border: "1.9px solid rgba(179, 200, 224, 0.08)",
objectFit: "fill",
display: "block"
}}
  src="https://mintcdn.com/takeprofit-a5dc0462/sFoevWM37x_HuoUo/images/guide/platform/AI/9.1_AI_Tools.mp4?fit=max&auto=format&n=sFoevWM37x_HuoUo&q=85&s=714bc3504e151cdb344c05bba2316e87"
  data-path="images/guide/platform/AI/9.1_AI_Tools.mp4"
/>

The tool selector controls which assistant skill is used for the current prompt.

By default, it is set to **Auto**. In Auto mode, the assistant decides which tool is most relevant.

You can manually select a tool when:

* You want a focused answer
* The assistant used the wrong tool
* You are working on one specific workflow
* You do not want the assistant to switch context automatically

Available tools may include:

* **Technical Analysis**
* **Indie Scripts**
* **Platform Guide**
* **Risk & Position Sizing**

## Technical Analysis

Use **Technical Analysis** to analyze charts, indicators, chart patterns, key levels, and market structure.

This tool is useful for:

* Trend analysis
* Support and resistance
* Breakouts and pullbacks
* Indicator confirmation
* Divergences
* Chart patterns
* Fibonacci levels
* Channels
* Multi-timeframe context
* Bullish and bearish scenarios

### Best prompts

```text theme={null}
Analyze the current trend structure and key support and resistance levels.
```

```text theme={null}
Give me bullish and bearish scenarios for this chart with confirmation and invalidation levels.
```

```text theme={null}
Is this move more likely a reversal or a pullback?
```

```text theme={null}
Find the main chart patterns and explain which levels confirm or invalidate them.
```

```text theme={null}
Compare the current 1H structure with the daily trend.
```

### Best practices

* Attach the chart widget before asking for analysis.
* Mention the timeframe if it matters.
* Ask for scenarios instead of one-direction predictions.
* Request confirmation and invalidation levels.
* Ask the assistant to separate structure, levels, indicators, and risks.
* Start a new thread when switching to another ticker.

### Chart actions and suggestions

<video
  autoPlay
  muted
  loop
  playsInline
  className="w-full rounded-2xl"
  style={{
border: "1.9px solid rgba(179, 200, 224, 0.08)",
objectFit: "fill",
display: "block"
}}
  src="https://mintcdn.com/takeprofit-a5dc0462/sFoevWM37x_HuoUo/images/guide/platform/AI/9.3_AI_Actions.mp4?fit=max&auto=format&n=sFoevWM37x_HuoUo&q=85&s=a640d02cda0ae2275963befe16ec0143"
  data-path="images/guide/platform/AI/9.3_AI_Actions.mp4"
/>

After analysis, the assistant may suggest actions that can be applied to your chart.

These may include:

* Adding horizontal levels
* Adding trendlines
* Adding rectangles or channels
* Adding Fibonacci retracement
* Marking ABCD or XABCD patterns
* Updating existing drawings
* Removing selected drawings

Each action appears as a card. You can review, accept, or reject it.

<Note>
  Chart actions are applied only to a matching chart. If the ticker does not match, open the correct chart first.
</Note>

#### Chart suggestions

<video
  autoPlay
  muted
  loop
  playsInline
  className="w-full rounded-2xl"
  style={{
border: "1.9px solid rgba(179, 200, 224, 0.08)",
objectFit: "fill",
display: "block"
}}
  src="https://mintcdn.com/takeprofit-a5dc0462/sFoevWM37x_HuoUo/images/guide/platform/AI/9.4_AI_Suggestions.mp4?fit=max&auto=format&n=sFoevWM37x_HuoUo&q=85&s=2fb0d131463a7a0cc3cbb7227b9e260b"
  data-path="images/guide/platform/AI/9.4_AI_Suggestions.mp4"
/>

Chart suggestions are follow-up prompts generated by the assistant after an analysis.

They help you continue working with the same chart context without writing a new prompt from scratch. For example, after a risk or Fibonacci-based analysis, the assistant may suggest next steps such as monitoring the entry zone, setting price alerts, or checking the market structure.

Click a suggestion to send it as the next prompt. The assistant will continue from the current chart context and use the selected suggestion as the next task.

## Indie Scripts

Use **Indie Scripts** to create, modify, debug, or explain Indie® indicators and strategies.

This tool is useful for:

* Generating new Indie® scripts
* Fixing compilation errors
* Explaining existing code
* Adding inputs and parameters
* Adding alert conditions
* Adding plots, arrows, labels, and background highlights
* Refactoring scripts
* Converting Pine Script ideas to Indie®
* Searching Indie® documentation

### Best prompts

```text theme={null}
Write an RSI indicator with divergence detection and alerts.
```

```text theme={null}
This Indie script does not compile. Explain the error, fix the code, and keep the original logic unchanged.
```

```text theme={null}
Add an ATR-based stop to this strategy.
```

```text theme={null}
Convert this Pine Script idea to Indie.
```

```text theme={null}
Add a parameter to control the lookback period from the UI.
```

```text theme={null}
Highlight the chart background green when the condition is true.
```

### Best practices

* Specify whether you need an indicator or a strategy.
* Include the full error message when debugging.
* Ask the assistant to preserve original logic if needed.
* Describe required inputs, plots, alerts, and visual elements.
* Ask for a small fix if you do not want a full rewrite.
* Use a separate thread for each script.

### Controlled code edits

Use prompts like this when you want minimal changes:

```text theme={null}
Fix only the compilation error. Do not change calculations, plots, or alert behavior.
```

```text theme={null}
Refactor this script for readability, but do not change the signal logic.
```

```text theme={null}
Add alerts to this script and keep all existing plots unchanged.
```

## Platform Guide

Use **Platform Guide** to search platform documentation, understand features, and get step-by-step instructions.

This tool is useful for:

* Platform navigation
* Chart settings
* Alerts
* Webhooks
* Drawing tools
* Widget Hub
* Watchlists
* Screeners
* Backtesting
* Sharing charts
* Indie® documentation lookup

### Best prompts

```text theme={null}
How do I create a webhook alert?
```

```text theme={null}
Where do I save a chart template?
```

```text theme={null}
How do I share a chart with annotations?
```

```text theme={null}
How do I add a widget to my workspace?
```

```text theme={null}
Explain how to set up Telegram alerts step by step.
```

### Best practices

* Ask for a specific workflow.
* Mention the feature name if you know it.
* Ask for step-by-step instructions.
* Ask for links to relevant documentation if needed.
* Use this tool when you want platform guidance instead of market analysis.

### Good prompt format

```text theme={null}
Explain how to [platform task] step by step.
```

Example:

```text theme={null}
Explain how to create a multi-condition alert step by step.
```

## Risk & Position Sizing

Use **Risk & Position Sizing** to calculate trade size, stop-loss distance, risk exposure, and basic risk/reward scenarios.

This tool is useful for:

* Position size calculations
* Stop-loss distance
* Risk per trade
* Risk/reward ratio
* Account-based sizing
* Scenario comparison
* Kelly criterion explanations

### Best prompts

```text theme={null}
Calculate position size for a $10,000 account with 1% risk and a stop-loss 2.5% away.
```

```text theme={null}
My entry is 120, stop-loss is 114, and I want to risk $200. What position size should I use?
```

```text theme={null}
Compare risk/reward if my target is 135 and my stop is 114.
```

```text theme={null}
Explain the Kelly criterion in simple terms.
```

```text theme={null}
Calculate position size if I risk 0.5% of my account and the stop is below the recent swing low.
```

### Best practices

* Provide account size.
* Provide risk percentage or fixed risk amount.
* Provide entry price.
* Provide stop-loss price.
* Provide target price if you want risk/reward.
* Specify whether you trade stocks, crypto, futures, or another instrument.
* Treat calculations as planning support, not trading advice.

<Warning>
  Risk and position sizing outputs are educational and analytical. Always verify calculations before placing any trade.
</Warning>

## General best practices

Use clear, focused prompts.

### Too broad

```text theme={null}
AAPL
```

### Better

```text theme={null}
Analyze AAPL on the 1H chart. Focus on structure, support and resistance, and bullish/bearish scenarios with invalidation levels.
```

### Too broad

```text theme={null}
Fix this script.
```

### Better

```text theme={null}
This Indie script does not compile. Explain the error, fix the code, and keep the original logic unchanged.
```

### Too broad

```text theme={null}
How much should I buy?
```

### Better

```text theme={null}
Calculate position size for a $5,000 account, 1% risk, entry at 42.50, and stop-loss at 40.80.
```

## Troubleshooting

<AccordionGroup>
  <Accordion title="The answer is too generic">
    Attach the relevant widget and make the prompt more specific.

    Include ticker, timeframe, goal, and expected output.
  </Accordion>

  <Accordion title="The assistant did not analyze my chart">
    Check that you attached the chart widget before sending the prompt.

    If several charts are open, make sure you selected the correct one.
  </Accordion>

  <Accordion title="The assistant used the wrong tool">
    Choose the required tool manually from the tool selector and send the prompt again.
  </Accordion>

  <Accordion title="A chart action was not applied">
    Check that the correct chart is open and that the ticker matches the action context.
  </Accordion>

  <Accordion title="The assistant asks a clarifying question">
    Select one of the suggested options or rewrite your prompt with more detail.
  </Accordion>

  <Accordion title="The context is almost full">
    Start a new thread, attach the relevant widget again, and restate the current goal.
  </Accordion>

  <Accordion title="You see a rate-limit error">
    The AI Assistant currently allows up to 5 requests per minute per user.

    Wait until the limit resets and try again.
  </Accordion>

  <Accordion title="The generated Indie® code does not compile">
    Send the full script, the full error message, and explain what the script is supposed to do.

    Ask the assistant to preserve the original logic if needed.
  </Accordion>

  <Accordion title="The assistant changed too much code">
    Ask for a smaller edit.

    Example:

    ```text theme={null}
    Do not rewrite the full script. Fix only the broken function and explain the change.
    ```
  </Accordion>
</AccordionGroup>
