Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
A general-purpose, flexible, and easy-to-use simulator alongside an OpenAI Gym trading environment for MetaTrader 5 trading platform (Approved by OpenAI Gym)
| Date | Stars |
|---|---|
| 2026-07-24 | 522 |
| 2026-07-25 | 523 |
| 2026-07-28 | 523 |
| 2026-07-30 | 523 |
| 2026-08-06 | 523 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# gym-mtsim: OpenAI Gym - MetaTrader 5 Simulator `MtSim` is a simulator for the [MetaTrader 5](https://www.metatrader5.com) trading platform alongside an [OpenAI Gym](https://github.com/openai/gym) environment for reinforcement learning-based trading algorithms. `MetaTrader 5` is a **multi-asset** platform that allows trading **Forex**, **Stocks**, **Crypto**, and Futures. It is one of the most popular trading platforms and supports numerous useful features, such as opening demo accounts on various brokers. The simulator is separated from the Gym environment and can work independently. Although the Gym environment is designed to be suitable for RL frameworks, it is also proper for backtesting and classic analysis. The goal of this project was to provide a *general-purpose*, *flexible*, and *easy-to-use* library with a focus on *code readability* that enables users to do all parts of the trading process through it from 0 to 100. So, `gym-mtsim` is not just a testing tool or a Gym environment. It is a combination of a **real-world** simulator, a **backtesting** tool with *high detail visualization*, and a **Gym environment** appropriate for RL/classic algorithms. **Note:** For beginners, it is recommended to check out the [gym-anytrading](https://github.com/AminHP/gym-anytrading) project. ## Prerequisites ### Install MetaTrader 5 Download and install MetaTrader 5 software from [here](https://www.metatrader5.com/en/download). Open a demo account on any broker. By default, the software opens a demo account automatically after installation. Explore the software and try to get familiar with it by trading different symbols in both **hedged** and **unhedged** accounts. ### Install gym-mtsim #### Via PIP ```bash pip install gym-mtsim ``` #### From Repository ```bash git clone https://github.com/AminHP/gym-mtsim cd gym-mtsim pip install -e . ## or pip install --upgrade --no-deps --force-reinstall https://github.com/AminHP/gym-mtsim/archive/main.zip ``` ### Install stable-baselines3 This package is required to run some examples. Install it from [here](https://github.com/DLR-RM/stable-baselines3#installation). ## Components ### 1. SymbolInfo This is a data class that contains the essential properties of a symbol. Try to get fully acquainted with [these properties](https://github.com/AminHP/gym-mtsim/blob/main/gym_mtsim/metatrader/symbol.py) in case they are unfamiliar. There are plenty of resources that provide good explanations. ### 2. Order This is another data class that consists of information of an order. Each order has the following properties: > `id`: A unique number that helps with tracking orders. > > `type`: An enum that specifies the type of the order. It can be either **Buy** or **Sell**. > > `symbol`: The symbol selected for the order. > > `volume`: The volume chose for the order. It can be a multiple of *volume_step* between *volume_min* and *volume_max*. > > `fee`: It is a tricky property. In MetaTrader, there is *no* such concept called fee. Each symbol has bid and ask prices, the difference between which represents the **fee**. Although MetaTrader API provides these bid/ask prices for the recent past, it is not possible to access them for the distant past. Therefore, the **fee** property helps to manage the mentioned difference. > > `entry_time`: The time when the order was placed. > > `entry_price`: The **close** price when the order was placed. > > `exit_time`: The time when the order was closed. > > `exit_price`: The **close** price when the order was closed. > > `profit`: The amount of profit earned by this order so far. > > `margin`: The required amount of margin for this order. > > `closed`: A boolean that specifies whether this order is closed or not. ### 3. MtSimulator This is the core class that simulates the main parts of MetaTrader. Most of its public properties and methods are explained here. But feel free to take a look at the complete [source code](https://github.com/AminHP/gym-mtsim/b
Excerpt of 27,257 characters
Read on GitHubMohammad Amin Haghpanah · @koala-team
23
4
2
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:b0dce5e13cd4293d, topic:reinforcement-learning, topic:openai-gym, readme:reinforcement learning
matched fp:b0dce5e13cd4293d, topic:trading