> For the complete documentation index, see [llms.txt](https://docs.algopro.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.algopro.us/tradingview-chrome-extension/automation-builder.md).

# Automation Builder

The **Automation Builder** helps you create the command messages needed for TradingView strategy alerts.

Instead of trying to automatically detect fields from TradingView, the Automation Builder now uses a simpler workflow:

```
Choose your platform
Enter your sizing
Enable the TP levels your strategy uses
Generate commands
Download the command text file
Copy each command into the matching TradingView strategy field
Create one TradingView alert
```

This makes the setup much easier and avoids issues caused by TradingView layout changes.

***

### What the Automation Builder Does

The Automation Builder creates command text for fields such as:

```
Open Long Command
Open Short Command
Long TP1 Command
Short TP1 Command
Long 100% Close Command
Short 100% Close Command
```

These commands can then be copied into your TradingView strategy settings.

After that, your TradingView alert should use:

```
{{strategy.order.alert_message}}
```

This allows your strategy to send the correct command message when an entry, take profit, stop loss, or close event triggers.

***

### Step 1: Choose Your Automation Platform

First, choose the platform you want to generate commands for.

Available options may include:

```
TradersPost
3Commas Signal Bot
Custom JSON
```

Choose the platform you plan to send TradingView alerts to.

If you choose **3Commas Signal Bot**, you will also need to enter:

```
3Commas Secret
3Commas Bot UUID
Max Lag
```

Keep your secret and bot UUID private.

***

### Step 2: Enter Entry Sizing

The entry commands are always included.

These fields are always generated:

```
Open Long Command
Open Short Command
```

Choose your entry sizing mode:

```
Quantity / Contracts / Coins / Shares
Percent of Equity
```

Then enter your **Entry Amount**.

Example:

```
Entry Sizing Mode: Quantity / Contracts / Coins / Shares
Entry Amount: 1
```

This would generate entry commands using a quantity of `1`.

***

### Step 3: Enable Take Profit Levels

TP1–TP5 are optional.

Enable only the take profit levels your strategy actually uses.

Each TP level has:

```
Enable checkbox
Amount input
```

For example:

```
TP1 enabled: 25
TP2 enabled: 25
TP3 enabled: 25
TP4 enabled: 25
TP5 disabled
```

If TP1 is enabled, the Automation Builder generates both:

```
Long TP1 Command
Short TP1 Command
```

If TP2 is enabled, it generates both:

```
Long TP2 Command
Short TP2 Command
```

This continues through TP5.

***

### Step 4: 100% Close Commands

The 100% close commands are always included.

These fields are always generated:

```
Long 100% Close Command (SL / Swing / Early / Session)
Short 100% Close Command (SL / Swing / Early / Session)
```

These are used for full-position exits such as:

```
Stop loss
Swing exit
Early close
Session close
Full close conditions
```

You do not need to enable these manually.

***

### Step 5: Generate Commands

After choosing your settings, click:

```
Generate Commands
```

AlgoPro will generate command text for:

```
Open Long
Open Short
Enabled TP levels
Long 100% Close
Short 100% Close
```

The generated commands will appear in the **Generated Command Fields** section.

You can review or edit the command text before downloading it.

***

### Step 6: Download the Command Text File

Click:

```
Download Command Text File
```

This downloads a `.txt` file containing each command field name and its matching command value.

The file will look something like this:

```
AlgoPro Automation Commands
Generated: [date/time]
Platform: TradersPost

TradingView Alert Message Body:
{{strategy.order.alert_message}}

Copy each value into the matching TradingView strategy command field.
------------------------------------------------------------

Open Long Command
{generated command here}

Open Short Command
{generated command here}

Long TP1 Command
{generated command here}

Short TP1 Command
{generated command here}

Long 100% Close Command (SL / Swing / Early / Session)
{generated command here}

Short 100% Close Command (SL / Swing / Early / Session)
{generated command here}
```

***

### Step 7: Copy Commands Into TradingView

Open your strategy settings in TradingView.

Go to the command section of your strategy settings.

Copy each command from the downloaded text file into the matching field.

Example:

```
Open Long Command → paste the Open Long command
Open Short Command → paste the Open Short command
Long TP1 Command → paste the Long TP1 command
Short TP1 Command → paste the Short TP1 command
Long 100% Close Command → paste the Long 100% Close command
Short 100% Close Command → paste the Short 100% Close command
```

Only copy commands into fields your strategy actually has.

If your strategy does not use TP5, do not enable TP5 in Automation Builder.

***

### Step 8: Create the TradingView Alert

After the command fields are filled in your strategy settings, create a TradingView alert.

In the alert message/body, use:

```
{{strategy.order.alert_message}}
```

This is important.

Do not paste the generated command directly into the TradingView alert message box. The commands belong inside the strategy settings. The alert message should use the placeholder above.

***

### Copy TradingView Alert Message

The Automation Builder includes a button:

```
Copy TradingView Alert Message
```

This copies:

```
{{strategy.order.alert_message}}
```

Paste that into your TradingView alert message body.

***

### Run Automation Readiness Check

Click:

```
Run Automation Readiness Check
```

This checks your setup and gives you a readiness score.

It reviews things like:

```
Whether commands were generated
Whether entry amount is set
Whether TP levels are enabled
Whether 3Commas fields are filled if using 3Commas
Whether the TradingView alert message reminder is correct
```

A good readiness score does not guarantee live execution will work perfectly, but it helps catch common setup mistakes.

***

### Important Notes

The Automation Builder does not place trades by itself.

It does not connect directly to your broker.

It only helps create command text for your TradingView strategy alert workflow.

Always test in paper trading, demo mode, or a safe environment before using live automation.
