Machine learning in trading: theory, models, practice and algo-trading - page 2063

 
Aleksey Nikolayev:


The only thing - to fight gaps and quotes dropouts, it is better to take close[i]-open[i] as increments, instead ofclose[i]-close[i-1].


I see, how does it help to deal with gaps and quotes dropouts? Isn't it better to consider them for H1?

"it is better to take close[i]-open[i] as the increment" - maybe it would be better in percent change?
 
Aleksey Nikolayev:

It's not difficult, I'm sure you can do it if you want. The only thing - to fight gaps and quotes dropping out, it is better to take close[i]-open[i] as increments, instead ofclose[i]-close[i-1].

close[i-1] and open[i] differ by 1 tick. What is the point of fighting with the 1st tick?

 
Evgeniy Chumakov:


With gaps I understand, but how it will help with quotes falling out? Isn't it better to calculate for H1?

When one bar = one increment, it is not a problem if some bars are lost. If the increment is counted by two bars, there will be a lot of spikes.

Evgeniy Ch umakov :


"If we want to use close[i]-open[i] as the increment" - maybe it would be better to use the percentage change?

Yes, that would be better. You can also take the logarithm increments.

 
elibrarius:

close[i-1] and open[i] differ by 1 tick. What is the point of fighting with the 1st tick?

Practically guaranteed to get rid of gaps and gaps in history.

 
Aleksey Nikolayev:

Practically guaranteed to get rid of gaps and omissions in the history.

A gap can occur at any other tick within a minute. Missing bars should be filled from the last known price of the last known bar.
 
elibrarius:
Gap can occur in any other tick within a minute. Missing bars should be filled from the last known price of the last known bar.

Gaps evenly distributed among the bars are not very scary. Unpleasant are those that are crowded at a certain time, and these are usually gaps between bars.

"Missed" bars - an ambiguous concept, it can be a holiday, a short session, etc. or just dropped bars for completely unknown reasons. For myself, I decided that it is easier to count the increment on a single bar, than to play Sherlock Holmes, dealing with several minute bars of ten years ago.

 
elibrarius:

I do this:

1) I create an array of string indexes with a length equal to the number of strings, fill it with values from 0 to N strings

2) I shuffle this array

Where RandomInteger() is any variant of the RNG

3) then I take all values of these indexes in a loop and by it from the main array the necessary string, it turns out to be pseudo-random after mixing the indexes

I tried this algorithm with the random function, that was given earlier. It turns out that there is a shift to the first half of the numeric array, if you take the first n values from the resulting array and then filter the array in order. And the groups in a row are observed, which is also not good, but better than nothing.

 
Aleksey Vyazmikin:

I tried this algorithm with the random function, which was given earlier. It turns out that there is a shift to the first half of the numeric series, if you take the first n values from the resulting array and then filter the array in order. And the groups in a row are observed, which is also not great, but better than nothing.

Weird. I wonder how this can be explained?
I have another version commented out, but I didn't like it for logical reasons:

        for (int r = 0; r<rows; r++) {//перебор train участка
                //j = r + RandomInteger(rows - r);//номер строки с которой поменять  
                j = RandomInteger(rows);//номер строки с которой поменять - так равномернее. Формулой выше меняются последние с последними. А тут с любыми.
                c = idx[r]; idx[r] = idx[j]; idx[j] = c;
        }

Which RandomInteger() do you use? I use XOR.

 
elibrarius:

close[i-1] and open[i] differ by 1 tick. What's the point of fighting with 1 tick?

You are wrong) they do not differ by 1 tick, these values will be equal. Only in case of a gap there will be a difference. Yes, close[i-1] will not work))) for a new bar
 
Alexander Alexeyevich:
You are wrong) they differ not by 1 tick, these values will be equal.

https://www.mql5.com/ru/docs/runtime/testing

A new minute bar opens not at the moment when a new minute starts (the number of seconds becomes 0), but when a tick comes - a price change of at least one point.

Документация по MQL5: Программы MQL5 / Тестирование торговых стратегий
Документация по MQL5: Программы MQL5 / Тестирование торговых стратегий
  • www.mql5.com
Идея автоматической торговли привлекательна тем, что торговый робот может без устали работать 24 часа в сутки и семь дней в неделю. Робот не знает усталости, сомнений и страха, ему не ведомы психологические проблемы. Достаточно четко формализовать торговые правила и реализовать их в виде алгоритмов, и робот готов неустанно трудиться. Но прежде...
Reason: