Discussion of article "Using the Kalman Filter for price direction prediction"

 

New article Using the Kalman Filter for price direction prediction has been published:

For successful trading, we almost always need indicators that can separate the main price movement from noise fluctuations. In this article, we consider one of the most promising digital filters, the Kalman filter. The article provides the description of how to draw and use the filter.

Currency and stock charts feature price fluctuations having different frequency and amplitude. Our task is to determine the main trends based on these short and long movements. Some traders draw trendlines on the chart, others use indicators. In both cases, our purpose is to separate the true price movement from noise caused by the influence of minor factors that have a short-term effect on the price. In this article I propose using the Kalman filter to separate the major movement from the market noise.

Author: Dmitriy Gizlyk

 

My terminal can't see your Expert Advisor. I wanted to experiment.

 
Aleksey Olupkin:

My terminal can't see your Expert Advisor. I wanted to experiment.

If you have unzipped the contents of the MQL5.zip archive and saved the path to the data folder of your terminal, the Expert Advisor should be located in "/\Experts\Kalman_Gizlyk". If you do not see it in the tester, try to restart the terminal.

 
Dmitriy Gizlyk:

If you have unzipped the contents of the MQL5.zip archive and saved the path to the data folder of your terminal, the Expert Advisor should be located in "/\Experts\Kalman_Gizlyk". If you do not see it in the tester, try restarting the terminal.


Restarted the PC. It appeared. THANK YOU.

 

>Test results showed 49.33% of profitable trades.

But that's extremely low ..... ? in fact, it shows nothing, the statistical probability is 50%. or am I wrong?

 
gedd:

>Test results showed 49.33% of profitable trades.

But that's extremely low ..... ? in fact, it shows nothing, the statistical probability is 50%. or am I wrong?

The Kalman filter predicts movement by 1 step, i.e. by 1 bar. It catches the trend direction well. And losing trades are made in flat movements, when there is no unidirectional movement, and the price turns almost every bar. As you can see in the test results, the average losing trade is less than the average profitable trade. I plan to tell you how to deal with flat losses in the next article.
Regards,
Dmitry.
 

everything is in the right folder, everything compiles without errors, but it shows two messages on the Expert tab:

CMoneyFixedLot::ValidationSettings: lots amount must be in the range from 0.500000 to 100000.000000

CExpert::ValidationSettings: error money parameters

and log messages:

Experts expert Kalman_expert (AUDCAD,H1) loaded successfully

Experts initializing of Kalman_expert (AUDCAD,H1) failed
Experts expert Kalman_expert (AUDCAD,H1) removed

 
repper:

everything is in the right folder, everything compiles without errors, but it shows two messages on the Expert tab:

CMoneyFixedLot::ValidationSettings: lots amount must be in the range from 0.500000 to 100000.000000

CExpert::ValidationSettings: error money parameters

and log messages:

Experts expert Kalman_expert (AUDCAD,H1) loaded successfully

Experts initializing of Kalman_expert (AUDCAD,H1) failed
Experts expert Kalman_expert (AUDCAD,H1) removed

In the Expert Advisor by default the volume of a deal is 0.1 lot. Judging from your messages, the minimum volume of your broker is 0.5 lots. Try to increase the trade volume to the size required by your broker in the parameters.
 
Dmitriy Gizlyk:
In the Expert Advisor by default the volume of a deal is 0.1 lot. Judging from your messages, the minimum volume of your broker is 0.5 lots. Try to increase the volume of the deal in the parameters to the size required by the broker.

Yes, thank you, I have already found it

 

Tell me, what should happen so that on the same bar the filter predicted a decline, the EA entered the market to sell, and a few minutes later on the same bar reversed to buy.

 
repper:

Tell me, what should happen so that on the same bar the filter predicted a decline, the Expert Advisor entered the market to sell, and a few minutes later on the same bar it reversed to buy.

The Expert Advisor works only on the opening of a candle. Therefore, it does not make two trades on one candle.