Author's - page 9

 
hrenfx:
Of course, the Expert Advisor was written only for a tester. Therefore, the loss of statistics during restarting of the Expert Advisor is out of the question.

Array static int Element[] is declared in this way only for expediency not to allocate memory for it at each function call. I.e. the static element can be removed.

All the description is given here. That's why, in particular, there are no comments in the code.

The signal, indeed, is always there (as in your case). But the flip happens only at the threshold. Closing at the moment of signal uncertainty as you have:

I did not try to do it.

I've provided three methods of assigning a pattern to any class (buy, sell, fence), because I don't know which is better.

1. Always in the market.

2. only when exceeding the threshold.

3. With fixed stopslos and takeprofit.

This is what the indicator does (parameter discrete_metod).

If you tell me which one is better, I will move the code directly to the Expert Advisor.

 
alexeymosc:
That's what I was wondering. Thanks for the explanation. So it is a priori assumed that if price is above the bag, it is an indication of upward movement, etc.?
No it isn't, it all depends on the statistics of how the pattern works out.
 
her.human:

If you tell me which one is better, I will transfer the code directly to the Expert Advisor.

Only when the threshold is exceeded.

I will not:
No it's not, it depends on the statistics of how the pattern works.
There are no such statistics in my code. So it would be interesting to see a non-syndicator variant.


 
her.human:
No it doesn't, it all depends on the statistics of how the pattern performs.
Yeah, got it.
 
hrenfx:

Several selections of input parameters:

Bad, of course, even though 2.5 years old the TS is constantly in the market. But that's not the point.

What values can Signal (from and to) and consequently MinPorog take?
 

SignalPorog from zero to one.

MinPorog from zero to infinity (there will simply be no signals from a certain value).

The MinPorog condition can be removed (equal to zero), but then I don't like the sense of normalisation.

 
hrenfx:

SignalPorog from zero to one.

MinPorog from zero to infinity (there will simply be no signals from a certain value).

The MinPorog condition can be removed (equal to zero), but then I don't like the sense of normalization.

Then perhaps there is an error in the code:

2012.09.11 17:43:25 2012.02.03 13:00 SimplePatterns EURUSD,H1: PatternNorm[Index] = -1.4059

2012.09.11 17:43:25 2012.02.03 13:00 SimplePatterns EURUSD,H1: Pattern[Index] = 6.8271

2012.09.11 17:43:25 2012.02.03 11:00 SimplePatterns EURUSD,H1: PatternNorm[Index] = 1.7607

2012.09.11 17:43:25 2012.02.03 11:00 SimplePatterns EURUSD,H1: Pattern[Index] = 13.4687

or did I get it wrong?

 
You're right, a mistake in the code. Thank you, I overdid it. I should comment out one line:
//      Sum /= Amount;

P.S. It didn't get any better (fit is 100%):

 
hrenfx:

Only when the threshold is exceeded.

My code has no such statistics. So it will be interesting to see the indicatorless version.

Reworked without indicator.

PS. sorry you won't be able to test it )

Files:
 

Thank you, that makes sense now:

  1. The training is based on patterns calculated for bars_future bars before the current moment.
  2. The pattern for the current moment is compared with the trained one.

The idea is much better than originally imagined.