Discussion of article "Experiments with neural networks (Part 4): Templates"

 

New article Experiments with neural networks (Part 4): Templates has been published:

In this article, I will use experimentation and non-standard approaches to develop a profitable trading system and check whether neural networks can be of any help for traders. MetaTrader 5 as a self-sufficient tool for using neural networks in trading. Simple explanation.

A template is a kind of construction similar to a "floating pattern". Its values are constantly changing depending on the situation on the market, but each of the values is in a certain range, which is what we need for our experiments. Since we already know that the data that we transmit to the neural network should be in a certain range, the value in the template is rounded up to an integer for simplicity and better understanding by the perceptron and the neural network. Thus, we get more situations for triggering conditions and less load on the perceptron and the neural network. Below you see the first of the templates that came to my mind. I called it a fan. I think, the similarity is obvious. We will not use indicators in this article, instead we work with candlesticks.

Below are examples using history zooming so we can analyze a shorter or deeper history.

Using an equal number of candles in templates is not a prerequisite, which gives an additional field for reflection on the relevance of previous price values. In our case, these are the closing prices of the candles.

It is important to understand that in the examples using the DeepNeuralNetwork.mqh library for 24 candles, we use different libraries that I described in the previous articles. They have different input settings. Namely, 4 and 8 parameters for the input of the neural network. You do not have to worry about it. I have already added EAs and necessary libraries in the attachment.

2.1 Fan template of four values stretched over 24 candles. It is equal to one day on H1. 

Fan 4 24

Let's describe what we will transfer to the perceptron and the neural network for better understanding:

  1. Rounded distance in points from point 1 to point 2;
  2. Rounded distance in points from point 1 to point 3;
  3. Rounded distance in points from point 1 to point 4;
  4. Rounded distance in points from point 1 to point 5;

Author: Roman Poshtar

 

it all looks like random results.
If you do the same on other pairs where the balance curve went up, the result will most likely be a loss or close to zero. This neural network does not detect patterns in the form in which you could expect to make a profit.

 
In the templates there are fixed values in points, but how were they obtained? Maybe they should be optimised in the same way?
 
Aleksey Vyazmikin #:
In the templates there are fixed values in points, but how were they obtained? Maybe they should be optimised in the same way?

No, they don't. They are for building the figure itself.

 
Roman Poshtar #:

No, you don't. They're for the construction of the figure itself.

Can you justify that? Because different tools will have different sweeps.

 
Aleksey Vyazmikin #:

Can you justify that? Because different instruments will have different spreads.

It is necessary to take a reasonable minimum so that the price does not fall outside the pattern. But you can try optimisation.

 
Roman Poshtar #:

It is necessary to take a reasonable minimum so that the price does not fall outside the pattern. But you can try optimisation.

So how about taking a daily ATR, that will take into account local volatility?

 
By the way, I can give my computing resources for tests, but only electricity will have to be paid....
 
Aleksey Vyazmikin #:

So maybe take the ATR daily, it will take into account the local volatility?

No money for resources yet, but thank you. We will consider indicators in the next article.

 
Ukrainian:

Hello Romana, I am very interested in the series you are creating. I would like to offer you the use of my information resources free of charge. My e-mail address: sciortybrothers@gmail.com. Please send me any message so that I can respond to it. Have a nice day!

English:

Hello Roman, I am very interested in the series that you are creating. I would like to offer you the use of my informatics resources for free. My email address is sciortybrothers@gmail.com. Please feel free to send me even just a word so that I can respond to you. Have a good day!
 

Interesting article can add optimisation, day of the week, hours

For example from 15-17 volatile hours and breakout triangle figures.

Maybe the first Friday of the month (nonfarm). You can also add imbalance (middle of an impulse candle, order blocks, only those where there are imbalances.

For example, on Friday after strong news, the last day of the month is usually nasty. Or the last day of the month, too. I also noticed behaviour that the last minute, which is a multiple of 15, 30 minutes, is imbalanced.