Skip to content

Getting Started with Traderion

Welcome to Traderion! This comprehensive guide will walk you through setting up your trading bot environment step by step, with detailed explanations for beginners.

What You'll Need

Before we begin, make sure you have:

  1. A dedicated folder for your trading projects (we recommend naming it "Trading_bots")
  2. The Traderion package downloaded (traderion-latest.zip)
  3. Python 3.8 or higher installed (or Anaconda, which we recommend)
  4. Your Traderion account credentials (username and password)

Why Anaconda?

We recommend using Anaconda for several important reasons:

  • Simplified environment management: Anaconda makes it easy to create isolated Python environments with specific versions and dependencies
  • Pre-installed scientific packages: It comes with many data science libraries pre-installed
  • Cross-platform compatibility: Works consistently across Windows, macOS, and Linux
  • Easy package management: The conda package manager handles dependencies better than pip for scientific packages
  • GUI interface option: Anaconda Navigator provides a graphical interface for those who prefer not to use the command line

Step 1: Prepare Your Environment

Installation Instructions for Anaconda

On Windows

  1. Download and install Anaconda from Anaconda's official website.
  2. Follow the installation instructions provided during the setup wizard.
  3. Extract the downloaded zip file manually:
  4. Right-click on traderion-latest.zip and select "Extract All..."
  5. Choose your project folder (e.g., C:\Users\YourUsername\Desktop\Trading_bots\traderion-latest) and extract.

On Mac/Linux

  1. Open Terminal.
  2. Download and install Anaconda by running the following commands:
    # For macOS
    curl -O https://repo.anaconda.com/archive/Anaconda3-2023.07-2-MacOSX-x86_64.sh
    bash Anaconda3-2023.07-2-MacOSX-x86_64.sh
    
    # For Linux
    curl -O https://repo.anaconda.com/archive/Anaconda3-2023.07-2-Linux-x86_64.sh
    bash Anaconda3-2023.07-2-Linux-x86_64.sh
    
  3. Follow the installation instructions provided during the setup.
  4. Extract the downloaded zip file:
    mkdir traderion-latest
    unzip traderion-latest.zip -d traderion-latest
    

Create and Activate an Anaconda Environment

  1. Open the Anaconda Prompt on Windows or Terminal on Mac/Linux.
  2. Create a new environment:

    conda create --name traderion python=3.8
    
    This creates an isolated Python environment named "traderion" with Python 3.8.

  3. Activate the environment:

    conda activate traderion
    
    This switches your terminal to use the newly created environment.

  4. Go to your Trading_bots folder:

  5. On Windows:
    cd C:\Users\YourUsername\Desktop\Trading_bots\traderion-latest
    
    (Replace "YourUsername" with your actual Windows username) If this command was successful, you should see "(traderion) C:\Users\YourUsername\Desktop\traderion-latest>" in terminal
  6. On Mac/Linux:

    cd ~/Desktop/Trading_bots/traderion-latest
    
    (You can replace this path with wherever you saved the traderion-latest folder)

    The cd command (change directory) navigates to your project folder.

Step 2: Install Required Packages

  1. Install the Traderion package:

    pip install .
    
    This command installs the Traderion package from the current directory. The dot (.) tells pip to look for a setup.py file in the current directory.

  2. Install pandas (a required library):

    pip install pandas
    
    Pandas is a powerful data analysis library that our trading strategies use for calculations and data manipulation.

Step 3: Prepare Your Bot

Choose one of the example bots to start with:

On Windows:

# For client interaction bot
copy examples\clients_bot.py main.py

# Or for EMA strategy bot
copy examples\ema_bot.py main.py

On Mac/Linux:

# For client interaction bot
cp examples/clients_bot.py main.py

# Or for EMA strategy bot
cp examples/ema_bot.py main.py

This creates a main.py file that you'll use to run your bot. We're copying an example file to use as a starting point.

Step 4: Set Up Your Trading Session

  1. Go to https://simulator.traderion.com/
  2. Log in with your Traderion credentials
  3. Create a new session (from the Scenarios tab)
  4. If you're in a training session, your instructor will provide the session details
  5. Note the room ID from the URL (it looks like ?r=12345)
  6. This number is crucial as it connects your bot to the specific trading session

Step 5: Configure and Run Your Bot

  1. Open main.py in a text editor
  2. Find these lines at the bottom of the file:
    bot = MyBot('username', 'password', room_id)
    bot.run()
    
  3. Replace with your actual credentials:
  4. username: Your Traderion username
  5. password: Your Traderion password
  6. room_id: The number from your trading session URL

  7. Run your bot:

    python main.py
    
    This command executes your bot script, connecting it to the Traderion platform using your credentials.

Your bot is now running! You should see output in your terminal showing the bot's activity. To stop it, press CTRL + C.

Troubleshooting Common Issues

Connection Problems

  • Verify your internet connection
  • Double-check your username and password
  • Ensure the room ID is correct and the room is active

Package Installation Issues

  • Make sure your Python environment is activated
  • Try updating pip: pip install --upgrade pip
  • If you see permission errors, try adding --user to your pip install commands

Bot Not Responding ( or stuck in )

  • Ensure that the Traderion credentials are correct
  • Ensure that the training room that you are trying to connect to is running
  • Verify that your bot script has the correct imports
  • Ensure you're running the script from the correct directory

Next Steps

Downloading the Project

To download the Traderion package:

  1. Click here: Download Traderion Latest Version
  2. Save the file to your computer
  3. Extract the zip file to your Trading_bots folder
  4. Follow the installation instructions above