AminHP / gym-mtsim

A general-purpose, flexible, and easy-to-use simulator alongside an OpenAI Gym trading environment for MetaTrader 5 trading platform (Approved by OpenAI Gym)
MIT License
412 stars 101 forks source link

Error running using the environment #44

Closed Seanman519 closed 3 months ago

Seanman519 commented 9 months ago

Hi Could i please be helped with this issue:

Traceback (most recent call last): File "c:\Users\seanm\OneDrive\Desktop\Test\test.py", line 2, in import gym_mtsim File "C:\Users\seanm\OneDrive\Desktop\Test\sean\lib\site-packages\gym_mtsim-1.3.0-py3.10.egg\gym_mtsim__init__.py", line 13, in 'original_simulator': MtSimulator(symbols_filename=FOREX_DATA_PATH, hedge=True), File "C:\Users\seanm\OneDrive\Desktop\Test\sean\lib\site-packages\gym_mtsim-1.3.0-py3.10.egg\gym_mtsim\simulator\mt_simulator.py", line 37, in init if not self.load_symbols(symbols_filename): File "C:\Users\seanm\OneDrive\Desktop\Test\sean\lib\site-packages\gym_mtsim-1.3.0-py3.10.egg\gym_mtsim\simulator\mt_simulator.py", line 73, in load_symbols self.symbols_info, self.symbols_data = pickle.load(file) File "C:\Users\seanm\OneDrive\Desktop\Test\sean\lib\site-packages\pandas-2.1.1-py3.10-win-amd64.egg\pandas\core\internals\blocks.py", line 2400, in new_block return klass(values, ndim=ndim, placement=placement, refs=refs) TypeError: Argument 'placement' has incorrect type (expected pandas._libs.internals.BlockPlacement, got slice)

i suspected pandas , tried to uninstall the one i had and used the setup.py but still same problem

please help

AminHP commented 9 months ago

Please try installing pandas version 1.5.3

Seanman519 commented 9 months ago

thanks , its working now with that version,
may i ask if its possible to use a saved model on a live trading account, get the model to utilize metatrader5 api , i have been trying all day to get to utilize my saved model on live demo account with the metatrader5 python api but i have little success.

Any guides or tips about this?

AminHP commented 3 months ago

Hello @Seanman519 , apologies for missing your comment. I have done that a long time ago. I used some APIs provided in the metatrader5 python package to receive the real-time data from my MetaTrader account. Afterward, I could create the signal features, prepare the environment, and obtain the agent's decision in the env. The final stage was sending that decision to the MetaTrader account through the python APIs.

Seanman519 commented 3 months ago

Hello World

Thanks so much for the response, i actually took upon trying to expand from your repo,it was really motivation and aided in into working on https://github.com/Seanman519/RLBOT, you are amongst my biggest inspirations.

Anyway Thanks for the response.