2.1 KiB
2.1 KiB
How to Run
Prerequisites
- MetaTrader 5 Terminal: You need to have the MetaTrader 5 terminal installed. You can download it from the official website of your broker.
- Python 3.x: You need to have Python 3.x installed. You can download it from the official Python website.
- Python Libraries: You need to have the following Python libraries installed:
pandas,scikit-learn,skl2onnx,onnxruntime.
Installation
-
Clone the repository to your local machine.
-
Install the required Python libraries using pip:
pip install -r requirements.txt
Running the project
-
Export Price Data:
- Open the MetaEditor in your MetaTrader 5 terminal.
- Open the
Export_EURUSD_History.mq5file from theseparate_codesdirectory. - Compile the script.
- Run the script on a EUR/USD chart. This will create a
raw_price_data.csvfile in theMQL5/Filesdirectory of your MetaTrader 5 installation. The location of this directory can vary depending on your installation. You can find the location of theMQL5directory by going toFile > Open Data Folderin your MetaTrader 5 terminal. - Copy the
raw_price_data.csvfile to the root of the project directory.
-
Train the Models:
-
Navigate to the
separate_codesdirectory in your terminal. -
Run the
create_benchmark_model.pyscript to create the benchmark model.python create_benchmark_model.py -
Run the
Model_Development.pyscript to train the neural network model.python Model_Development.py
-
-
Run the Expert Advisors:
- Copy the
Benchmark_Model_EA.mq5andNeural_Network_Trader_EA.mq5files from theseparate_codesdirectory to theMQL5/Expertsdirectory of your MetaTrader 5 installation. - Copy the
benchmark_logistic_model.onnxandtrading_neural_network_model.onnxfiles from theseparate_codesdirectory to theMQL5/Filesdirectory of your MetaTrader 5 installation. - Open the MetaEditor and compile the EAs.
- Attach the EAs to a EUR/USD chart in your MetaTrader 5 terminal.
- Copy the