The modeling of the forex market, an EA robot using Artificial Intelligence
The modeling of the currencies movement in the forex market is difficult. It is a time-varying system with much dynamics demanding as the number of freedom is very difficult to control and the environment is changing rapidly. Using the DSP terminology , our operation is a forward estimation process. The inputs are the market data and the related news, the expected outputs are up-or-down(buy-or-sell) direction and the suitable investment quantity (the lots). We can modeling the market behavior using a transition matrix . The system is operated in a closed circle and the inner operation is modified step by step for, statistically, a better output. It looks like the Kalman filter. I’d say it as a forward tracking process like a guided missile.
If AI(Artificial Intelligence) is introduced into the process, the parameters in the modeling matrix should be modified based on the environment. It is training/learning all the time. Even though, the rapid change of the environment makes the learning very difficult. When the system gets the parameters right, the wave is already gone.
Here I provide an EA robot for testing purpose in which a modified Kalman filter is used. The statistical properties are based on the EURUSD pair for 15M data of the whole year of 2017. The figure below shows the result.
We can see that the robot works quite smoothly during the normal time, but with big drawdown (the down spikes) on the big red news. If your capital is good enough, the robot can help you to regain the normal winning process.
You might think that why don't you stop the trading before every red news. This is a normal suggestion for all indicator/EAs. The backtest cannot avoid the red news, but in the real situation, you can simply close all orders and shut down the EA, waiting for the news to pass by and to start over again.
Yes, it is true that many skilled traders do it this way. But I would say that the big wave gives big chance. The problem for the red news is that the running speed of the tracking process cannot follow the rapid change. If you modify the transition matrix that can do a fast track to follow the trend you can change the history. The trend change in big news normally is in a matter of seconds. You can not follow it by using the minimum 1M chart. You have to use the tick data. Next figure shows the test result of a faster trend tracking using the tick data.
You can see that the big red news is no problem anymore, instead, it becomes the big advantage.
So, why not to use two modules in one robot for different time periods. You can enjoy the life almost of the time with your beloved on the sand beach!
Here we go!
SETUP
- Open a demo account with at least 1000$ equity and the leverage of 1:200 or 1:500
- Download the attached ".ex4" file into your "MQ4/expert" folder.
- Open a EURUSD graph window, adjusted to 15M chart.
- Attach the ".ex4" robot to the chart.
- Then everything is OK, no parameter needed, no human attendance. Let it run 24/7.
NOTE
- In this demo version, only one pair (EURUSD), one order and 0.01 for start are permitted.
- Don't use a live account. You have to be responsible for your own money.
- The fast-tick tracking is not included in this demo, stop it before the red news.
- This software is licensed for 1 month period.
DISCUSSION
- Please be kind to respect the intellectual property. It includes years' work.
- Please be kind to give your suggestion.
- Be aware that the backtest cannot give the true picture of the software.
- I will give my forward test results time to time, maybe once per week.
- At the moment, the robot is still in the infant stage. I will continue to train it.
Attached File(s)
LaoQinTracking_EA.ex4
26 KB
|
730 downloads