Creating a TickTrader Algo bot

Creating a TickTrader Algo bot

To create a TickTrader Algo bot in Visual Studio, please follow these steps:

  1. Open the installed Visual Studio 2022 application.

  2. Create a new project by selecting the following command in the Visual Studio menu: File > New > Poject.

  3. In the window you will see templates that will help you write your own trading bot or your own indicator. Otherwise, use Search for templates window (Alt+S) to find the following templates:

    • Sample Indicator
    • Sample Trade Bot
    • Empty Indicator
    • Empty Trade Bot
  4. Let's look at an example of creating a Sample Trade Bot:
    • Select Sample Trade Bot.
    • Specify a file name in the 'Project name' field (e.g. TradeBot1). This name will be given to the Package, which will contain the trading bot.
    • Click Create.
  5. The source code of such a simple Algo bot named TradeBot1 (for indicators it will be similar) is:
    • Solution named TradeBot1 (corresponds to the TradeBot1.sln file on disk).
    • One project with the same name TradeBot1 (corresponds to the TradeBot1.csproj file on the disk).
    • TradeBot1.cs file is the file that directly contains the logic of the executable bot.
    • README.md file is an optional file that can describe the bot’s behavior, its input parameters, etc.

  6. To view the location of files on the disk, you can call the command: Solution Explorer > Open Folder in the File Explorer.
  7. Select Build Solution command in the context menu.
  8. As we can see in the Output window an Algo package was created with the following name: Package name = TradeBot1.ttalgo. By default, it is created in the 'C:\Users\<UserName>\Documents\AlgoTerminal\AlgoRepository\' folder.


  9. If the Win terminal is installed on the same computer, it will see this package. For Algo Server, it will be necessary to download the package. If you need to transfer or share the package, you can find it in this path (as mentioned in the output file).
Thus, Algo packages that contain trading bots or indicators are files with the .ttalgo extension.

    • Related Articles

    • TickTrader Algo API

      Users can create their own trade bots and indicators using TickTrader.Algo.Api. To create a custom trade bot or indicator, please follow the next steps: Install Visual Studio Install TT Algo Visual Studio Extension Follow the instructions how to ...
    • Examples of TickTrader Algo bots

      Examples that will help you write your own bots can be found at: https://github.com/SoftFx/AlgoBots. This repository contains public indicators and bots for the Bot API: ImportAccountStateBot. This bot helps to integrate bots written on another ...
    • Running Algo bots on Algo server

      To launch a bot, you need to add an account to the Algo server and upload a package with a bot, which should be launched. To add a package, select Upload Package command from the Explorer > Algo Server context menu. Then, select the Add Bot Instance ...
    • MQL4 to TickTrader Algo Converter

      If you have Expert Advisors or Indicators written in MQL4 (for working in MetaTrader 4), then you can use a free converter to convert them into TickTrader Algo bots and indicators. The converter is located at: ...
    • Launching Algo indicators in TickTrader Win Terminal

      If the Ticktrader Win terminal is installed on the same machine on which you compiled the Algo package, then you can see the indicators (that are in the compiled package) in the Indicators List of this terminal. To add an Algo package to the specific ...