Using artificial intelligence at MTS

 
Discussing the use of artificial intelligence in trading strategies in general and my Expert Advisor in particular which code can be downloadedHERE. The backtest results are on the screenshot below.



It takes a long time to optimise the Expert Advisor and only with the use of genetic algorithms. The input parameters for selecting the weighting coefficients: x1, x2, x3 and x4 are limited to values from 0 to 200. The sl parameter is a stop loss in pips. Capital and risk management are not used.
 

Equivalent to smoothing AC using a cypher filter with some characteristics. The smoothing coefficients are not balanced, which is equivalent to a brick on the buy button. The brick (+ e.g. stochastic) works very well by itself, if only one knows when to buy it and when to sell. Also, taking into account that the AC can go down 2 times during 21 bars and the presence of 4 optimisable parameters......))))

But for me it sheds light on how neural networks work and why they are not as efficient as we would like them to be.

I used to have a hobby in the beginning of creative period - to write EAs for working on m1 based on last week results (7200 bars, as opposed to 66000) - as much as 300 percents per week were shown in the tester.....

I wonder how many harmonics the price has to be decomposed into a Fourier series to get a grail after optimisation?

 
Integer:

Equivalent to smoothing AC using a cypher filter with some characteristics. The smoothing coefficients are not balanced, which is equivalent to a brick on the buy button. The brick (+ e.g. stochastic) works very well by itself, if only one knows when to buy it and when to sell. Also, taking into account that the AC can go down 2 times during 21 bars and the presence of 4 optimisable parameters......))))

But for me it sheds light on how neural networks work and why they are not as efficient as we would like them to be.

I used to have a hobby in the beginning of creative period - to write EAs for working on m1 based on last week results (7200 bars, as opposed to 66000) - as much as 300 percents per week were shown in the tester.....

I wonder how many harmonics the price has to be decomposed into a Fourier series to get a grail after optimisation?

Neural networks are effective only when the identified objects are linearly separable, i.e. when one class of objects can be separated from another in the feature space by a plane described by a linear equation.

As for the AC oscillator, the Expert Advisor not only looks at its last value (decisions based on the last values are most often used in technical analysis), but it studies the history, i.e. what were 3 other values of the indicator in the past. He is interested in the oscillator behaviour for decision making. This very behaviour gets to the input of the neural network. And on the output we get Buy or Sell.

Another new feature is not the standard neural network training, but selection of weights on historical data using the genetic algorithm. I tried both variants. Genetics gives slightly worse result and slower in time. But there is no built-in neuronics algorithm and learning it in MT4. But there is an optimization based on genetics. And some researchers in this area realized that dynamic learning is not very adequate if the situation changes drastically. If bulls prevail in the market, the system will retrain to the bull trend and forget about the bearish trend. And vice versa. Samuel A. L. 1959, "Some studies in machine learning using the game of checkers" (IBM J. Research and Devepopmend 3: 210 - 229), first encountered and described this monstrosity. He observed that if his programme had a professional opponent, it gradually moved to a professional level game. But if the opponent was a beginner, then the program "forgot" the previous level and started to pass to primitive play. Therefore it probably does not make sense to dynamically teach the neuron on its own mistakes and losses. It is easier to pass it through history, in order to develop a trading strategy adequate to the market.

As for the grails, you do not have to be very smart. You just need to fulfill a number of conditions:

1. The system must open positions either without any stoplosses, or with stoplosses at a very large distance, so that the probability of their operation is close to 0.
2. A powerful filter based on several indicators with triggering conditions separated by a logical AND (&&). And to pull a lot of input parameters of these very indicators into the MTS external settings, so that only a few positions were opened during several years of historical data on tests.
3. To all this add capital and risk management with a raised fraction
 
take the value from 4 points, multiply each value by a factor, sum it up - what's not smoothing by a filter?
 
I don't understand how you can seriously discuss a strategy that yields 44 deals in 2 years... There are too few statistics!
 
Mathemat:
I don't understand how you can seriously discuss a strategy that yields 44 deals in 2 years... Too few statistics!
There are really only 44 trades, and many more calls to the Perceptron function. Spread savings and time savings are applied here. I.e. let's say we have an open position. MTS reads the neural network. If the network reports that the quote movement should be reversed as well as the open position, MTS will reverse the position. If the perceptron informs us that the quotes will continue moving in the same direction relative to the order, MTS only tightens the Stop Loss - trailing stop (the same as closing a position having fixed the profit and opening a new one but with a pulled down loss. And if we open a new position, having closed the previous one, we lose on spread and commission). Because the trading system does not provide takeprofits, so it has to run on trends and try to detect reversal moments. Since reversals on a trend instrument only 1 pc. per trend (if the trend is not sideways of course), then we get such a small amount of transactions. More precisely, there are a little more deals than reversals, because the system is sometimes wrong.
 
Integer:
we take the value from 4 points, multiply each value by a coefficient, sum up - what is not smoothing by a filter?
If we take the values of some number of points and multiply each of them by its corresponding constant and get the result, this action is called a linear equation in mathematics:

a1 * w1 + a2 * w2 + ... + an * wn = d

And smoothing requires recursion, i.e. some known value is used to calculate the smoothed value:

a1 = a1 * w1 + a2 * w2 + ... + an * wn


 
Reshetov писал (а):
Integer wrote:
we take the value from 4 points, multiply each value by a coefficient, sum up - what is not smoothing by a filter?
If we take the values of some number of points and multiply each of them by its corresponding constant and get the result, this action is called a linear equation in mathematics:

a1 * w1 + a2 * w2 + ... + an * wn = d

And smoothing requires recursion, i.e. some known value is used to calculate the smoothed value:

a1 = a1 * w1 + a2 * w2 + ... + an * wn





Have you heard of linear-weighted moving averages?
 

Whatever it is, it has a right to life. The idea may not be new, but it is very interesting, and cleverly implemented, and... is capable of making a profit. I have conducted several forward tests after "learning" the results are encouraging. Many thanks to the author.

 
Figar0:

Whatever it is, it has a right to life. The idea may not be new, but it is very interesting, and cleverly implemented, and... is capable of making a profit. I have conducted several forward tests after "learning" the results are encouraging. Many thanks to the author.

I posted it in order to find at least one trader who would try to check it in practice instead of harassing the author. The more so that the code is reliable and working, and not some hastily developed grail, that accidentally shows tremendous profits in tests. The result on the real account is almost, but not always lower than the test extremum. But it is stable.

And argue with gundosos about whether neurons are effective or not, well, it's just a waste of time. I lay it out according to the principle: if you want it, you can have it, but if you don't want to see it. But with a hope that someone who knows this stuff and can improve the code or suggest a more interesting idea for solving the problem will be found.
 
Integer:
Reshetov:
Integer:
we take the value from 4 points, multiply each value by a coefficient, sum up - what is not smoothing by a filter?
If we take the values of some number of points and multiply each of them by its corresponding constant and get the result, this action is called a linear equation in mathematics:

a1 * w1 + a2 * w2 + ... + an * wn = d

And smoothing requires recursion, i.e. some known value is used to calculate the smoothed value:

a1 = a1 * w1 + a2 * w2 + ... + an * wn





Have you heard of linear-weighted moving averages?
Take a break. Too bad the forum doesn't provide ignores for very annoying interlocutors.
Reason: