# Steps to create variables in DBot

**URL:** https://community.deriv.com/t/steps-to-create-variables-in-dbot/50063
**Category:** Deriv Bot
**Tags:** dbot
**Created:** [March 17, 2023, 10:46am UTC](https://community.deriv.com/t/steps-to-create-variables-in-dbot/50063 "2023-03-17T10:46:06Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Paola](https://sea2.discourse-cdn.com/flex020/user_avatar/community.deriv.com/paola/32/5512_2.png) [@Paola](https://community.deriv.com/u/Paola)
#### Post date: [March 17, 2023, 10:46am UTC](https://community.deriv.com/t/steps-to-create-variables-in-dbot/50063/1 "2023-03-17T10:46:06Z")

</div>

Hi Deriv Community! ✨

Here’s how you can add variables to your Dbot strategy. If you would like to know more about Dbot, please refer to this post:

> [@](#):
>
> Every strategy created with DBot consists of 6 steps as shown in the diagram below. First, two steps are executed only once when a strategy starts. The following 4 steps repeat indefinitely unless the user stops the strategy manually or by adding a condition to the last step. The 5th step (Sell a contract) is optional and can be removed from a strategy. If the 5th block is on the workspace, when the strategy is running it keeps executing the content of the on every tick. [[image]](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/e/e21e40426886402c41d680378557b884e6f2c3d1.png) Steps…

Once you’ve logged in to Dbot site [here](https://app.deriv.com/bot), you can head over to the left-side corner, you will see the **Blocks menu**.

 ![Bot menu](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/5/5d1680514a49b7446e8b7194521bc822c48a61d9.png)

From there, you can find the **utility** section and click on it. You will be able to see the variable and create your variable accordingly.

 ![Variables 2](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/e/e46ec91b12ff06f654ac66acef1073af89fee2c0.png)

You can enter any name for your variable and click on the **create** button. Once done, the newly created variable can now be used in your strategy. 👏 You can drag the variable to your Dbot workspace or click the ➕ sign.  
A value must be assigned to variable for the variable to function. Variable alone does not have any function.

 ![Create button](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/5/50ad8625e12976016ef2932cdef8d2e70c2ad76e.png)

 ![Variable to test](https://us1.discourse-cdn.com/flex020/uploads/deriv/original/2X/2/2a4d017d972fe4819c6a89903c2981ac9166218d.png)

If you have any questions, please visit our Help Centre or contact us via Live Chat and WhatsApp.

> **[Help Centre | Frequently Asked Questions | Deriv](https://deriv.com/help-centre)**
>
> Have questions on your trading account, how our trading platforms work or about trading? Read our FAQ’s or contact us through Deriv live chat.

---

<div class="post-metadata">

### Author: ![Paola](https://sea2.discourse-cdn.com/flex020/user_avatar/community.deriv.com/paola/32/5512_2.png) [@Paola](https://community.deriv.com/u/Paola)
#### Post date: [March 17, 2023, 10:49am UTC](https://community.deriv.com/t/steps-to-create-variables-in-dbot/50063/2 "2023-03-17T10:49:33Z")

</div>


