diff --git a/howtorun.md b/howtorun.md index b2a1bb5..c2ec432 100644 --- a/howtorun.md +++ b/howtorun.md @@ -2,29 +2,30 @@ ## Prerequisites -* MetaTrader 5 terminal installed. -* Python 3.x installed. -* The following Python libraries installed: `pandas`, `scikit-learn`, `skl2onnx`, `onnxruntime`. +* **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 -1. Clone the repository to your local machine. -2. Install the required Python libraries using pip: +1. **Clone the repository** to your local machine. +2. **Install the required Python libraries** using pip: ```bash - pip install pandas scikit-learn skl2onnx onnxruntime + pip install -r requirements.txt ``` ## Running the project 1. **Export Price Data**: * Open the MetaEditor in your MetaTrader 5 terminal. - * Open the `Export_EURUSD_History.mq5` file. + * Open the `Export_EURUSD_History.mq5` file from the `separate_codes` directory. * Compile the script. - * Run the script on a EUR/USD chart. This will create a `raw_price_data.csv` file in the `MQL5/Files` directory of your MetaTrader 5 installation. + * Run the script on a EUR/USD chart. This will create a `raw_price_data.csv` file in the `MQL5/Files` directory of your MetaTrader 5 installation. The location of this directory can vary depending on your installation. You can find the location of the `MQL5` directory by going to `File > Open Data Folder` in your MetaTrader 5 terminal. * Copy the `raw_price_data.csv` file to the root of the project directory. 2. **Train the Models**: + * Navigate to the `separate_codes` directory in your terminal. * Run the `create_benchmark_model.py` script to create the benchmark model. ```bash @@ -38,7 +39,7 @@ ``` 3. **Run the Expert Advisors**: - * Copy the `Benchmark_Model_EA.mq5` and `Neural_Network_Trader_EA.mq5` files to the `MQL5/Experts` directory of your MetaTrader 5 installation. - * Copy the `benchmark_logistic_model.onnx` and `trading_neural_network_model.onnx` files to the `MQL5/Files` directory of your MetaTrader 5 installation. + * Copy the `Benchmark_Model_EA.mq5` and `Neural_Network_Trader_EA.mq5` files from the `separate_codes` directory to the `MQL5/Experts` directory of your MetaTrader 5 installation. + * Copy the `benchmark_logistic_model.onnx` and `trading_neural_network_model.onnx` files from the `separate_codes` directory to the `MQL5/Files` directory 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. + * Attach the EAs to a EUR/USD chart in your MetaTrader 5 terminal. \ No newline at end of file diff --git a/tech.md b/tech.md index c7087c8..3932d58 100644 --- a/tech.md +++ b/tech.md @@ -31,4 +31,4 @@ This project is a trading bot for MetaTrader 5 that uses a machine learning mode The project uses two machine learning models: 1. **Benchmark Model**: A simple logistic regression model that predicts the direction of the next day's price change based on the previous day's price change. -2. **Neural Network Model**: A multi-layer perceptron (MLP) classifier that predicts the direction of the next day's price change based on the previous day's price change. The model is trained using hyperparameter tuning with `RandomizedSearchCV` and `TimeSeriesSplit` to find the best parameters. +2. **Neural Network Model**: A multi-layer perceptron (MLP) classifier that predicts the direction of the next day's price change based on the previous day's price change. The model is trained using hyperparameter tuning with `RandomizedSearchCV` and `TimeSeriesSplit` to find the best parameters. The hyperparameter search space includes different hidden layer sizes, activation functions, solvers, and learning rates. The exact architecture of the model will vary depending on the results of the hyperparameter tuning. \ No newline at end of file