# Create your trading bot (step by step) ⌛3min

Create your Ichimoku trading bot!\
\
[<mark style="background-color:blue;">**→ You can also watch the video tutorial at the bottom of this page.**</mark>](#video-tutorial)

{% hint style="info" %}
**Prerequisite:**

* Have a Tradingview account
* &#x20;Have obtained access to the **"Ichimoku Premium \[AlgoRider]" indicator (trial or subscription version)**
* Have a Mizar account
* Have connected at least 1 exchange account to the Mizar application
  {% endhint %}

> ***Attention:  The Webhook feature that allows alerting and strategy automation is not available in Tradingview's free plan, you will need at least the first paid plan (Pro). If you do not yet have a paid Tradingview plan you can*** [***go through our referral link and benefit from $ 15 offered***](https://fr.tradingview.com/gopro/?share_your_love=AlgoRider_Fr)***.***

## 1. Add the indicator to your chart 【🕒 20 Seconds】

Go to the Tradingview website at the following link: <https://www.tradingview.com/chart> and place the chart in the Timeframe 15 minutes (M15). To view and use the indicator, **click on**:

1. **"Indicators"** to display the pop-up of indicators and strategies (keyboard key "/")
2. **"Invitation Only Scripts"** at the bottom left
3. **"Ichimoku Strategy \[AlgoRider]"** the name of the indicator

## 2. Access the settings of the indicator【🕒 10 Seconds】

To change settings, you have 2 choices:

1. **Click on the gear symbol** in the indicator title at the top left of the window
2. **Double-click on an element of the indicator** (data table, rows, labels, boxes)

## 3. Backtest Settings  - Optional 【 🕒 10 Seconds】

**Recommended: keep the default backtest settings.**\
\
You are free to change the percentage of fees corresponding to your exchange for a more accurate Backtest. You can also change the start and end dates to analyze this configuration over different time periods.

## 4. Entry Conditions【🕒 10 Seconds】

&#x20;Select the following 2 entry conditions:

* **Cloud Breakouts | Max Distance % = 15**
* **Tenkan x Kijun Crossings | Signal Type = Neutral**

<figure><img src="/files/6ZHJaBxb6wcaMM0qowPL" alt=""><figcaption></figcaption></figure>

## 5. Risk Management 【 🕒 10 Seconds】

Keep **"Hedge Mode"** checked and set only the following TP and SL values:

1. Check **SL** and enter **SL = 4**
2. Check **TP1** and enter **% Size = 100, L = 1.25, S = 1.25**

<figure><img src="/files/7f6bRyPd5xOMtvGgUbUQ" alt="" width="494"><figcaption></figcaption></figure>

## 6. Alerts  - One-Way Mode (2 Bots) 【🕒 2 Minutes】

{% hint style="info" %} <mark style="color:orange;">**If you want to configure only 1 Bot in Hedge Mode, go to the next step (step 7).**</mark>
{% endhint %}

You will create **1 Long Bot** and **1 Short Bot** on Mizar, and then complete on Tradingview the section "Alerts" of the indicator before creating and configuring the alerts.

**A) Go to your Mizar account at the following link:** [**https://app.mizar.com**](https://app.mizar.com)

1. Go to "DCA-BOTS" then "CREATE NEW BOT"
2. Enter a **title** and optionally a **description**
3. Choose the **"Side": Long**
4. Select **"Start Order Type" = Market** and **"Start Order Condition" = Tradingview (webhook / API)**
5. Select **"Market" = FUTURES**,  **"Mode" = One-Way** and your **Exchange**
6. Select **"Quote Asset" = USDT** and **"Pairs" = BTC/USDT** and **ETH/USDT**
7. Enter **"Take Profits" = 1.25**
8. Check **"Stop Loss"**, enter **"Stop Loss" = 4** and **"Stop Loss Timeout" = 0**
9. Uncheck **"Safety Orders Settings"**
10. Finish by clicking on **"CREATE BOT"**
11. **Repeat the operation in step \[1.]** to create a second Bot in the opposite direction to the first: **Short**
12. **Note/Copy the IDs** of the Long and Short Bots in "DCA-BOTS"(<https://app.mizar.com/dashboard/dca-bots/bots>)
13. **Create and copy the API key linked to your Mizar account** (<https://app.mizar.com/dashboard/settings/API>)

**B) Return to your Tradingview page and then to the indicator settings in the Alerts section:**

1. **Paste your API key** linked to your Mizar account in the KEY field
2. **Paste your Bot Long ID** into the Long ID field
3. **Paste your Bot Short ID** into the Short ID field
4. **Check the "Show Alert messages" box** to view the messages at the bottom right of the graph and check that there are no errors
5. **Save the settings in "Defaults"** at the bottom left of the settings window, then click **"Save as Defaults"**.

<figure><img src="/files/7hrGkjzrRQDEYLUUp6oP" alt="" width="514"><figcaption></figcaption></figure>

<figure><img src="/files/NdWd6xlOnxPK21BWx06O" alt="" width="518"><figcaption></figcaption></figure>

**C) Configure a single alert that will trigger the 6 types of orders (ENTRY LONG, ENTRY SHORT, EXIT LONG, EXIT SHORT, EDIT SL LONG, EDIT SL SHORT):**

<figure><img src="/files/qHiHUwgbT8HU1xkQAkpF" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/LaxpcZ2KmEMmnTZvhtUO" alt="" width="447"><figcaption></figcaption></figure>

<figure><img src="/files/klv0g3jVWpEh0WYib21A" alt="" width="441"><figcaption></figcaption></figure>

1. Configure your alerts by clicking on **Alert** (keyboard key ALT + A)
2. Condition: Select the name of the indicator
3. In the following field, select **"Any alert() function call"**
4. Enter a **name** for the alert
5. Go to the **"Notifications" tab** and check **"Webhook URL"**. Then enter the Mizar Webhook URL: <https://api.mizar.com/api/v1/dca-bots/trading-view/execute-command>
6. Finish by clicking on **"Create"**

## 7. Alertes  - Hedge Mode (1 Bot) 【🕒 2 Minutes】

{% hint style="info" %} <mark style="color:orange;">**Do not perform this step if you have already completed step 6.**</mark>
{% endhint %}

You will create **1 single Bot (Bi-directional)** on Mizar, then complete on Tradingview the "Alerts" section of the indicator before creating and configuring the alerts:

A) Go to your Mizar account at the following link <https://app.mizar.com>

1. **"DCA-BOTS"** then **"CREATE NEW BOT"**
2. Enter a **title** and optionally a **description**
3. Select **"Market" = FUTURES**, **"Mode" = Hedge** and your **Exchange**
4. Select **"Start Order Type" = Market** and **"Start Order Condition" = Tradingview (webhook / API)**
5. Choose the **"Side": Long/Short**
6. Select **"Quote Asset" = USDT** and **"Pairs" = BTC/USDT** and **ETH/USDT**
7. Enter **"Take Profits"= 1.25**
8. Check **"Stop Loss"**, enter **"Stop Loss" = 4** et **"Stop Loss Timeout" = 0**
9. Uncheck **"Safety Orders Settings"**
10. Finish by clicking on **"CREATE BOT"**
11. **Note/Copy Recoverable Bot ID** in DCA-BOTS (<https://app.mizar.com/dashboard/dca-bots/bots>)
12. **Create and copy the API key linked to your Mizar account** (<https://app.mizar.com/dashboard/settings/API>)

**B) Return to your Tradingview page and then to the indicator settings in the Alerts section:**

1. **Paste your API key** linked to your Mizar account in the **KEY field**
2. **Paste the ID** of your Bot in the Long ID **and** Short ID fields, **the ID must absolutely be identical in these 2 fields.**
3. **Check the "Show Alert messages" box** to view the messages at the bottom right of the graph and check that there are no errors
4. **Save the settings in "Defaults"** at the bottom left of the settings window, then click on **"Save as Default Settings"**.

<figure><img src="/files/QIZw9m3gQVu9JBLNk8qf" alt="" width="514"><figcaption></figcaption></figure>

<figure><img src="/files/HCxgSvZ4b4M15OmF2oZF" alt="" width="518"><figcaption></figcaption></figure>

**C) Configure a single alert that will trigger the 6 types of orders (ENTRY LONG, ENTRY SHORT, EXIT LONG, EXIT SHORT, EDIT SL LONG, EDIT SL SHORT):**

<figure><img src="/files/ovCqibGvW78SYDtxZMNe" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/1Jq4Bir9NCsoND5FWLBG" alt="" width="438"><figcaption></figcaption></figure>

<figure><img src="/files/INumHTnRTdyKcnwnrekr" alt="" width="442"><figcaption></figcaption></figure>

1. Configure your alerts by clicking on **Alert** (keyboard shortcuts ALT + A)
2. Condition: Select the name of the indicator
3. In the field following the name of the flag, select **"Any call to alert()"**
4. Enter a **name** for the alert
5. Go to the **"Notifications" tab** and check **"Webhook URL"**. Then enter the Mizar Webhook URL: <https://api.mizar.com/api/v1/dca-bots/trading-view/execute-command>
6. Finish by clicking on **"Create"**

### \[VIDEO TUTORIAL]

{% embed url="<https://www.youtube.com/watch?v=AzmLd8-a_VU>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.algorider.io/trade-automation-trading-bot/create-your-trading-bot-step-by-step-3min.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
