The modeling of the forex market – an EA robot using AI
Forex market modeling, EA robot using artificial intelligence
Modeling currency movements in the foreign exchange market is difficult. It is a time-varying system with high dynamic requirements, the degree of freedom is difficult to control, and the environment changes rapidly. Using DSP terminology, our operation is a forward estimation process. The input is market data and relevant news, the expected output is the upward or downward (buy or sell) direction and the appropriate investment amount (lots). We can model market behavior using transition matrices. The system operates in a closed loop and gradually modifies internal operations to achieve statistically better output. It looks like a Kalman filter. I would say it's a forward tracking process like a missile.
If AI (artificial intelligence) is introduced into the process, the parameters in the modeling matrix need to be modified according to the environment. It's always training/learning. Nonetheless, rapid changes in the environment make learning very difficult. When the system parameters are correct, the waves have disappeared.
Here I provide an EA robot for testing purposes, in which a modified Kalman filter is used. Statistical characteristics are based on 15 million pieces of data for the EURUSD currency pair throughout 2017. The picture below shows the results.
We can see that the bot works pretty smoothly under normal circumstances, but experiences a large retracement (down spike) on big red news. If your bankroll is good enough, the bot can help you resume your normal winning process.
You might be thinking, why not stop trading before every red message? This is a normal recommendation for all indicators/EAs. Backtesting cannot avoid red messages, but in a real situation you can simply close all orders and close the EA, wait for the message to pass and start again.
Yes, it is true that many skilled traders do this. But what I want to say is that big waves bring big opportunities. The problem with red news is that the tracking process cannot keep up with the rapid changes. The history can be changed if you modify the transformation matrix that can quickly track trends. Trend changes in breaking news often only take seconds. You can't track it with a minimum 1M chart. You must use tick data. The graph below shows the results of a test using tick data for faster trend following.
It can be seen that big news is no longer a problem, but has become a big advantage.
So why not use two modules at different times in one robot? You can virtually enjoy life on the beach with your loved one!
here we go!
set up
- Open a demo account with at least $1000 equity and a leverage of 1:200 or 1:500
- Download the attached ".ex4" file into the "MQ4/expert" folder.
- Open the EURUSD graphics window and adjust it to the 15M chart.
- Attach the ".ex4" robot to the chart.
- Then everything is OK, no parameters are needed, no manual participation is required. Keep it running 24/7.
Notice
- In this demo version, only one pair (EURUSD), one order and 0.01 start are allowed.
- Do not use a real account. You must be responsible for your own money.
- Fast tick tracking is not included in this demo, please stop it before the red message appears.
- The software is licensed for 1 month.
discuss
- Please respect intellectual property rights. That includes years of work.
- Please give your suggestions.
- Please note that backtesting cannot give a true picture of the software.
- I will give out my prospective test results from time to time, maybe once a week.
- For now, the robot is still in its infancy. I will continue to train it.
























Attachment to original post (1)
📦 Summary of post attachments (6)
Below are all the files (6) shared in the reply.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •