GithubHelp home page GithubHelp logo

mikenlanggio / monn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zsunflower/monn

0.0 0.0 0.0 1.22 MB

A trading bot using MetaTrader5 API with ability run multiple strategies, analyze multiple timeframes simultaneously.

License: GNU General Public License v3.0

Python 96.54% Jupyter Notebook 3.46%

monn's Introduction

Trading Bot using MetaTrader5 API

This repository contains a trading bot that utilizes the MetaTrader5 API for automated trading in the financial markets. The bot is designed to execute trades based on pre-defined strategies and market conditions.

Table of Contents

Features

  1. Multiple Strategies: You can configure and run multiple strategies simultaneously. Each strategy will be analyzed independently, and the bot will make trading decisions accordingly.
  2. Multiple Timeframes: The bot can analyze multiple timeframes simultaneously. By specifying different timeframes in the config file, the bot will gather data from those timeframes to make more informed trading decisions.
  3. Backtesting: You can backtest a strategy before running it live. The bot provides a backtesting module that allows you to test your strategies against historical data and evaluate their performance(using MT5 notebook to download historical data).
  4. Parameter Tuning: The bot provides flexibility in tuning strategy parameters. You can tuning the parameters to optimize your strategies based on market conditions and historical performance.
  5. Custom Strategy: The bot is designed to make it easy to add custom strategies. You can create your own strategy and adding it to the config file.

Prerequisites

Before using the trading bot, make sure you have the following:

  • MetaTrader 5 platform installed on your computer
  • Active trading account with a broker that supports MetaTrader 5
  • Basic knowledge of trading concepts and strategies

Installation

  1. Clone the repository to your local machine:
    git clone https://github.com/Zsunflower/MetaTrader5-auto-trading-bot
  2. Install the required dependencies:
    pip install -r requirements.txt
  3. Install the TA-Lib library by following the installation guide provided on the TA-Lib GitHub repository.

Configuration

  1. Log in to your MetaTrader 5 account using the MetaTrader 5 platform.
  2. Edit the 'configs/exchange_config.json' file and update the following:
    • account: Your MetaTrader 5 account number.
    • server: The server name for your MetaTrader 5 account.

Usage

  1. Edit all strategies's parameters in 'configs/symbols_trading_config.json' file.
  2. Start the trading bot in live mode by running the following command:
    python main.py --mode live --exch mt5 --exch_cfg_file configs/exchange_config.json --sym_cfg_file configs/symbols_trading_config.json
    
  3. For backtesting a strategy, use the following command:
    python main.py --mode test --exch mt5 --exch_cfg_file configs/exchange_config.json --sym_cfg_file <configs/break_strategy_config.json> --data_dir <path to historical candle data>
    

Backtest result of each strategy will be output like this: Screenshot 1 Screenshot 1

The bot will generate an HTML file that visualizes the generated orders in 'debug' folder. View example

  1. For tuning a strategy's parameters, use the following command:
    python tuning.py --sym_cfg_file <tuning_configs/break_strategy_tuning_config.json> --data_dir <path to historical candle data>
    

Disclaimer

Trading in financial markets involves risks, and the trading bot provided in this project is for educational and informational purposes only. The use of this bot is at your own risk, and the developers cannot be held responsible for any financial losses incurred.

monn's People

Contributors

zsunflower avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.