History repeats itself - a lie?

 

The question came up after watching a thread about another "grail" Counsellor

I have read this branch and decided to build something similar...

1) Combination of colours of the last N candles is written to a string variable "curState". 0 - black, 1 - white.

For example, if the last three candlesticks were "Black Black White", "curState" will contain "001"

2) The Expert Advisor looks through the history from the first to the last candle on the chart, trying to find the same combinations, as in "curState" and writing down what will be the colour of the next candle.

3) As the result we get statistics about how many times after a given combination of candles the next candle was black and how many times it was white. Based on these statistics, the Expert Advisor opens a buy or sell position.

If history were really repeating, the price would behave the same in most cases, i.e. after the same combination of candlesticks in most cases there would be the same outcome (the same colour candlestick) in most cases (sorry for the tautology). This means the statistics of outcomes would be an invaluable tool in the trader's hands. But the EA (oddly enough =] ) is losing.

About the Expert Advisor:

Works only on PERIOD_D1, opens position at the beginning of the day. closes it on the next day.

Input parameters: Lots. and numBars - number of candlesticks, combination of which the Expert Advisor searches in the history.

So it turns out that history does not repeat itself, while the gurus of technical analysis are wrong, to put it mildly? What do you think?

Files:
 
you don't believe everything written on the fence >:-(((.
This EA is a pips.
So - think again.
 
Dear Fduch, are you sure you are taking into account all the candle combinations. Maybe if there is such a thing, it goes a little deeper than that. History repeats itself to some extent, but not identically. If, say, in a typical situation I sold and made a loss, there is a possibility that next time I will buy. That's the divergence.
 
Fduch писал (а) >>

So history does not repeat itself and the gurus of that analysis are wrong, to put it mildly? What do you think?

Your three candles are apparently not the same story. Which is repeating itself. Take something more global.

The most typical repetition of history is a "pullback move".

Perhaps you are mistaken when you want to find a repeating pattern by such a small detail (the colour of three candlesticks). You'd better take "hammer" or "hanging"! Same three candles, - but this pattern works out not a lot better....

 
rid писал (а) >>

Your three candles- that's not the story, apparently. One that repeats itself. Take something more global.

The most typical repetition of history is a "move-back".

Perhaps you are mistaken when you want to find a repeating pattern by such a small detail (the colour of three candlesticks). You' d better take "hammer" or "hanging"! It's the same three candlesticks, - but this pattern works out much better....

First, the number of candlesticks in an EA is adjustable. I optimized it by the number of candlesticks, it does not affect the result - it is still a loss...

What is "something"?) Can you please be a bit more specific?

About the 'hammer' or hanging'. Look at the D1 chart. Somewhere there will be this pattern. Now open an off-line chart with a period of D3. "Hammer" (or "hung") will turn into a single candle with a long lower shadow and a small body. I studied Japanese candlestick analysis and came to the conclusion that it only exists for people who want to see - to see...

 
Korey писал (а) >>
This Expert Advisor is a Pips.

Fduch wrote (a) >>

About the Expert Advisor:

Works only on PERIOD_D1, opens a position at the start of the day. closes the next day.


Good for a pipser who holds a position for 24 hours

 

sayfuji писал (а) >>
Уважаемый Fduch, а Вы уверены, что учитываете все варианты комбинаций свечей. Может если таковое существует, то всё немного глубже. История в некоторой степени повторяется, но не идентично. Если, скажем в типичной ситуации я продал и получил убыток, есть вероятность, что в следующий раз я куплю. Вот и расхождение.

Yes, I'm sure I take into account all the different combinations of candlesticks. Not by the size of their bodies and shadow lengths, but by colour.

I'm sure that nothing can be repeated identically But if history repeats itself, the general course of events can be the same, right? In other words, if the price went up during the first four days and then went down during the fifth one, and it happened 50 times out of 70, then we can assume that the same thing will happen 71 times, don't you think?

 
Fduch писал (а) >> if "the first four days the price went up, and the fifth day it went down" and so it was 50 times out of 70 such situations

There are too few statistics. If it were 500 out of 700, that would be a very significant deviation from a frequency of 0.5, but 50 out of 70 is just a "luck drift" of less than two sigmas, i.e. quite a likely event. No need to get worked up about it, history only repeats itself statistically.

 
Tried it once, it didn't even cover the spread. Maybe I didn't try enough.
 
IMHO colour is not enough to predict
 
Fduch писал (а) >> So it turns out that history does not repeat itself, and the tech analysis gurus are wrong, to put it mildly? What do you think?

Don't take this expression too literally. In the way you have described, of course it does not repeat itself. It would be too simple )))). Repetition occurs in more 'global' figures - head and shoulders, flag and so on. And that, too, is not always.....

Reason: